* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
#include "addrtoname.h"
#include "ethertype.h"
#include "extract.h"
}
u_int
-chdlc_print(netdissect_options *ndo, register const u_char *p, u_int length) {
+chdlc_print(netdissect_options *ndo, register const u_char *p, u_int length)
+{
u_int proto;
proto = EXTRACT_16BITS(&p[2]);
case ETHERTYPE_IP:
ip_print(ndo, p, length);
break;
-#ifdef INET6
case ETHERTYPE_IPV6:
ip6_print(ndo, p, length);
break;
-#endif
case CHDLC_TYPE_SLARP:
chdlc_slarp_print(ndo, p, length);
break;
if (length >= SLARP_MAX_LEN) { /* uptime-stamp is optional */
cp += SLARP_MIN_LEN;
- if (!ND_TTEST2(*cp, 4))
- goto trunc;
+ ND_TCHECK2(*cp, 4);
sec = EXTRACT_32BITS(cp) / 1000;
min = sec / 60; sec -= min * 60;
hrs = min / 60; min -= hrs * 60;