diff options
author | John Denker <jsd@av8n.com> | 2012-07-29 15:45:38 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-07-29 15:45:38 -0700 |
commit | 0d2205555e68f414eec0afa8a6531626f77c4a57 (patch) | |
tree | f0e7d3e161f82180e834a6368d41b79272ab013a /ucspi-tcp-0.88/ip6.h | |
parent | 0c7195dea3482bd4c9ac9fbff318c24c502574c6 (diff) | |
parent | 01ef1d365e5776b130e8b65772a80b6adcb0ed46 (diff) |
Merge branch 'master' of ephedra:usr/src/qmail into e_master
Diffstat (limited to 'ucspi-tcp-0.88/ip6.h')
-rw-r--r-- | ucspi-tcp-0.88/ip6.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ucspi-tcp-0.88/ip6.h b/ucspi-tcp-0.88/ip6.h new file mode 100644 index 0000000..88ff120 --- /dev/null +++ b/ucspi-tcp-0.88/ip6.h @@ -0,0 +1,28 @@ +#ifndef IP6_H +#define IP6_H + +#include "byte.h" + +extern unsigned int scan_ip6(const char *src,char *ip); +extern unsigned int fmt_ip6(char *dest,const char *ip); + +extern unsigned int scan_ip6_flat(const char *src,char *); +extern unsigned int fmt_ip6_flat(char *dest,const char *); + +/* + ip6 address syntax: (h = hex digit), no leading '0' required + 1. hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh + 2. any number of 0000 may be abbreviated as "::", but only once + flat ip6 address syntax: + hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh + */ + +#define IP6_FMT 40 + +extern const unsigned char V4mappedprefix[12]; /*={0,0,0,0,0,0,0,0,0,0,0xff,0xff}; */ +extern const unsigned char V6loopback[16]; /*={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}; */ +extern const unsigned char V6any[16]; /*={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; */ + +#define ip6_isv4mapped(ip) (byte_equal(ip,12,V4mappedprefix)) + +#endif |