Documentation
¶
Index ¶
- Constants
- func DNSNewNXDomain(source *dns.Msg) *dns.Msg
- func DNSNewResponseByAnswer(req *dns.Msg, answer []dns.RR) *dns.Msg
- func DNSNewSubnetFromIP(ip net.IP, maskBits uint8) *dns.EDNS0_SUBNET
- func DNSSetSUBNET(m *dns.Msg, subnet *dns.EDNS0_SUBNET)
- func DNSSplitAnswer(rr dns.RR) net.IP
- func DNSSubnetExist(m *dns.Msg) bool
- func DNSSubnetRemove(m *dns.Msg)
- func GetOOBWithSrc(ip net.IP) []byte
- func GetPublicIPV4() (net.IP, error)
- func GetPublicIPV6() (net.IP, error)
- func Ping(host string) uint32
- func Read(c *net.UDPConn, buf []byte) (n int, remoteAddr *net.UDPAddr, err error)
- func SetControlMessage(conn *net.UDPConn) error
Constants ¶
View Source
const ( IPV4MaskBitsMax = net.IPv4len * 8 IPV4MaskBitsDefault = 24 // RFC 7871 Section 11.1 IPV6MaskBitsMax = net.IPv6len * 8 IPV6MaskBitsDefault = 56 // RFC 7871 Section 11.1 )
Variables ¶
This section is empty.
Functions ¶
func DNSNewSubnetFromIP ¶
func DNSNewSubnetFromIP(ip net.IP, maskBits uint8) *dns.EDNS0_SUBNET
func DNSSetSUBNET ¶
func DNSSetSUBNET(m *dns.Msg, subnet *dns.EDNS0_SUBNET)
DNSSetSUBNET set the EDNS client subnet option return true only when the subnet added to m
func DNSSubnetExist ¶
func DNSSubnetRemove ¶
DNSSubnetRemove set the EDNS client subnet option return true only when the subnet added to m
func GetOOBWithSrc ¶
GetOOBWithSrc makes the OOB data with a specified source IP.
func GetPublicIPV4 ¶
func GetPublicIPV6 ¶
func Ping ¶
Ping return the minimum latency in millisecond host : (net.IP).String() when dial error or timeout, return math.MaxUint32
func SetControlMessage ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.