Skip to content

Commit 26e1b58

Browse files
committed
関数名を変更
1 parent 52e0871 commit 26e1b58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

icmp.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type icmpMessage struct {
4242
icmpTimeExceeded icmpTimeExceeded
4343
}
4444

45-
func (icmpmsg icmpMessage) ToPacket() (icmpPacket []byte) {
45+
func (icmpmsg icmpMessage) ReplyPacket() (icmpPacket []byte) {
4646
var b bytes.Buffer
4747
// ICMPヘッダ
4848
b.Write([]byte{ICMP_TYPE_ECHO_REPLY})
@@ -91,7 +91,7 @@ func icmpInput(inputdev *netDevice, sourceAddr, destAddr uint32, icmpPacket []by
9191
fmt.Println("ICMP ECHO REPLY is received")
9292
case ICMP_TYPE_ECHO_REQUEST:
9393
fmt.Println("ICMP ECHO REQUEST is received, Create Reply Packet")
94-
ipPacketEncapsulateOutput(inputdev, sourceAddr, destAddr, icmpmsg.ToPacket(), IP_PROTOCOL_NUM_ICMP)
94+
ipPacketEncapsulateOutput(inputdev, sourceAddr, destAddr, icmpmsg.ReplyPacket(), IP_PROTOCOL_NUM_ICMP)
9595
}
9696
}
9797

0 commit comments

Comments
 (0)