netdissect.h revision 146773
1146773Ssam/* 2146773Ssam * Copyright (c) 1988-1997 3146773Ssam * The Regents of the University of California. All rights reserved. 4146773Ssam * 5146773Ssam * Copyright (c) 1998-2004 Michael Richardson <mcr@tcpdump.org> 6146773Ssam * The TCPDUMP project 7146773Ssam * 8146773Ssam * Redistribution and use in source and binary forms, with or without 9146773Ssam * modification, are permitted provided that: (1) source code distributions 10146773Ssam * retain the above copyright notice and this paragraph in its entirety, (2) 11146773Ssam * distributions including binary code include the above copyright notice and 12146773Ssam * this paragraph in its entirety in the documentation or other materials 13146773Ssam * provided with the distribution, and (3) all advertising materials mentioning 14146773Ssam * features or use of this software display the following acknowledgement: 15146773Ssam * ``This product includes software developed by the University of California, 16146773Ssam * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 17146773Ssam * the University nor the names of its contributors may be used to endorse 18146773Ssam * or promote products derived from this software without specific prior 19146773Ssam * written permission. 20146773Ssam * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 21146773Ssam * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 22146773Ssam * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 23146773Ssam * 24146773Ssam * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.16 2005/04/07 00:28:17 mcr Exp $ (LBL) 25146773Ssam */ 26146773Ssam 27146773Ssam#ifndef netdissect_h 28146773Ssam#define netdissect_h 29146773Ssam 30146773Ssam#ifdef HAVE_OS_PROTO_H 31146773Ssam#include "os-proto.h" 32146773Ssam#endif 33146773Ssam#include <sys/types.h> 34146773Ssam 35146773Ssam#ifndef HAVE___ATTRIBUTE__ 36146773Ssam#define __attribute__(x) 37146773Ssam#endif 38146773Ssam 39146773Ssam/* snprintf et al */ 40146773Ssam 41146773Ssam#include <stdarg.h> 42146773Ssam 43146773Ssam#if !defined(HAVE_SNPRINTF) 44146773Ssamint snprintf (char *str, size_t sz, const char *format, ...) 45146773Ssam __attribute__ ((format (printf, 3, 4))); 46146773Ssam#endif 47146773Ssam 48146773Ssam#if !defined(HAVE_VSNPRINTF) 49146773Ssamint vsnprintf (char *str, size_t sz, const char *format, va_list ap) 50146773Ssam __attribute__((format (printf, 3, 0))); 51146773Ssam#endif 52146773Ssam 53146773Ssam#ifndef HAVE_STRLCAT 54146773Ssamextern size_t strlcat (char *, const char *, size_t); 55146773Ssam#endif 56146773Ssam#ifndef HAVE_STRLCPY 57146773Ssamextern size_t strlcpy (char *, const char *, size_t); 58146773Ssam#endif 59146773Ssam 60146773Ssam#ifndef HAVE_STRDUP 61146773Ssamextern char *strdup (const char *str); 62146773Ssam#endif 63146773Ssam 64146773Ssam#ifndef HAVE_STRSEP 65146773Ssamextern char *strsep(char **, const char *); 66146773Ssam#endif 67146773Ssam 68146773Ssamstruct tok { 69146773Ssam int v; /* value */ 70146773Ssam const char *s; /* string */ 71146773Ssam}; 72146773Ssam 73146773Ssam#define TOKBUFSIZE 128 74146773Ssamextern const char *tok2strbuf(const struct tok *, const char *, int, 75146773Ssam char *buf, size_t bufsize); 76146773Ssam 77146773Ssam/* tok2str is deprecated */ 78146773Ssamextern const char *tok2str(const struct tok *, const char *, int); 79146773Ssamextern char *bittok2str(const struct tok *, const char *, int); 80146773Ssam 81146773Ssam 82146773Ssamtypedef struct netdissect_options netdissect_options; 83146773Ssam 84146773Ssamstruct netdissect_options { 85146773Ssam int ndo_aflag; /* translate network and broadcast addresses */ 86146773Ssam int ndo_eflag; /* print ethernet header */ 87146773Ssam int ndo_fflag; /* don't translate "foreign" IP address */ 88146773Ssam int ndo_nflag; /* leave addresses as numbers */ 89146773Ssam int ndo_Nflag; /* remove domains from printed host names */ 90146773Ssam int ndo_qflag; /* quick (shorter) output */ 91146773Ssam int ndo_Rflag; /* print sequence # field in AH/ESP*/ 92146773Ssam int ndo_sflag; /* use the libsmi to translate OIDs */ 93146773Ssam int ndo_Sflag; /* print raw TCP sequence numbers */ 94146773Ssam int ndo_tflag; /* print packet arrival time */ 95146773Ssam int ndo_Uflag; /* "unbuffered" output of dump files */ 96146773Ssam int ndo_uflag; /* Print undecoded NFS handles */ 97146773Ssam int ndo_vflag; /* verbose */ 98146773Ssam int ndo_xflag; /* print packet in hex */ 99146773Ssam int ndo_Xflag; /* print packet in hex/ascii */ 100146773Ssam int ndo_Aflag; /* print packet only in ascii observing TAB, 101146773Ssam * LF, CR and SPACE as graphical chars 102146773Ssam */ 103146773Ssam int ndo_Oflag; /* run filter code optimizer */ 104146773Ssam int ndo_dlt; /* if != -1, ask libpcap for the DLT it names*/ 105146773Ssam int ndo_pflag; /* don't go promiscuous */ 106146773Ssam 107146773Ssam int ndo_Cflag; /* rotate dump files after this many bytes */ 108146773Ssam int ndo_Cflag_count; /* Keep track of which file number we're writing */ 109146773Ssam int ndo_Wflag; /* recycle output files after this number of files */ 110146773Ssam int ndo_WflagChars; 111146773Ssam const char *ndo_dltname; 112146773Ssam 113146773Ssam char *ndo_espsecret; 114146773Ssam struct sa_list *ndo_sa_list_head; /* used by print-esp.c */ 115146773Ssam struct sa_list *ndo_sa_default; 116146773Ssam 117146773Ssam char *ndo_tcpmd5secret; /* TCP-MD5 secret key */ 118146773Ssam 119146773Ssam struct esp_algorithm *ndo_espsecret_xform; /* cache of decoded */ 120146773Ssam char *ndo_espsecret_key; 121146773Ssam 122146773Ssam int ndo_packettype; /* as specified by -T */ 123146773Ssam 124146773Ssam char *ndo_program_name; /*used to generate self-identifying messages */ 125146773Ssam 126146773Ssam int32_t ndo_thiszone; /* seconds offset from gmt to local time */ 127146773Ssam 128146773Ssam int ndo_snaplen; 129146773Ssam 130146773Ssam /*global pointers to beginning and end of current packet (during printing) */ 131146773Ssam const u_char *ndo_packetp; 132146773Ssam const u_char *ndo_snapend; 133146773Ssam 134146773Ssam /* bookkeeping for ^T output */ 135146773Ssam int ndo_infodelay; 136146773Ssam 137146773Ssam /* pointer to void function to output stuff */ 138146773Ssam void (*ndo_default_print)(netdissect_options *, 139146773Ssam register const u_char *bp, register u_int length); 140146773Ssam void (*ndo_info)(netdissect_options *, int verbose); 141146773Ssam 142146773Ssam int (*ndo_printf)(netdissect_options *, 143146773Ssam const char *fmt, ...); 144146773Ssam void (*ndo_error)(netdissect_options *, 145146773Ssam const char *fmt, ...); 146146773Ssam void (*ndo_warning)(netdissect_options *, 147146773Ssam const char *fmt, ...); 148146773Ssam}; 149146773Ssam 150146773Ssam#define PT_VAT 1 /* Visual Audio Tool */ 151146773Ssam#define PT_WB 2 /* distributed White Board */ 152146773Ssam#define PT_RPC 3 /* Remote Procedure Call */ 153146773Ssam#define PT_RTP 4 /* Real-Time Applications protocol */ 154146773Ssam#define PT_RTCP 5 /* Real-Time Applications control protocol */ 155146773Ssam#define PT_SNMP 6 /* Simple Network Management Protocol */ 156146773Ssam#define PT_CNFP 7 /* Cisco NetFlow protocol */ 157146773Ssam 158146773Ssam#ifndef min 159146773Ssam#define min(a,b) ((a)>(b)?(b):(a)) 160146773Ssam#endif 161146773Ssam#ifndef max 162146773Ssam#define max(a,b) ((b)>(a)?(b):(a)) 163146773Ssam#endif 164146773Ssam 165146773Ssam#ifndef INET6 166146773Ssam/* 167146773Ssam * The default snapshot length. This value allows most printers to print 168146773Ssam * useful information while keeping the amount of unwanted data down. 169146773Ssam * In particular, it allows for an ethernet header, tcp/ip header, and 170146773Ssam * 14 bytes of data (assuming no ip options). 171146773Ssam */ 172146773Ssam#define DEFAULT_SNAPLEN 68 173146773Ssam#else 174146773Ssam#define DEFAULT_SNAPLEN 96 175146773Ssam#endif 176146773Ssam 177146773Ssam#ifndef BIG_ENDIAN 178146773Ssam#define BIG_ENDIAN 4321 179146773Ssam#define LITTLE_ENDIAN 1234 180146773Ssam#endif 181146773Ssam 182146773Ssam#define ESRC(ep) ((ep)->ether_shost) 183146773Ssam#define EDST(ep) ((ep)->ether_dhost) 184146773Ssam 185146773Ssam#ifndef NTOHL 186146773Ssam#define NTOHL(x) (x) = ntohl(x) 187146773Ssam#define NTOHS(x) (x) = ntohs(x) 188146773Ssam#define HTONL(x) (x) = htonl(x) 189146773Ssam#define HTONS(x) (x) = htons(x) 190146773Ssam#endif 191146773Ssam 192146773Ssam/* 193146773Ssam * True if "l" bytes of "var" were captured. 194146773Ssam * 195146773Ssam * The "ndo->ndo_snapend - (l) <= ndo->ndo_snapend" checks to make sure 196146773Ssam * "l" isn't so large that "ndo->ndo_snapend - (l)" underflows. 197146773Ssam * 198146773Ssam * The check is for <= rather than < because "l" might be 0. 199146773Ssam */ 200146773Ssam#define ND_TTEST2(var, l) (ndo->ndo_snapend - (l) <= ndo->ndo_snapend && \ 201146773Ssam (const u_char *)&(var) <= ndo->ndo_snapend - (l)) 202146773Ssam 203146773Ssam/* True if "var" was captured */ 204146773Ssam#define ND_TTEST(var) ND_TTEST2(var, sizeof(var)) 205146773Ssam 206146773Ssam/* Bail if "l" bytes of "var" were not captured */ 207146773Ssam#define ND_TCHECK2(var, l) if (!ND_TTEST2(var, l)) goto trunc 208146773Ssam 209146773Ssam/* Bail if "var" was not captured */ 210146773Ssam#define ND_TCHECK(var) ND_TCHECK2(var, sizeof(var)) 211146773Ssam 212146773Ssam#define ND_PRINT(STUFF) (*ndo->ndo_printf)STUFF 213146773Ssam#define ND_DEFAULTPRINT(ap, length) (*ndo->ndo_default_print)(ndo, ap, length) 214146773Ssam 215146773Ssam#if 0 216146773Ssamextern void ts_print(netdissect_options *ipdo, 217146773Ssam const struct timeval *); 218146773Ssamextern void relts_print(int); 219146773Ssam#endif 220146773Ssam 221146773Ssamextern int fn_print(const u_char *, const u_char *); 222146773Ssamextern int fn_printn(const u_char *, u_int, const u_char *); 223146773Ssamextern const char *tok2str(const struct tok *, const char *, int); 224146773Ssam 225146773Ssamextern void wrapup(int); 226146773Ssam 227146773Ssam#if 0 228146773Ssamextern char *read_infile(netdissect_options *, char *); 229146773Ssamextern char *copy_argv(netdissect_options *, char **); 230146773Ssam#endif 231146773Ssam 232146773Ssamextern void safeputchar(int); 233146773Ssamextern void safeputs(const char *); 234146773Ssam 235146773Ssam#if 0 236146773Ssamextern const char *isonsap_string(netdissect_options *, const u_char *); 237146773Ssamextern const char *llcsap_string(netdissect_options *, u_char); 238146773Ssamextern const char *protoid_string(netdissect_options *, const u_char *); 239146773Ssamextern const char *dnname_string(netdissect_options *, u_short); 240146773Ssamextern const char *dnnum_string(netdissect_options *, u_short); 241146773Ssam#endif 242146773Ssam 243146773Ssam/* The printer routines. */ 244146773Ssam 245146773Ssam#include <pcap.h> 246146773Ssam 247146773Ssam 248146773Ssamextern void eap_print(netdissect_options *,const u_char *, u_int); 249146773Ssamextern int esp_print(netdissect_options *, 250146773Ssam register const u_char *bp, int len, register const u_char *bp2, 251146773Ssam int *nhdr, int *padlen); 252146773Ssamextern void arp_print(netdissect_options *,const u_char *, u_int, u_int); 253146773Ssamextern void isakmp_print(netdissect_options *,const u_char *, 254146773Ssam u_int, const u_char *); 255146773Ssamextern void isakmp_rfc3948_print(netdissect_options *,const u_char *, 256146773Ssam u_int, const u_char *); 257146773Ssamextern void ip_print(netdissect_options *,const u_char *, u_int); 258146773Ssamextern void ip_print_inner(netdissect_options *ndo, 259146773Ssam const u_char *bp, u_int length, u_int nh, 260146773Ssam const u_char *bp2); 261146773Ssam 262146773Ssam/* stuff that has not yet been rototiled */ 263146773Ssam#if 0 264146773Ssamextern void ascii_print_with_offset(netdissect_options *, const char *, 265146773Ssam u_int, u_int); 266146773Ssamextern void ascii_print(netdissect_options *,const char *, u_int); 267146773Ssamextern void hex_print_with_offset(netdissect_options *,const char *, 268146773Ssam u_int, u_int); 269146773Ssamextern void telnet_print(netdissect_options *,const u_char *, u_int); 270146773Ssamextern void hex_print(netdissect_options *,const char *, u_int); 271146773Ssamextern int ether_encap_print(netdissect_options *,u_short, const u_char *, 272146773Ssam u_int, u_int, u_short *); 273146773Ssamextern int llc_print(netdissect_options *, 274146773Ssam const u_char *, u_int, u_int, const u_char *, 275146773Ssam const u_char *, u_short *); 276146773Ssamextern void aarp_print(netdissect_options *,const u_char *, u_int); 277146773Ssamextern void atalk_print(netdissect_options *,const u_char *, u_int); 278146773Ssamextern void atm_if_print(u_char *,const struct pcap_pkthdr *, const u_char *); 279146773Ssamextern void bootp_print(netdissect_options *,const u_char *, 280146773Ssam u_int, u_short, u_short); 281146773Ssamextern void bgp_print(netdissect_options *,const u_char *, int); 282146773Ssamextern void bxxp_print(netdissect_options *,const u_char *, u_int); 283146773Ssamextern void chdlc_if_print(u_char *user, const struct pcap_pkthdr *h, 284146773Ssam register const u_char *p); 285146773Ssamextern void chdlc_print(netdissect_options *ndo, 286146773Ssam register const u_char *p, u_int length, u_int caplen); 287146773Ssamextern void cisco_autorp_print(netdissect_options *, 288146773Ssam const u_char *, u_int); 289146773Ssamextern void cnfp_print(netdissect_options *,const u_char *cp, 290146773Ssam u_int len, const u_char *bp); 291146773Ssamextern void decnet_print(netdissect_options *,const u_char *, 292146773Ssam u_int, u_int); 293146773Ssamextern void default_print(netdissect_options *,const u_char *, u_int); 294146773Ssamextern void dvmrp_print(netdissect_options *,const u_char *, u_int); 295146773Ssamextern void egp_print(netdissect_options *,const u_char *, u_int, 296146773Ssam const u_char *); 297146773Ssam 298146773Ssamextern void arcnet_if_print(u_char*,const struct pcap_pkthdr *,const u_char *); 299146773Ssamextern void ether_if_print(u_char *,const struct pcap_pkthdr *,const u_char *); 300146773Ssamextern void token_if_print(u_char *,const struct pcap_pkthdr *,const u_char *); 301146773Ssamextern void fddi_if_print(u_char *,const struct pcap_pkthdr *, const u_char *); 302146773Ssam 303146773Ssamextern void gre_print(netdissect_options *,const u_char *, u_int); 304146773Ssamextern void icmp_print(netdissect_options *,const u_char *, u_int, 305146773Ssam const u_char *); 306146773Ssamextern void hsrp_print(netdissect_options *ndo, 307146773Ssam register const u_char *bp, register u_int len); 308146773Ssamextern void ieee802_11_if_print(u_char *,const struct pcap_pkthdr *, const u_char *); 309146773Ssamextern void igmp_print(netdissect_options *, 310146773Ssam register const u_char *, u_int); 311146773Ssamextern void igrp_print(netdissect_options *,const u_char *, u_int, 312146773Ssam const u_char *); 313146773Ssamextern void ipN_print(netdissect_options *,const u_char *, u_int); 314146773Ssamextern void ipx_print(netdissect_options *,const u_char *, u_int); 315146773Ssamextern void isoclns_print(netdissect_options *,const u_char *, 316146773Ssam u_int, u_int, const u_char *, const u_char *); 317146773Ssamextern void krb_print(netdissect_options *,const u_char *, u_int); 318146773Ssamextern void llap_print(netdissect_options *,const u_char *, u_int); 319146773Ssamextern const char *linkaddr_string(netdissect_options *ndo, 320146773Ssam const u_char *ep, const unsigned int len); 321146773Ssamextern void ltalk_if_print(netdissect_options *ndo, 322146773Ssam u_char *user, const struct pcap_pkthdr *h, 323146773Ssam const u_char *p); 324146773Ssamextern void mpls_print(netdissect_options *ndo, 325146773Ssam const u_char *bp, u_int length); 326146773Ssamextern void msdp_print(netdissect_options *ndo, 327146773Ssam const unsigned char *sp, u_int length); 328146773Ssamextern void nfsreply_print(netdissect_options *,const u_char *, 329146773Ssam u_int, const u_char *); 330146773Ssamextern void nfsreq_print(netdissect_options *,const u_char *, 331146773Ssam u_int, const u_char *); 332146773Ssamextern void ns_print(netdissect_options *,const u_char *, u_int); 333146773Ssamextern void ntp_print(netdissect_options *,const u_char *, u_int); 334146773Ssamextern void null_if_print(u_char *,const struct pcap_pkthdr *, const u_char *); 335146773Ssamextern void ospf_print(netdissect_options *,const u_char *, 336146773Ssam u_int, const u_char *); 337146773Ssamextern void pimv1_print(netdissect_options *,const u_char *, u_int); 338146773Ssamextern void mobile_print(netdissect_options *,const u_char *, u_int); 339146773Ssamextern void pim_print(netdissect_options *,const u_char *, u_int); 340146773Ssamextern void pppoe_if_print(u_char *,const struct pcap_pkthdr *, const u_char *); 341146773Ssamextern void pppoe_print(netdissect_options *,const u_char *, u_int); 342146773Ssamextern void ppp_print(netdissect_options *, 343146773Ssam register const u_char *, u_int); 344146773Ssam 345146773Ssamextern void ppp_if_print(u_char *,const struct pcap_pkthdr *, const u_char *); 346146773Ssamextern void ppp_hdlc_if_print(u_char *, 347146773Ssam const struct pcap_pkthdr *, const u_char *); 348146773Ssamextern void ppp_bsdos_if_print(u_char *, 349146773Ssam const struct pcap_pkthdr *, const u_char *); 350146773Ssam 351146773Ssamextern int vjc_print(netdissect_options *,register const char *, 352146773Ssam register u_int, u_short); 353146773Ssam 354146773Ssamextern void raw_if_print(u_char *, 355146773Ssam const struct pcap_pkthdr *, const u_char *); 356146773Ssam 357146773Ssamextern void rip_print(netdissect_options *,const u_char *, u_int); 358146773Ssam 359146773Ssamextern void sctp_print(netdissect_options *ndo, 360146773Ssam const u_char *bp, const u_char *bp2, 361146773Ssam u_int sctpPacketLength); 362146773Ssam 363146773Ssamextern void sl_if_print(u_char *,const struct pcap_pkthdr *, const u_char *); 364146773Ssam 365146773Ssamextern void lane_if_print(u_char *,const struct pcap_pkthdr *,const u_char *); 366146773Ssamextern void cip_if_print(u_char *,const struct pcap_pkthdr *,const u_char *); 367146773Ssamextern void sl_bsdos_if_print(u_char *, 368146773Ssam const struct pcap_pkthdr *, const u_char *); 369146773Ssamextern void sll_if_print(u_char *, 370146773Ssam const struct pcap_pkthdr *, const u_char *); 371146773Ssam 372146773Ssamextern void snmp_print(netdissect_options *,const u_char *, u_int); 373146773Ssamextern void sunrpcrequest_print(netdissect_options *,const u_char *, 374146773Ssam u_int, const u_char *); 375146773Ssamextern void tcp_print(netdissect_options *,const u_char *, u_int, 376146773Ssam const u_char *, int); 377146773Ssamextern void tftp_print(netdissect_options *,const u_char *, u_int); 378146773Ssamextern void timed_print(netdissect_options *,const u_char *, u_int); 379146773Ssamextern void udp_print(netdissect_options *,const u_char *, u_int, 380146773Ssam const u_char *, int); 381146773Ssamextern void wb_print(netdissect_options *,const void *, u_int); 382146773Ssamextern int ah_print(netdissect_options *,register const u_char *, 383146773Ssam register const u_char *); 384146773Ssamextern void esp_print_decodesecret(netdissect_options *ndo); 385146773Ssamextern int ipcomp_print(netdissect_options *,register const u_char *, 386146773Ssam register const u_char *, int *); 387146773Ssamextern void rx_print(netdissect_options *,register const u_char *, 388146773Ssam int, int, int, u_char *); 389146773Ssamextern void netbeui_print(netdissect_options *,u_short, 390146773Ssam const u_char *, int); 391146773Ssamextern void ipx_netbios_print(netdissect_options *,const u_char *, u_int); 392146773Ssamextern void nbt_tcp_print(netdissect_options *,const u_char *, int); 393146773Ssamextern void nbt_udp137_print(netdissect_options *, 394146773Ssam const u_char *data, int); 395146773Ssamextern void nbt_udp138_print(netdissect_options *, 396146773Ssam const u_char *data, int); 397146773Ssamextern char *smb_errstr(netdissect_options *,int, int); 398146773Ssamextern const char *nt_errstr(netdissect_options *, u_int32_t); 399146773Ssamextern void print_data(netdissect_options *,const unsigned char *, int); 400146773Ssamextern void l2tp_print(netdissect_options *,const u_char *, u_int); 401146773Ssamextern void lcp_print(netdissect_options *,const u_char *, u_int); 402146773Ssamextern void vrrp_print(netdissect_options *,const u_char *bp, 403146773Ssam u_int len, int ttl); 404146773Ssamextern void cdp_print(netdissect_options *,const u_char *, 405146773Ssam u_int, u_int, const u_char *, const u_char *); 406146773Ssamextern void stp_print(netdissect_options *,const u_char *p, u_int length); 407146773Ssamextern void radius_print(netdissect_options *,const u_char *, u_int); 408146773Ssamextern void lwres_print(netdissect_options *,const u_char *, u_int); 409146773Ssamextern void pptp_print(netdissect_options *,const u_char *, u_int); 410146773Ssam 411146773Ssam#ifdef INET6 412146773Ssamextern void ip6_print(netdissect_options *,const u_char *, u_int); 413146773Ssamextern void ip6_opt_print(netdissect_options *,const u_char *, int); 414146773Ssamextern int hbhopt_print(netdissect_options *,const u_char *); 415146773Ssamextern int dstopt_print(netdissect_options *,const u_char *); 416146773Ssamextern int frag6_print(netdissect_options *,const u_char *, 417146773Ssam const u_char *); 418146773Ssamextern void icmp6_print(netdissect_options *,const u_char *, 419146773Ssam const u_char *); 420146773Ssamextern void ripng_print(netdissect_options *,const u_char *, int); 421146773Ssamextern int rt6_print(netdissect_options *,const u_char *, const u_char *); 422146773Ssamextern void ospf6_print(netdissect_options *,const u_char *, u_int); 423146773Ssamextern void dhcp6_print(netdissect_options *,const u_char *, 424146773Ssam u_int, u_int16_t, u_int16_t); 425146773Ssam 426146773Ssamextern void zephyr_print(netdissect_options * ndo, 427146773Ssam const u_char *cp, int length); 428146773Ssam 429146773Ssam#endif /*INET6*/ 430146773Ssamextern u_short in_cksum(const u_short *, 431146773Ssam register u_int, int); 432146773Ssam 433146773Ssam#endif 434146773Ssam 435146773Ssam#endif /* netdissect_h */ 436