Versions in this module Expand all Collapse all v0 v0.20251208.1 Dec 8, 2025 v0.20251208.0 Dec 8, 2025 v0.20250603.0 Jun 3, 2025 v0.20240905.1 Sep 5, 2024 v0.20240905.0 Sep 5, 2024 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) HopLimit() (int, error) + func (c *Conn) PathMTU() (int, error) + func (c *Conn) SetHopLimit(hoplim int) error + func (c *Conn) SetTrafficClass(tclass int) error + func (c *Conn) TrafficClass() (int, error) + type ControlFlags uint + const FlagDst + const FlagHopLimit + const FlagInterface + const FlagPathMTU + const FlagSrc + const FlagTrafficClass + type ControlMessage struct + Dst net.IP + HopLimit int + IfIndex int + MTU int + NextHop net.IP + Src net.IP + TrafficClass int + func (cm *ControlMessage) Marshal() []byte + func (cm *ControlMessage) Parse(b []byte) error + func (cm *ControlMessage) String() string + type Header struct + Dst net.IP + FlowLabel int + HopLimit int + NextHeader int + PayloadLen int + Src net.IP + TrafficClass int + Version int + func ParseHeader(b []byte) (*Header, error) + func (h *Header) String() string + 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 ICMPTypeCertificationPathAdvertisement + const ICMPTypeCertificationPathSolicitation + const ICMPTypeDestinationUnreachable + const ICMPTypeDuplicateAddressConfirmation + const ICMPTypeDuplicateAddressRequest + const ICMPTypeEchoReply + const ICMPTypeEchoRequest + const ICMPTypeExtendedEchoReply + const ICMPTypeExtendedEchoRequest + const ICMPTypeFMIPv6 + const ICMPTypeHomeAgentAddressDiscoveryReply + const ICMPTypeHomeAgentAddressDiscoveryRequest + const ICMPTypeILNPv6LocatorUpdate + const ICMPTypeInverseNeighborDiscoveryAdvertisement + const ICMPTypeInverseNeighborDiscoverySolicitation + const ICMPTypeMPLControl + const ICMPTypeMobilePrefixAdvertisement + const ICMPTypeMobilePrefixSolicitation + const ICMPTypeMulticastListenerDone + const ICMPTypeMulticastListenerQuery + const ICMPTypeMulticastListenerReport + const ICMPTypeMulticastRouterAdvertisement + const ICMPTypeMulticastRouterSolicitation + const ICMPTypeMulticastRouterTermination + const ICMPTypeNeighborAdvertisement + const ICMPTypeNeighborSolicitation + const ICMPTypeNodeInformationQuery + const ICMPTypeNodeInformationResponse + const ICMPTypePacketTooBig + const ICMPTypeParameterProblem + const ICMPTypeRPLControl + const ICMPTypeRedirect + const ICMPTypeRouterAdvertisement + const ICMPTypeRouterRenumbering + const ICMPTypeRouterSolicitation + const ICMPTypeTimeExceeded + const ICMPTypeVersion2MulticastListenerReport + 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) Checksum() (on bool, offset int, err error) + func (c *PacketConn) Close() error + func (c *PacketConn) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error + func (c *PacketConn) HopLimit() (int, 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) MulticastHopLimit() (int, error) + func (c *PacketConn) MulticastInterface() (*net.Interface, error) + func (c *PacketConn) MulticastLoopback() (bool, 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) SetChecksum(on bool, offset int) error + func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error + func (c *PacketConn) SetDeadline(t time.Time) error + func (c *PacketConn) SetHopLimit(hoplim int) error + func (c *PacketConn) SetICMPFilter(f *ICMPFilter) error + func (c *PacketConn) SetMulticastHopLimit(hoplim int) error + func (c *PacketConn) SetMulticastInterface(ifi *net.Interface) error + func (c *PacketConn) SetMulticastLoopback(on bool) error + func (c *PacketConn) SetReadDeadline(t time.Time) error + func (c *PacketConn) SetTrafficClass(tclass int) error + func (c *PacketConn) SetWriteDeadline(t time.Time) error + func (c *PacketConn) TrafficClass() (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)