From c44d8b51ffb5a413f8bbdbd9991bbc573853e397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henryk=20Pl=C3=B6tz?= Date: Fri, 3 Oct 2014 20:04:14 +0200 Subject: Apply patch djbdns-1.05-test27.diff.bz2 Source was http://www.fefe.de/dns/djbdns-1.05-test27.diff.bz2, SHA1 f0380ec1866f49c0bcf6369a923ac0a4a5095da8 --- ip6.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ip6.h (limited to 'ip6.h') diff --git a/ip6.h b/ip6.h new file mode 100644 index 0000000..f8576cf --- /dev/null +++ b/ip6.h @@ -0,0 +1,28 @@ +#ifndef IP6_H +#define IP6_H + +extern unsigned int ip6_scan(const char *,char *); +extern unsigned int ip6_fmt(char *,const char *); + +extern unsigned int ip6_scan_flat(const char *,char *); +extern unsigned int ip6_fmt_flat(char *,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 + +const static unsigned char V4mappedprefix[12]={0,0,0,0,0,0,0,0,0,0,0xff,0xff}; +const static unsigned char V6loopback[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}; +const static 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)) + +const static char ip4loopback[4] = {127,0,0,1}; + +#endif -- cgit v1.2.3