Documentation
¶
Index ¶
- func GetIPFamily(ip net.IP) int
- func GetLocalWildcardIP(family int) net.IP
- func ParseQuotedUDPHeader(packet []byte, af int) (int, int, error)
- func ResolveHostnameToIP(dest string, preferAddressFamily int) (net.IP, error)
- func ReverseLookup(addr string, timeout time.Duration) string
- func SkipICMPHeader(packet []byte) []byte
- func SkipIPHeader(packet []byte, af int) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIPFamily ¶
func GetLocalWildcardIP ¶ added in v0.0.2
func ParseQuotedUDPHeader ¶ added in v0.0.2
ParseQuotedUDPHeader extracts UDP source and destination ports from ICMP reply request i.e. IP + ICMP Header + ICMP Payload (Quoted IP + UDP Headers)
func ResolveHostnameToIP ¶
ResolveHostnameToIP resolves a hostname to an IP address, preferring the specified address family (e.g., IPv4Family or IPv6Family).
func ReverseLookup ¶
Resolves IP address to hostname
func SkipICMPHeader ¶ added in v0.0.2
SkipICMPHeader returns the slice of data after the ICMP header in the packet.
func SkipIPHeader ¶ added in v0.0.2
SkipIPHeader returns the slice of data after the IP header in the packet. It uses the address family to determine the IP header length. For IPv4, header length is variable and specified in the first byte. For IPv6, header length is fixed to 40 bytes.
Types ¶
This section is empty.