Module common

Source

Structs§

DnsHeader
DnsRequestAnswer
DnsRequestHeader
DnsRequestPayload
A request payload with (request) lines.
DnsResponsePayload
A response section
DnsSoa
StatusBits
Flags which control the status of th DNS query

Enums§

DnsRdata
QClass
A two octet code that specifies the class of the query.
QDnsName
An structure for the target in request. Implements From for IpAddr, Ipv4Addr, Ipv6Addr, str In case if IP address is in the human readable ‘string’ format it will be stored as Name. And later the code will try to convert it to IP address before returing as string.
QType
A two octet code which specifies the type of the query. TYPE fields are used in resource records. Note that these types are a subset of QTYPEs. QTYPE fields appear in the question part of a query. QTYPES are a superset of TYPEs, hence all TYPEs are valid QTYPEs.

Constants§

HOST_CFG_PATH
A hosts file location on disk
IPV4_BIND_ALL
Default BIND for IPv4
IPV6_BIND_ALL
Default BIND for IPv6
NSSWITCH_CFG_PATH
A nsswitch location
RESOLV_CFG_PATH
A location on the disk where resolv.conf is located

Statics§

HOST_CFG_PATH_P
RESOLV_CFG_PATH_P

Functions§

byte2hexchar
Converts a part of the octec of IP to printable hex i.e valid range is from 0 up to 15 will be converted to 0x30..0x39 and ‘a’..‘f’.
ip2pkt
Converts IpAddr to sequence of bytes coded specially for the payload of package.
ipv4_pkt
ipv6_pkt
name2pkt