diff options
author | itojun <itojun> | 1999-10-30 05:11:06 +0000 |
---|---|---|
committer | itojun <itojun> | 1999-10-30 05:11:06 +0000 |
commit | c9d84d15c5c4dc8eca7594101fe5026080ed641e (patch) | |
tree | 79e5976a7e801dfa189fd653936ab06481654f91 /print-domain.c | |
parent | ce751501abbddbe91d683d13b5cd845a5d551d8f (diff) | |
download | tcpdump-c9d84d15c5c4dc8eca7594101fe5026080ed641e.tar.gz |
Bring in KAME IPv6 tcpdump. replaces esp/ah/isakmp decoder.
Hope I did not break anything. Portability on IPv4-only node needs checking,
I'll do this very soon. (sorry for rather jumbo commit)
XXx what is _FAVOR_BSD?
Diffstat (limited to 'print-domain.c')
-rw-r--r-- | print-domain.c | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/print-domain.c b/print-domain.c index 498e9bc8..e251df88 100644 --- a/print-domain.c +++ b/print-domain.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.40 1999-10-17 21:37:11 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.41 1999-10-30 05:11:12 itojun Exp $ (LBL)"; #endif #include <sys/param.h> @@ -38,7 +38,9 @@ struct rtentry; #include <netinet/if_ether.h> #include <netinet/in_systm.h> #include <netinet/ip.h> +#include <netinet/ip_var.h> #include <netinet/udp.h> +#include <netinet/udp_var.h> #include <netinet/tcp.h> #ifdef NOERROR @@ -50,6 +52,7 @@ struct rtentry; #include <arpa/nameser.h> #include <stdio.h> +#include <string.h> #include "interface.h" #include "addrtoname.h" @@ -98,6 +101,27 @@ struct rtentry; #ifndef T_LOC #define T_LOC 29 /* Location Information */ #endif +#ifndef T_NXT +#define T_NXT 30 /* Next Valid Name in Zone */ +#endif +#ifndef T_EID +#define T_EID 31 /* Endpoint identifier */ +#endif +#ifndef T_NIMLOC +#define T_NIMLOC 32 /* Nimrod locator */ +#endif +#ifndef T_SRV +#define T_SRV 33 /* Server selection */ +#endif +#ifndef T_ATMA +#define T_ATMA 34 /* ATM Address */ +#endif +#ifndef T_NAPTR +#define T_NAPTR 35 /* Naming Authority PoinTeR */ +#endif +#ifndef T_A6 +#define T_A6 38 /* IP6 address (ipngwg-dns-lookups) */ +#endif #ifndef T_UNSPEC #define T_UNSPEC 103 /* Unspecified format (binary data) */ @@ -216,7 +240,14 @@ static struct tok type2str[] = { { T_PX, "PX" }, { T_GPOS, "GPOS" }, { T_AAAA, "AAAA" }, - { T_LOC , "LOC " }, + { T_LOC, "LOC " }, + { T_NXT, "NXT " }, + { T_EID, "EID " }, + { T_NIMLOC, "NIMLOC " }, + { T_SRV, "SRV " }, + { T_ATMA, "ATMA " }, + { T_NAPTR, "NAPTR " }, + { T_A6, "A6 " }, #ifndef T_UINFO #define T_UINFO 100 #endif @@ -314,6 +345,9 @@ ns_rprint(register const u_char *cp, register const u_char *bp) case T_NS: case T_CNAME: case T_PTR: +#ifdef T_DNAME + case T_DNAME: /*XXX not checked as there's no server support yet*/ +#endif putchar(' '); (void)ns_nprint(cp, bp); break; @@ -329,6 +363,25 @@ ns_rprint(register const u_char *cp, register const u_char *bp) (void)ns_cprint(cp, bp); break; +#ifdef INET6 + case T_AAAA: + printf(" %s", ip6addr_string(cp)); + break; + + case T_A6: /*XXX not checked as there's no server support yet*/ + { + struct in6_addr a; + int pbyte; + + pbyte = (*cp + 7) / 8; + memset(&a, 0, sizeof(a)); + memcpy(&a, cp + 1, pbyte); + printf(" %u %s ", *cp, ip6addr_string(&a)); + (void)ns_nprint(cp + 1 + pbyte, bp); + break; + } +#endif /*INET6*/ + case T_UNSPECA: /* One long string */ printf(" %.*s", len, cp); break; |