]> The Tcpdump Group git mirrors - tcpdump/blobdiff - interface.h
Update Gisle Vanem's address.
[tcpdump] / interface.h
index a27d00204fd2c1d7e61a97d7c620b61da2415e91..be027ed34c99d328cf6b4b9f21689a94ab68be6f 100644 (file)
 #include "os-proto.h"
 #endif
 
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif
-
 /* snprintf et al */
 
 #include <stdarg.h>
@@ -82,21 +78,6 @@ extern char *strsep(char **, const char *);
 #define max(a,b) ((b)>(a)?(b):(a))
 #endif
 
-/*
- * The default snapshot length.  This value allows most printers to print
- * useful information while keeping the amount of unwanted data down.
- */
-#ifndef INET6
-#define DEFAULT_SNAPLEN 68     /* ether + IPv4 + TCP + 14 */
-#else
-#define DEFAULT_SNAPLEN 96     /* ether + IPv6 + TCP + 22 */
-#endif
-
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-#endif
-
 #define ESRC(ep) ((ep)->ether_shost)
 #define EDST(ep) ((ep)->ether_dhost)
 
@@ -181,10 +162,10 @@ extern void hex_and_ascii_print(const char *, const u_char *, u_int);
 extern void hex_print_with_offset(const char *, const u_char *, u_int, u_int);
 extern void hex_print(const char *, const u_char *, u_int);
 extern void telnet_print(const u_char *, u_int);
-extern int ether_encap_print(u_short, const u_char *, u_int, u_int, u_short *);
+extern int ethertype_print(u_short, const u_char *, u_int, u_int);
 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_int);
+extern int snap_print(const u_char *, u_int, u_int, u_int);
 extern void aarp_print(const u_char *, u_int);
 extern void aodv_print(const u_char *, u_int, int);
 extern void atalk_print(const u_char *, u_int);
@@ -204,7 +185,8 @@ extern u_int enc_if_print(const struct pcap_pkthdr *, const u_char *);
 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 void ether_print(const u_char *, u_int, u_int,
+    void (*)(const u_char *), 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 *);
@@ -239,7 +221,7 @@ 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 *);
-extern void olsr_print (const u_char *, u_int);
+extern void olsr_print (const u_char *, u_int, int);
 extern void pimv1_print(const u_char *, u_int);
 extern void cisco_autorp_print(const u_char *, u_int);
 extern void rsvp_print(const u_char *, u_int);
@@ -251,7 +233,7 @@ extern void lwapp_control_print(const u_char *, u_int, int);
 extern void lwapp_data_print(const u_char *, u_int);
 extern void eigrp_print(const u_char *, u_int);
 extern void mobile_print(const u_char *, u_int);
-extern void pim_print(const u_char *, u_int);
+extern void pim_print(const u_char *, u_int, u_int);
 extern u_int pppoe_print(const u_char *, u_int);
 extern u_int ppp_print(register const u_char *, u_int);
 extern u_int ppp_if_print(const struct pcap_pkthdr *, const u_char *);
@@ -324,6 +306,7 @@ extern void lwres_print(const u_char *, u_int);
 extern void pptp_print(const u_char *);
 extern void dccp_print(const u_char *, const u_char *, u_int);
 extern void sctp_print(const u_char *, const u_char *, u_int);
+extern void forces_print(const u_char *, u_int);
 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);
@@ -332,6 +315,8 @@ extern void bfd_print(const u_char *, u_int, u_int);
 extern void sip_print(const u_char *, u_int);
 extern void syslog_print(const u_char *, u_int);
 extern u_int bt_if_print(const struct pcap_pkthdr *, const u_char *);
+extern u_int usb_linux_48_byte_print(const struct pcap_pkthdr *, const u_char *);
+extern u_int usb_linux_64_byte_print(const struct pcap_pkthdr *, const u_char *);
 
 #ifdef INET6
 extern void ip6_print(const u_char *, u_int);
@@ -340,11 +325,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 *, 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);
+extern int mask62plen(const u_char *);
 #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);
@@ -363,8 +348,10 @@ extern void bpf_dump(const struct bpf_program *, int);
 #ifndef NETDISSECT_REWORKED
 extern netdissect_options *gndo;
 
+#define bflag gndo->ndo_bflag 
 #define eflag gndo->ndo_eflag 
 #define fflag gndo->ndo_fflag 
+#define jflag gndo->ndo_jflag
 #define Kflag gndo->ndo_Kflag 
 #define nflag gndo->ndo_nflag 
 #define Nflag gndo->ndo_Nflag 
@@ -393,6 +380,7 @@ extern netdissect_options *gndo;
 #define Cflag_count gndo->ndo_Cflag_count
 #define Gflag_count gndo->ndo_Gflag_count
 #define Gflag_time gndo->ndo_Gflag_time 
+#define hflag gndo->ndo_hflag
 #define snaplen     gndo->ndo_snaplen
 #define snapend     gndo->ndo_snapend