X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/d2669e52ae7d1540e7c041e4dfe05176fa9abe8e..a5370b71fe0fdecac8a10ad2e0e5545f01f95f6e:/interface.h diff --git a/interface.h b/interface.h index ca3e69b5..baee6611 100644 --- a/interface.h +++ b/interface.h @@ -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.226 2004-03-30 14:42:40 mcr Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.252 2005-05-20 21:02:29 hannes Exp $ (LBL) */ #ifndef tcpdump_interface_h @@ -36,6 +36,10 @@ #include +#if HAVE_STDINT_H +#include +#endif + #if !defined(HAVE_SNPRINTF) int snprintf(char *, size_t, const char *, ...) __attribute__((format(printf, 3, 4))); @@ -108,10 +112,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. * @@ -137,6 +137,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 int fn_printzp(const u_char *, u_int, const u_char *); extern int mask2plen(u_int32_t); 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) @@ -153,7 +154,7 @@ extern char *copy_argv(char **); extern void safeputchar(int); extern void safeputs(const char *); -extern const char *isonsap_string(const u_char *); +extern const char *isonsap_string(const u_char *, register u_int); extern const char *llcsap_string(u_char); extern const char *protoid_string(const u_char *); extern const char *ipxsap_string(u_short); @@ -165,32 +166,30 @@ extern const char *dnnum_string(u_short); #include extern int print_unknown_data(const u_char *, const char *,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 ascii_print_with_offset(const char *, const u_char *, u_int, u_int); +extern void 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 telnet_print(const u_char *, u_int); -extern void hex_print(const u_char *, const u_char *, u_int); +extern void hex_print(const 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 int snap_print(const u_char *, u_int, u_int, 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); extern u_int atm_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int sunatm_if_print(const struct pcap_pkthdr *, const u_char *); +extern int oam_print(const u_char *, u_int); extern void bootp_print(const u_char *, u_int); extern void bgp_print(const u_char *, int); extern void beep_print(const u_char *, u_int); extern void cnfp_print(const u_char *, const u_char *); extern void decnet_print(const u_char *, u_int, u_int); extern void default_print(const u_char *, u_int); -extern void default_print_unaligned(const u_char *, u_int); extern void dvmrp_print(const u_char *, u_int); -extern void egp_print(const u_char *); +extern void egp_print(const u_char *, u_int); 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 *); @@ -210,7 +209,6 @@ extern void gre_print(const u_char *, u_int); 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); @@ -229,6 +227,9 @@ 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); extern void ldp_print(const u_char *, u_int); +extern void lmp_print(const u_char *, u_int); +extern void lspping_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 u_int pppoe_print(const u_char *, u_int); @@ -238,6 +239,7 @@ extern u_int ppp_hdlc_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int ppp_bsdos_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int pppoe_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int prism_if_print(const struct pcap_pkthdr *, const u_char *); +extern void q933_print(const u_char *, u_int); extern int vjc_print(register const char *, u_short); extern u_int raw_if_print(const struct pcap_pkthdr *, const u_char *); extern void rip_print(const u_char *, u_int); @@ -247,6 +249,13 @@ extern u_int lane_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int cip_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int sl_bsdos_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int chdlc_if_print(const struct pcap_pkthdr *, const u_char *); +extern u_int juniper_atm1_print(const struct pcap_pkthdr *, const u_char *); +extern u_int juniper_atm2_print(const struct pcap_pkthdr *, const u_char *); +extern u_int juniper_mfr_print(const struct pcap_pkthdr *, register const u_char *); +extern u_int juniper_mlfr_print(const struct pcap_pkthdr *, const u_char *); +extern u_int juniper_mlppp_print(const struct pcap_pkthdr *, const u_char *); +extern u_int juniper_pppoe_print(const struct pcap_pkthdr *, const u_char *); +extern u_int juniper_pppoe_atm_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 *); @@ -257,8 +266,6 @@ 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 *); extern void netbeui_print(u_short, const u_char *, int); @@ -267,9 +274,11 @@ extern void nbt_tcp_print(const u_char *, int); extern void nbt_udp137_print(const u_char *, int); extern void nbt_udp138_print(const u_char *, int); extern char *smb_errstr(int, int); +extern const char *nt_errstr(u_int32_t); extern void print_data(const unsigned char *, int); extern void l2tp_print(const u_char *, u_int); extern void vrrp_print(const u_char *, u_int, int); +extern void pgm_print(const u_char *, u_int, const u_char *); extern void cdp_print(const u_char *, u_int, u_int); extern void stp_print(const u_char *, u_int); extern void radius_print(const u_char *, u_int); @@ -281,6 +290,8 @@ 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); +extern void sip_print(const u_char *, u_int); +extern void syslog_print(const u_char *, u_int); #ifdef INET6 extern void ip6_print(const u_char *, u_int); @@ -309,9 +320,8 @@ extern void bpf_dump(struct bpf_program *, int); /* forward compatibility */ -netdissect_options *gndo; +extern netdissect_options *gndo; -#define dflag gndo->ndo_dflag #define eflag gndo->ndo_eflag #define fflag gndo->ndo_fflag #define nflag gndo->ndo_nflag @@ -331,8 +341,10 @@ netdissect_options *gndo; #define Cflag gndo->ndo_Cflag #define Aflag gndo->ndo_Aflag #define packettype gndo->ndo_packettype -#define espsecret gndo->ndo_espsecret #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 +