![]() |
s/qmail
3.3.23
Next generation secure email transport
|
IPv4 functions: ip4_fmt, ip4_scan, ip4_scanbracket IPv6 functions: ip6_fmt, ip6_scan, ip6_scanbracket conversion functions: ip4_bitstring, ip6_bitstring, intfromhex. More...
#include "fmt.h"
#include "scan.h"
#include "ip.h"
#include "byte.h"
#include "str.h"
#include "stralloc.h"
Go to the source code of this file.
Functions | |
unsigned int | ip4_fmt (char *s, struct ip_address *ip) |
ip4_fmt converts IPv4 address to dotted decimal string format More... | |
unsigned int | ip4_scan (struct ip_address *ip, char *s) |
ip4_scan parse IPv4 address string and convert to ip_address More... | |
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 More... | |
unsigned int | ip6_fmt (char *s, struct ip6_address *ip) |
ip6_fmt convert IPv6 address to compactified IPv6 address string More... | |
unsigned int | ip6_scan (struct ip6_address *ip, char *s) |
ip6_scan parse compactified IPv6 address string and convert to ip6_address struct More... | |
unsigned int | ip6_scanbracket (struct ip6_address *ip6, char *s) |
ip6_scanbracket parse IPv6 string address enclosed in brackets 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 More... | |
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 More... | |
IPv4 functions: ip4_fmt, ip4_scan, ip4_scanbracket IPv6 functions: ip6_fmt, ip6_scan, ip6_scanbracket conversion functions: ip4_bitstring, ip6_bitstring, intfromhex.
Definition in file ip.c.
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
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.