X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/4d83b45199c02c6068fb24ece429468d6fd5f4c2..b42fd30f1dcd7943335215d97c4b3a80f88e28be:/interface.h diff --git a/interface.h b/interface.h index a91b1b26..27489e0d 100644 --- a/interface.h +++ b/interface.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 + * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -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.164 2001-06-24 21:55:00 itojun Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.176 2001-11-25 01:48:47 guy Exp $ (LBL) */ #ifndef tcpdump_interface_h @@ -61,7 +61,7 @@ extern char *strdup(const char *); struct tok { int v; /* value */ - char *s; /* string */ + const char *s; /* string */ }; extern int aflag; /* translate network and broadcast addresses */ @@ -134,7 +134,7 @@ extern const u_char *packetp; extern const u_char *snapend; /* True if "l" bytes of "var" were captured */ -#define TTEST2(var, l) ((u_char *)&(var) <= snapend - (l)) +#define TTEST2(var, l) ((const u_char *)&(var) <= snapend - (l)) /* True if "var" was captured */ #define TTEST(var) TTEST2(var, sizeof(var)) @@ -151,9 +151,14 @@ 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 char *dnaddr_string(u_short); +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) -extern void wrapup(int); +extern const char *dnaddr_string(u_short); + +extern void info(int); +extern int infodelay; +extern int infoprint; extern void error(const char *, ...) __attribute__((noreturn, format (printf, 1, 2))); @@ -165,11 +170,12 @@ extern char *copy_argv(char **); extern void safeputchar(int); extern void safeputs(const char *); -extern char *isonsap_string(const u_char *); -extern char *llcsap_string(u_char); -extern char *protoid_string(const u_char *); -extern char *dnname_string(u_short); -extern char *dnnum_string(u_short); +extern const char *isonsap_string(const u_char *); +extern const char *llcsap_string(u_char); +extern const char *protoid_string(const u_char *); +extern const char *ipxsap_string(u_short); +extern const char *dnname_string(u_short); +extern const char *dnnum_string(u_short); /* The printer routines. */ @@ -207,7 +213,7 @@ extern void ieee802_11_if_print(u_char *, 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 igmp_print(const u_char *, u_int, const u_char *); +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); @@ -218,6 +224,7 @@ extern void krb_print(const u_char *, u_int); extern void llap_print(const u_char *, u_int); extern void ltalk_if_print(u_char *, 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); @@ -247,6 +254,7 @@ extern void sl_bsdos_if_print(u_char *, const struct pcap_pkthdr *, const u_char *); extern void chdlc_if_print(u_char *, const struct pcap_pkthdr *, const u_char *); +extern void chdlc_print(register const u_char *, u_int, u_int); extern void sll_if_print(u_char *, 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 *); @@ -256,7 +264,7 @@ extern void timed_print(const u_char *, u_int); 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 *, register const u_char *); -extern int esp_print(register const u_char *, register const u_char *, int *); +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 *, register const u_char *, int *); extern void rx_print(register const u_char *, int, int, int, u_char *); @@ -278,20 +286,22 @@ extern void lwres_print(const u_char *, u_int); extern void pptp_print(const u_char *, u_int); extern void sctp_print(const u_char *, const u_char *, u_int); extern void mpls_print(const u_char *, u_int); +extern void zephyr_print(const u_char *, int); +extern void hsrp_print(const u_char *, u_int); #ifdef INET6 -extern void ip6_print(const u_char *, int); +extern void ip6_print(const u_char *, u_int); extern void ip6_opt_print(const u_char *, int); 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 void icmp6_print(const u_char *, const u_char *); -extern void ripng_print(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); #endif /*INET6*/ -extern u_short in_cksum(const u_short *, register int, u_short); +extern u_short in_cksum(const u_short *, register u_int, int); #ifndef HAVE_BPF_DUMP struct bpf_program;