Versions in this module Expand all Collapse all v0 v0.1.2 Apr 12, 2021 v0.1.1 Apr 12, 2021 v0.1.0 Sep 20, 2020 Changes in this version + const ICMP_DEST_UNREACH + const ICMP_NET_UNREACH + const IPPROTO_ICMP + const IPPROTO_IP + const IPPROTO_RAW + const IPPROTO_TCP + const IPPROTO_UDP + const IPVERSION + const MAX_ICMPHEADER + const MAX_IP6HEADER + const MAX_IPHEADER + const MAX_IPOPTLEN + var NativeEndian binary.ByteOrder + func CheckSum(body []uint32) uint16 + func ICMPUnreachable(saddr IP4, off_iph *IP4Header, offender []byte) ([]byte, error) + func IP4HeaderCoder(iphdr *IP4Header) []byte + func IP6HeaderCoder(iphdr *IP6Header) []byte + func InterfaceAddsGet(iface *net.Interface) ([]net.IP, error) + func InterfaceByAddr(addr string) (*net.Interface, error) + func InterfaceByName(ifname string) (*net.Interface, error) + func IsIPString(ip string) bool + func IsIPv4(ip net.IP) bool + func NativelyLittle() bool + func ParseIP6(s string) (net.IP, error) + type ICMPHeader struct + Check uint16 + Code uint8 + Reserved [4]byte + Type uint8 + func (icmp *ICMPHeader) Coder(body []byte) + func (icmp *ICMPHeader) MakeCheckSum(data []byte) + type ICMPPacket struct + func (pkt *ICMPPacket) Coder(data []byte) []byte + type IP4 uint32 + func FromBytesIP4(ip []byte) IP4 + func FromIP(ip net.IP) IP4 + func MustParseIP4(s string) IP4 + func ParseIP4(s string) (IP4, error) + func (ip *IP4) UnmarshalJSON(j []byte) error + func (ip IP4) MarshalJSON() ([]byte, error) + func (ip IP4) NetworkOrder() uint32 + func (ip IP4) Octets() (a, b, c, d byte) + func (ip IP4) String() string + func (ip IP4) StringSep(sep string) string + func (ip IP4) ToIP() net.IP + type IP4Header struct + Check uint16 + DAddr IP4 + FragOff uint16 + HeadLen uint8 + Id uint16 + Protocal uint8 + SAddr IP4 + TTL uint8 + Tos uint8 + TotLen uint16 + Version uint8 + func IP4HeaderDecoder(buff []byte) *IP4Header + func (iphdr *IP4Header) CheckSum() bool + func (iphdr *IP4Header) Coder(buff []byte) + func (iphdr *IP4Header) Decoder(buff []byte) *IP4Header + func (iphdr *IP4Header) DecrementTTL() error + func (iphdr *IP4Header) MakeCheckSum() + func (iphdr *IP4Header) String() string + type IP4Net struct + IP IP4 + PrefixLen uint + func FromIPNet(n *net.IPNet) IP4Net + func NewIP4Net(addr string, len uint) (*IP4Net, error) + func (n *IP4Net) UnmarshalJSON(j []byte) error + func (n IP4Net) Contains(ip IP4) bool + func (n IP4Net) Empty() bool + func (n IP4Net) Equal(other IP4Net) bool + func (n IP4Net) MarshalJSON() ([]byte, error) + func (n IP4Net) Mask() uint32 + func (n IP4Net) MaskToIP() net.IP + func (n IP4Net) Network() IP4Net + func (n IP4Net) NetworkToIP() net.IP + func (n IP4Net) Next() IP4Net + func (n IP4Net) Overlaps(other IP4Net) bool + func (n IP4Net) String() string + func (n IP4Net) StringSep(octetSep, prefixSep string) string + func (n IP4Net) ToIPNet() *net.IPNet + type IP6 []byte + func (ip IP6) MarshalJSON() ([]byte, error) + func (ip IP6) String() string + func (ip IP6) UnmarshalJSON(j []byte) error + type IP6Header struct + DAddr IP6 + FlowLabel uint32 + HopLimit uint8 + NextHdr uint8 + PlayLoad uint16 + Priority uint8 + SAddr IP6 + Version uint8 + func IP6HeaderDecoder(buff []byte) *IP6Header + func (iphdr *IP6Header) Coder(buff []byte) + func (iphdr *IP6Header) Decoder(buff []byte) *IP6Header + func (iphdr *IP6Header) String() string + type IPType int + const IPCtrl + const IPv4 + const IPv6 + const Ping + func IPHeaderType(buff byte) IPType