Versions in this module Expand all Collapse all v1 v1.0.0 Nov 13, 2018 Changes in this version + const HeaderLen + const Version + func NewControlMessage(cf ControlFlags) []byte + type Conn struct + func NewConn(c net.Conn) *Conn + func (c *Conn) SetTOS(tos int) error + func (c *Conn) SetTTL(ttl int) error + func (c *Conn) TOS() (int, error) + func (c *Conn) TTL() (int, error) + type ControlFlags uint + const FlagDst + const FlagInterface + const FlagSrc + const FlagTTL + type ControlMessage struct + Dst net.IP + IfIndex int + Src net.IP + TTL int + func (cm *ControlMessage) Marshal() []byte + func (cm *ControlMessage) Parse(b []byte) error + func (cm *ControlMessage) String() string + type Header struct + Checksum int + Dst net.IP + Flags HeaderFlags + FragOff int + ID int + Len int + Options []byte + Protocol int + Src net.IP + TOS int + TTL int + TotalLen int + Version int + func ParseHeader(b []byte) (*Header, error) + func (h *Header) Marshal() ([]byte, error) + func (h *Header) Parse(b []byte) error + func (h *Header) String() string + type HeaderFlags int + const DontFragment + const MoreFragments + type ICMPFilter struct + func (f *ICMPFilter) Accept(typ ICMPType) + func (f *ICMPFilter) Block(typ ICMPType) + func (f *ICMPFilter) SetAll(block bool) + func (f *ICMPFilter) WillBlock(typ ICMPType) bool + type ICMPType int + const ICMPTypeDestinationUnreachable + const ICMPTypeEcho + const ICMPTypeEchoReply + const ICMPTypeExtendedEchoReply + const ICMPTypeExtendedEchoRequest + const ICMPTypeParameterProblem + const ICMPTypePhoturis + const ICMPTypeRedirect + const ICMPTypeRouterAdvertisement + const ICMPTypeRouterSolicitation + const ICMPTypeTimeExceeded + const ICMPTypeTimestamp + const ICMPTypeTimestampReply + func (typ ICMPType) Protocol() int + func (typ ICMPType) String() string + type Message = socket.Message + type PacketConn struct + func NewPacketConn(c net.PacketConn) *PacketConn + func (c *PacketConn) Close() error + func (c *PacketConn) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *PacketConn) ICMPFilter() (*ICMPFilter, error) + func (c *PacketConn) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *PacketConn) JoinGroup(ifi *net.Interface, group net.Addr) error + func (c *PacketConn) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *PacketConn) LeaveGroup(ifi *net.Interface, group net.Addr) error + func (c *PacketConn) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *PacketConn) MulticastInterface() (*net.Interface, error) + func (c *PacketConn) MulticastLoopback() (bool, error) + func (c *PacketConn) MulticastTTL() (int, error) + func (c *PacketConn) ReadBatch(ms []Message, flags int) (int, error) + func (c *PacketConn) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) + func (c *PacketConn) SetBPF(filter []bpf.RawInstruction) error + func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error + func (c *PacketConn) SetDeadline(t time.Time) error + func (c *PacketConn) SetICMPFilter(f *ICMPFilter) error + func (c *PacketConn) SetMulticastInterface(ifi *net.Interface) error + func (c *PacketConn) SetMulticastLoopback(on bool) error + func (c *PacketConn) SetMulticastTTL(ttl int) error + func (c *PacketConn) SetReadDeadline(t time.Time) error + func (c *PacketConn) SetTOS(tos int) error + func (c *PacketConn) SetTTL(ttl int) error + func (c *PacketConn) SetWriteDeadline(t time.Time) error + func (c *PacketConn) TOS() (int, error) + func (c *PacketConn) TTL() (int, error) + func (c *PacketConn) WriteBatch(ms []Message, flags int) (int, error) + func (c *PacketConn) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) + type RawConn struct + func NewRawConn(c net.PacketConn) (*RawConn, error) + func (c *RawConn) Close() error + func (c *RawConn) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *RawConn) ICMPFilter() (*ICMPFilter, error) + func (c *RawConn) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *RawConn) JoinGroup(ifi *net.Interface, group net.Addr) error + func (c *RawConn) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *RawConn) LeaveGroup(ifi *net.Interface, group net.Addr) error + func (c *RawConn) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *RawConn) MulticastInterface() (*net.Interface, error) + func (c *RawConn) MulticastLoopback() (bool, error) + func (c *RawConn) MulticastTTL() (int, error) + func (c *RawConn) ReadBatch(ms []Message, flags int) (int, error) + func (c *RawConn) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) + func (c *RawConn) SetBPF(filter []bpf.RawInstruction) error + func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error + func (c *RawConn) SetDeadline(t time.Time) error + func (c *RawConn) SetICMPFilter(f *ICMPFilter) error + func (c *RawConn) SetMulticastInterface(ifi *net.Interface) error + func (c *RawConn) SetMulticastLoopback(on bool) error + func (c *RawConn) SetMulticastTTL(ttl int) error + func (c *RawConn) SetReadDeadline(t time.Time) error + func (c *RawConn) SetTOS(tos int) error + func (c *RawConn) SetTTL(ttl int) error + func (c *RawConn) SetWriteDeadline(t time.Time) error + func (c *RawConn) TOS() (int, error) + func (c *RawConn) TTL() (int, error) + func (c *RawConn) WriteBatch(ms []Message, flags int) (int, error) + func (c *RawConn) WriteTo(h *Header, p []byte, cm *ControlMessage) error