Documentation ¶
Overview ¶
Package icmp contains the implementation of the ICMP and IPv6-ICMP transport protocols for use in ping. To use it in the networking stack, this package must be added to the project, and activated on the stack by passing icmp.NewProtocol4() and/or icmp.NewProtocol6() as one of the transport protocols when calling stack.New(). Then endpoints can be created by passing icmp.ProtocolNumber or icmp.ProtocolNumber6 as the transport protocol number when calling Stack.NewEndpoint().
Index ¶
Constants ¶
View Source
const ( // ProtocolNumber4 is the ICMP protocol number. ProtocolNumber4 = header.ICMPv4ProtocolNumber // ProtocolNumber6 is the IPv6-ICMP protocol number. ProtocolNumber6 = header.ICMPv6ProtocolNumber )
Variables ¶
This section is empty.
Functions ¶
func NewProtocol4 ¶
func NewProtocol4() stack.TransportProtocol
NewProtocol4 returns an ICMPv4 transport protocol.
func NewProtocol6 ¶
func NewProtocol6() stack.TransportProtocol
NewProtocol6 returns an ICMPv6 transport protocol.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.