fehQlibs 26
Qlibs
|
Go to the source code of this file.
Data Structures | |
struct | ip4_address |
struct | ip6_address |
Macros | |
#define | V4MAPPREFIX "::ffff:" |
#define | HOSTNAMELEN 1025 |
#define | IP4MLMTU 512 |
#define | IP6MLMTU 1280 /* RFC 8200 */ |
#define | MTUSIZE IP6MLMTU |
#define | IP4_FMT 20 /* backwards compatibility */ |
#define | IP6_FMT 40 /* " */ |
#define | IPFMT 72 /* used in qmail-remote only (temp?) */ |
#define | FMT_IP4 IP4_FMT /* more backwards compatibility */ |
#define | FMT_IP6 IP6_FMT /* " */ |
#define | ip_address ip4_address /* backward compatibility */ |
#define | V6any V6localnet /* backward compatibility */ |
#define | ip6_isv4mapped(ip) (byte_equal(ip,12,V4mappedprefix)) |
Functions | |
unsigned int | ip4_bytestring (stralloc *, char[4], int) |
ip4_bytestring parse IPv4 address and represent as char string with length prefix | |
unsigned int | ip4_cidr (char *, char[4], unsigned long *) |
ip4_cidr parse IPv4 address string concatinated with the prefix length: 192.168.1/24 | |
unsigned int | ip4_fmt (char *, char[4]) |
ip4_fmt converts IPv4 address to dotted decimal string format | |
unsigned int | ip4_scan (const char *, char[4]) |
ip4_scan parse IPv4 address string and convert to IP address array | |
unsigned int | ip4_scanbracket (const char *, char[4]) |
ip4_scanbracket parse IPv4 address string enclosed in brackets and convert to IP address array | |
unsigned int | ia4_fmt (char *, char[4]) |
ia4_fmt converts IPv4 address into DNS inverse nibble format | |
unsigned int | ip6_bytestring (stralloc *, char *, int) |
unsigned int | ip6_cidr (char *, char[16], unsigned long *) |
ip6_cidr parse compactified IPv6 address string concatinated with the prefix length: fe80::1/64 | |
unsigned int | ip6_fmt (char *, char[16]) |
ip6_fmt convert IPv6 address to compactified IPv6 address string | |
unsigned int | ip6_fmt_flat (char *, char[16]) |
ip6_fmt_flat convert IPv6 address to IPv6 address string | |
unsigned int | ip6_ifscan (char *, char[16], stralloc *) |
ip6_ifscan parse compactified IPv6 address string concatinated with the interface name: fe80::1eth0 | |
unsigned int | ip6_scan (const char *, char[16]) |
ip6_scan parse compactified IPv6 address string and convert to IPv6 address array | |
unsigned int | ip6_scanbracket (const char *, char[16]) |
ip6_scanbracket parse IPv6 string address enclosed in brackets | |
unsigned int | ip6_scan_flat (const char *, char[16]) |
ip6_scan_flat convert IPv6 address string to IPv6 address array | |
unsigned int | ia6_fmt (char *, char[16]) |
ia6_fmt convert IPv6 address to inverse DNS nibble format 1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.ip6.arpa | |
int | fromhex (unsigned char) |
char | tohex (char) |
#define ip6_isv4mapped | ( | ip | ) | (byte_equal(ip,12,V4mappedprefix)) |
#define ip_address ip4_address /* backward compatibility */ |
unsigned int ia4_fmt | ( | char * | s, |
char | ip[4] | ||
) |
unsigned int ia6_fmt | ( | char * | s, |
char | ip[16] | ||
) |
ia6_fmt convert IPv6 address to inverse DNS nibble format 1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.1.2.3.4.5.6.7.8.9.a.b.c.d.e.f.ip6.arpa
input | IPv6 char array output: pointer to IPv6 address string |
Definition at line 102 of file ip6.c.
unsigned int ip4_bytestring | ( | stralloc * | ipstring, |
char | ip[4], | ||
int | prefix | ||
) |
ip4_bytestring parse IPv4 address and represent as char string with length prefix
input | IPv4 char array, prefix length output: pointer to stralloc bytestring |
Definition at line 131 of file ip4.c.
unsigned int ip4_cidr | ( | char * | s, |
char | ip[4], | ||
unsigned long * | plen | ||
) |
unsigned int ip4_fmt | ( | char * | s, |
char | ip[4] | ||
) |
unsigned int ip4_scan | ( | const char * | s, |
char | ip[4] | ||
) |
unsigned int ip4_scanbracket | ( | const char * | s, |
char | ip[4] | ||
) |
ip4_scanbracket parse IPv4 address string enclosed in brackets and convert to IP address array
input | IPv4 char array output: IPv4 char array |
Definition at line 92 of file ip4.c.
unsigned int ip6_bytestring | ( | stralloc * | , |
char * | , | ||
int | |||
) |
unsigned int ip6_cidr | ( | char * | s, |
char | ip[16], | ||
unsigned long * | plen | ||
) |
unsigned int ip6_fmt | ( | char * | s, |
char | ip[16] | ||
) |
unsigned int ip6_fmt_flat | ( | char * | s, |
char | ip[16] | ||
) |
unsigned int ip6_ifscan | ( | char * | s, |
char | ip[16], | ||
stralloc * | ifname | ||
) |
ip6_ifscan parse compactified IPv6 address string concatinated with the interface name: fe80::1eth0
input | pointer to IPv6 address string output: IPv6 char array, stralloc interface_name |
Definition at line 262 of file ip6.c.
unsigned int ip6_scan | ( | const char * | s, |
char | ip[16] | ||
) |
ip6_scan parse compactified IPv6 address string and convert to IPv6 address array
input | pointer to IPv6 address string output: IPv6 char array |
Definition at line 151 of file ip6.c.
unsigned int ip6_scan_flat | ( | const char * | s, |
char | ip[16] | ||
) |
unsigned int ip6_scanbracket | ( | const char * | s, |
char | ip[16] | ||
) |