![]() |
s/qmail
3.3.23
Next generation secure email transport
|
Go to the source code of this file.
Data Structures | |
struct | ip_address |
struct | ip6_address |
Macros | |
#define | IPFMT 40 |
#define | V4MAPPREFIX "::ffff:" |
#define | HOSTNAMELEN 1025 |
Functions | |
unsigned int | ip4_fmt (char *, struct ip_address *) |
ip4_fmt converts IPv4 address to dotted decimal string format More... | |
unsigned int | ip4_scan (struct ip_address *, char *) |
ip4_scan parse IPv4 address string and convert to ip_address More... | |
unsigned int | ip4_scanbracket (struct ip_address *, char *) |
ip4_scanbracket parse IPv4 address string enclosed in brackets and convert to ip_address struct More... | |
unsigned int | ip4_bitstring (stralloc *, struct ip_address *, int) |
ip4_bitstring parse IPv4 address and represent as char string with length prefix More... | |
unsigned int | ip6_fmt (char *, struct ip6_address *) |
ip6_fmt convert IPv6 address to compactified IPv6 address string More... | |
unsigned int | ip6_scan (struct ip6_address *, char *) |
ip6_scan parse compactified IPv6 address string and convert to ip6_address struct More... | |
unsigned int | ip6_scanbracket (struct ip6_address *, char *) |
ip6_scanbracket parse IPv6 string address enclosed in brackets More... | |
unsigned int | ip6_bitstring (stralloc *, struct ip6_address *, int) |
ip6_bitstring parse IPv6 address and represent as char string with length prefix More... | |
unsigned int ip4_bitstring | ( | stralloc * | ip4string, |
struct ip_address * | ip4, | ||
int | prefix | ||
) |
ip4_bitstring parse IPv4 address and represent as char string with length prefix
input | pointer to struct IPv4 address, prefix length output: pointer to stralloc bitstring |
Definition at line 293 of file ip.c.
unsigned int ip4_fmt | ( | char * | s, |
struct ip_address * | ip | ||
) |
ip4_fmt converts IPv4 address to dotted decimal string format
input | pointer to IPv4 ip_address struct output: pointer to IPv4 address string |
Definition at line 23 of file ip.c.
unsigned int ip4_scan | ( | struct ip_address * | ip, |
char * | s | ||
) |
ip4_scan parse IPv4 address string and convert to ip_address
input | pointer to IPv4 address string output: pointer to IPv4 ip_address struct |
Definition at line 47 of file ip.c.
unsigned int ip4_scanbracket | ( | struct ip_address * | ip, |
char * | s | ||
) |
ip4_scanbracket parse IPv4 address string enclosed in brackets and convert to ip_address struct
input | pointer to IPv4 address string output: pointer to IPv4 ip_address struct |
Definition at line 72 of file ip.c.
unsigned int ip6_bitstring | ( | stralloc * | ip6string, |
struct ip6_address * | ip6, | ||
int | prefix | ||
) |
ip6_bitstring parse IPv6 address and represent as char string with length prefix
input | pointer to struct IPv6 address, prefix length output: pointer to stralloc bit string; |
Definition at line 332 of file ip.c.
unsigned int ip6_fmt | ( | char * | s, |
struct ip6_address * | ip | ||
) |
ip6_fmt convert IPv6 address to compactified IPv6 address string
Compactified IPv6 addresses are really ugly to parse. Syntax: (h = hex digit) [RFC 5952]
Flat ip6 address syntax: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh (32 hex digits)
struct ip6_address format: cccccccccccccccc (16 chars; d[16]) – each char swallows two hex values
Bitstring representation with length prefix: bbbbbbb.........bbbb (max 128 bits); stralloc(ip6string); b = 0 || 1
input | pointer to IPv6 ip6_address struct output: pointer to IPv6 address string |
Definition at line 91 of file ip.c.
unsigned int ip6_scan | ( | struct ip6_address * | ip, |
char * | s | ||
) |
ip6_scan parse compactified IPv6 address string and convert to ip6_address struct
input | pointer to IPv6 address string output: pointer to ip6_address struct |
Definition at line 160 of file ip.c.
unsigned int ip6_scanbracket | ( | struct ip6_address * | ip6, |
char * | s | ||
) |
ip6_scanbracket parse IPv6 string address enclosed in brackets
input | pointer to IPv6 address string output: pointer to IPv6 address struct |
Definition at line 264 of file ip.c.