Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/tcpdump/print-ip6.c
Show All 20 Lines | |||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#define NETDISSECT_REWORKED | #define NETDISSECT_REWORKED | ||||
#ifdef HAVE_CONFIG_H | #ifdef HAVE_CONFIG_H | ||||
#include "config.h" | #include "config.h" | ||||
#endif | #endif | ||||
#ifdef INET6 | |||||
#include <tcpdump-stdinc.h> | #include <tcpdump-stdinc.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include "interface.h" | #include "interface.h" | ||||
#include "addrtoname.h" | #include "addrtoname.h" | ||||
#include "extract.h" | #include "extract.h" | ||||
#ifdef INET6 | |||||
#include "ip6.h" | #include "ip6.h" | ||||
#include "ipproto.h" | #include "ipproto.h" | ||||
/* | /* | ||||
* Compute a V6-style checksum by building a pseudoheader. | * Compute a V6-style checksum by building a pseudoheader. | ||||
*/ | */ | ||||
int | int | ||||
nextproto6_cksum(const struct ip6_hdr *ip6, const uint8_t *data, | nextproto6_cksum(const struct ip6_hdr *ip6, const uint8_t *data, | ||||
▲ Show 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | default: | ||||
ND_PRINT((ndo, "ip-proto-%d %d", nh, len)); | ND_PRINT((ndo, "ip-proto-%d %d", nh, len)); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
return; | return; | ||||
trunc: | trunc: | ||||
ND_PRINT((ndo, "[|ip6]")); | ND_PRINT((ndo, "[|ip6]")); | ||||
} | |||||
#else /* INET6 */ | |||||
void | |||||
ip6_print(netdissect_options *ndo, const u_char *bp _U_, u_int length) | |||||
{ | |||||
ND_PRINT((ndo, "IP6, length: %u (printing not supported)", length)); | |||||
} | } | ||||
#endif /* INET6 */ | #endif /* INET6 */ |