]> The Tcpdump Group git mirrors - tcpdump/blobdiff - interface.h
print-esp has been "NDO"-ized.
[tcpdump] / interface.h
index a9c9d2ea5d5aa87b778ca4935f58757b68c10ab7..5905a69159cfdcef5d6e1ff3a4428de6b4d0471f 100644 (file)
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.211 2003-05-11 06:01:16 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.227 2004-04-05 00:15:50 mcr Exp $ (LBL)
  */
 
 #ifndef tcpdump_interface_h
@@ -32,8 +32,6 @@
 #define __attribute__(x)
 #endif
 
-#define _U_    __attribute__((unused))
-
 /* snprintf et al */
 
 #include <stdarg.h>
@@ -63,30 +61,6 @@ extern char *strdup(const char *);
 extern char *strsep(char **, const char *);
 #endif
 
-struct tok {
-       int v;                  /* value */
-       const char *s;          /* string */
-};
-
-extern int aflag;              /* translate network and broadcast addresses */
-extern int dflag;              /* print filter code */
-extern int eflag;              /* print ethernet header */
-extern int fflag;              /* don't translate "foreign" IP address */
-extern int nflag;              /* leave addresses as numbers */
-extern int Nflag;              /* remove domains from printed host names */
-extern int qflag;              /* quick (shorter) output */
-extern int Rflag;              /* print sequence # field in AH/ESP*/
-extern int sflag;              /* use the libsmi to translate OIDs */
-extern int Sflag;              /* print raw TCP sequence numbers */
-extern int tflag;              /* print packet arrival time */
-extern int uflag;              /* Print undecoded NFS handles */
-extern int vflag;              /* verbose */
-extern int xflag;              /* print packet in hex */
-extern int Xflag;              /* print packet in hex/ascii */
-extern int Aflag;              /* print packet only in ascii observing TAB, LF, CR and SPACE as graphical chars */
-extern char *espsecret;
-
-extern int packettype;         /* as specified by -T */
 #define PT_VAT         1       /* Visual Audio Tool */
 #define PT_WB          2       /* distributed White Board */
 #define PT_RPC         3       /* Remote Procedure Call */
@@ -95,6 +69,7 @@ extern int packettype;                /* as specified by -T */
 #define PT_SNMP                6       /* Simple Network Management Protocol */
 #define PT_CNFP                7       /* Cisco NetFlow protocol */
 #define PT_TFTP                8       /* trivial file transfer protocol */
+#define PT_AODV                9       /* Ad-hoc On-demand Distance Vector Protocol */
 
 #ifndef min
 #define min(a,b) ((a)>(b)?(b):(a))
@@ -133,10 +108,6 @@ extern char *program_name; /* used to generate self-identifying messages */
 
 extern int32_t thiszone;       /* seconds offset from gmt to local time */
 
-extern int snaplen;
-/* global pointer to end of current packet (during printing) */
-extern const u_char *snapend;
-
 /*
  * True if  "l" bytes of "var" were captured.
  *
@@ -162,9 +133,7 @@ extern void relts_print(int);
 
 extern int fn_print(const u_char *, const u_char *);
 extern int fn_printn(const u_char *, u_int, const u_char *);
-extern const char *tok2str(const struct tok *, const char *, int);
 extern int mask2plen(u_int32_t);
-extern char *bittok2str(const struct tok *, const char *, int);
 extern const char *tok2strary_internal(const char **, int, const char *, int);
 #define        tok2strary(a,f,i) tok2strary_internal(a, sizeof(a)/sizeof(a[0]),f,i)
 
@@ -192,17 +161,18 @@ extern const char *dnnum_string(u_short);
 #include <pcap.h>
 
 extern int print_unknown_data(const u_char *, const char *,int);
-extern void ascii_print_with_offset(const u_char *, u_int, u_int);
-extern void ascii_print(const u_char *, u_int);
-extern void hex_print_with_offset(const u_char *, u_int, u_int);
+extern void ascii_print_with_offset(const u_char *, const u_char *, u_int, u_int);
+extern void ascii_print(const u_char *, const u_char *, u_int);
+extern void hex_print_with_offset(const u_char *, const u_char *, u_int, u_int);
 extern void telnet_print(const u_char *, u_int);
-extern void hex_print(const u_char *, u_int);
+extern void hex_print(const u_char *, const u_char *, u_int);
 extern int ether_encap_print(u_short, const u_char *, u_int, u_int, u_short *);
 extern int llc_print(const u_char *, u_int, u_int, const u_char *,
        const u_char *, u_short *);
 extern int snap_print(const u_char *, u_int, u_int, u_short *, u_int32_t,
        u_short, u_int);
 extern void aarp_print(const u_char *, u_int);
+extern void aodv_print(const u_char *, u_int, int);
 extern void arp_print(const u_char *, u_int, u_int);
 extern void atalk_print(const u_char *, u_int);
 extern void atm_print(u_int, u_int, u_int, const u_char *, u_int, u_int);
@@ -222,8 +192,7 @@ extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void ether_print(const u_char *, u_int, u_int);
-extern u_int ether_if_print(const struct pcap_pkthdr *,
-       const u_char *);
+extern u_int ether_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int token_print(const u_char *, u_int, u_int);
 extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void fddi_print(const u_char *, u_int, u_int);
@@ -232,23 +201,23 @@ extern u_int fr_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int ieee802_11_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *,
        const u_char *);
+extern u_int ap1394_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void gre_print(const u_char *, u_int);
-extern void icmp_print(const u_char *, u_int, const u_char *);
+extern void icmp_print(const u_char *, u_int, const u_char *, int);
 extern void igmp_print(const u_char *, u_int);
 extern void igrp_print(const u_char *, u_int, const u_char *);
 extern void ip_print(const u_char *, u_int);
 extern void ipN_print(const u_char *, u_int);
 extern u_int ipfc_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void ipx_print(const u_char *, u_int);
-extern void isoclns_print(const u_char *, u_int, u_int, const u_char *,
-       const u_char *);
+extern void isoclns_print(const u_char *, u_int, u_int);
 extern void krb_print(const u_char *);
 extern u_int llap_print(const u_char *, u_int);
 extern u_int ltalk_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void msdp_print(const unsigned char *, u_int);
 extern void nfsreply_print(const u_char *, u_int, const u_char *);
 extern void nfsreq_print(const u_char *, u_int, const u_char *);
-extern void ns_print(const u_char *, u_int);
+extern void ns_print(const u_char *, u_int, int);
 extern void ntp_print(const u_char *, u_int);
 extern u_int null_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void ospf_print(const u_char *, u_int, const u_char *);
@@ -277,13 +246,13 @@ extern u_int chdlc_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int sll_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void snmp_print(const u_char *, u_int);
 extern void sunrpcrequest_print(const u_char *, u_int, const u_char *);
+extern u_int symantec_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void tcp_print(const u_char *, u_int, const u_char *, int);
 extern void tftp_print(const u_char *, u_int);
 extern void timed_print(const u_char *);
 extern void udp_print(const u_char *, u_int, const u_char *, int);
 extern void wb_print(const void *, u_int);
 extern int ah_print(register const u_char *);
-extern int esp_print(register const u_char *, register const u_char *, int *, int *);
 extern void isakmp_print(const u_char *, u_int, const u_char *);
 extern int ipcomp_print(register const u_char *, int *);
 extern void rx_print(register const u_char *, int, int, int, u_char *);
@@ -306,6 +275,7 @@ extern void mpls_print(const u_char *, u_int);
 extern void mpls_lsp_ping_print(const u_char *, u_int);
 extern void zephyr_print(const u_char *, int);
 extern void hsrp_print(const u_char *, u_int);
+extern void bfd_print(const u_char *, u_int, u_int);
 
 #ifdef INET6
 extern void ip6_print(const u_char *, u_int);
@@ -314,11 +284,11 @@ extern int hbhopt_print(const u_char *);
 extern int dstopt_print(const u_char *);
 extern int frag6_print(const u_char *, const u_char *);
 extern int mobility_print(const u_char *, const u_char *);
-extern void icmp6_print(const u_char *, const u_char *, int);
+extern void icmp6_print(const u_char *, u_int, const u_char *, int);
 extern void ripng_print(const u_char *, unsigned int);
 extern int rt6_print(const u_char *, const u_char *);
 extern void ospf6_print(const u_char *, u_int);
-extern void dhcp6_print(const u_char *, u_int, u_int16_t, u_int16_t);
+extern void dhcp6_print(const u_char *, u_int);
 #endif /*INET6*/
 extern u_short in_cksum(const u_short *, register u_int, int);
 extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t);
@@ -327,4 +297,39 @@ extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t);
 struct bpf_program;
 
 extern void bpf_dump(struct bpf_program *, int);
+
 #endif
+
+#include "netdissect.h"
+
+/* forward compatibility */
+
+netdissect_options *gndo;
+
+#define dflag gndo->ndo_dflag
+#define eflag gndo->ndo_eflag 
+#define fflag gndo->ndo_fflag 
+#define nflag gndo->ndo_nflag 
+#define Nflag gndo->ndo_Nflag 
+#define Oflag gndo->ndo_Oflag 
+#define pflag gndo->ndo_pflag 
+#define qflag gndo->ndo_qflag 
+#define Rflag gndo->ndo_Rflag 
+#define sflag gndo->ndo_sflag 
+#define Sflag gndo->ndo_Sflag 
+#define tflag gndo->ndo_tflag 
+#define Uflag gndo->ndo_Uflag 
+#define uflag gndo->ndo_uflag 
+#define vflag gndo->ndo_vflag 
+#define xflag gndo->ndo_xflag 
+#define Xflag gndo->ndo_Xflag 
+#define Cflag gndo->ndo_Cflag 
+#define Aflag gndo->ndo_Aflag 
+#define packettype gndo->ndo_packettype
+#define tcpmd5secret gndo->ndo_tcpmd5secret
+#define Wflag gndo->ndo_Wflag
+#define WflagChars gndo->ndo_WflagChars
+#define Cflag_count gndo->ndo_Cflag_count
+#define snaplen     gndo->ndo_snaplen
+#define snapend     gndo->ndo_snapend
+