Documentation ¶
Index ¶
- Constants
- type DuplexChannel
- type ICMPChannel
- func (c *ICMPChannel) Close() error
- func (c *ICMPChannel) LocalAddr() net.Addr
- func (c *ICMPChannel) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *ICMPChannel) SetDeadline(t time.Time) error
- func (c *ICMPChannel) SetReadDeadline(t time.Time) error
- func (c *ICMPChannel) SetWriteDeadline(t time.Time) error
- func (c *ICMPChannel) StateManager() *endpointstates.Manager
- func (c *ICMPChannel) WriteTo(p []byte, addr net.Addr) (n int, err error)
Constants ¶
View Source
const MaxPacketSize = 1500
View Source
const MaxPayloadSize = 1468
MaxPayloadSize equals to MaxPacketSize minus icmp header length + 4 for magic number
View Source
const ProtocolICMP = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DuplexChannel ¶
type DuplexChannel interface { net.PacketConn StateManager() *endpointstates.Manager }
func OpenChannel4 ¶
func OpenChannel4(magic uint32, isServer bool) (DuplexChannel, error)
OpenChannel4 opens an ICMPv4 channel, enabling sending and receiving datagrams.
type ICMPChannel ¶
type ICMPChannel struct {
// contains filtered or unexported fields
}
func (*ICMPChannel) Close ¶
func (c *ICMPChannel) Close() error
func (*ICMPChannel) LocalAddr ¶
func (c *ICMPChannel) LocalAddr() net.Addr
func (*ICMPChannel) SetDeadline ¶
func (c *ICMPChannel) SetDeadline(t time.Time) error
func (*ICMPChannel) SetReadDeadline ¶
func (c *ICMPChannel) SetReadDeadline(t time.Time) error
func (*ICMPChannel) SetWriteDeadline ¶
func (c *ICMPChannel) SetWriteDeadline(t time.Time) error
func (*ICMPChannel) StateManager ¶
func (c *ICMPChannel) StateManager() *endpointstates.Manager
Click to show internal directories.
Click to hide internal directories.