]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Get rid of the "-Wno-unused" flag, and fix up most of the
authorguy <guy>
Thu, 5 Sep 2002 21:25:34 +0000 (21:25 +0000)
committerguy <guy>
Thu, 5 Sep 2002 21:25:34 +0000 (21:25 +0000)
unused-parameter problems reported by GCC.  Add an _U_ tag to label
parameters as unused if the function is called through a pointer (so
that you can't change its signature by removing parameters) or if there
are unused parameters only because the function isn't complete.

Add some additional bounds checks the necessity for which was revealed
while cleaning up unused-parameter problems.

Make some routines static.

"lcp_print()", defined in "print-lcp.c", isn't called anywhere -
"print-ppp.c" has the code to dissect LCP.  Get rid of "print-lcp.c".

54 files changed:
FILES
INSTALL
Makefile.in
aclocal.m4
configure
interface.h
machdep.c
print-802_11.c
print-ah.c
print-arcnet.c
print-atalk.c
print-atm.c
print-bootp.c
print-cdp.c
print-chdlc.c
print-cip.c
print-cnfp.c
print-decnet.c
print-domain.c
print-dvmrp.c
print-egp.c
print-ether.c
print-fddi.c
print-fr.c
print-igmp.c
print-ip.c
print-ip6.c
print-ipcomp.c
print-isakmp.c
print-krb.c
print-lane.c
print-lcp.c [deleted file]
print-llc.c
print-null.c
print-pflog.c
print-ppp.c
print-pppoe.c
print-pptp.c
print-raw.c
print-rip.c
print-rx.c
print-sl.c
print-sll.c
print-smb.c
print-stp.c
print-sunatm.c
print-tcp.c
print-timed.c
print-token.c
print-udp.c
print-vjc.c
tcpdump.c
win32/prj/GNUmakefile
win32/prj/WinDump.dsp

diff --git a/FILES b/FILES
index 165fd79fcef256eaab808b7ec025feedd9b0181f..52625772df43fca3b44dddfaad030e98a1858fb9 100644 (file)
--- a/FILES
+++ b/FILES
@@ -119,7 +119,6 @@ print-isoclns.c
 print-krb.c
 print-l2tp.c
 print-lane.c
-print-lcp.c
 print-llc.c
 print-lwres.c
 print-mobile.c
diff --git a/INSTALL b/INSTALL
index 2d0a186279cf562fcc61cdb7dee7f4f9254bc13d..66942699afb199483620a84c503968dc201b2442 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,4 @@
-@(#) $Header: /tcpdump/master/tcpdump/Attic/INSTALL,v 1.49 2002-07-16 04:46:41 guy Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/Attic/INSTALL,v 1.50 2002-09-05 21:25:35 guy Exp $ (LBL)
 
 If you have not built libpcap, do so first.  See the README
 file in this directory for the ftp location.
@@ -145,7 +145,6 @@ print-isoclns.c     - ISO CLNS, ESIS, and ISIS printer routines
 print-krb.c    - Kerberos printer routines
 print-l2tp.c   - Layer Two Tunneling Protocol printer routines
 print-lane.c   - ATM LANE printer routines
-print-lcp.c    - PPP Link Control Protocol printer routines
 print-llc.c    - IEEE 802.2 LLC printer routines
 print-lwres.c  - Lightweight Resolver protocol printer routines
 print-mobile.c - IPv4 mobility printer routines
index 4cd3e90870c61a023423f72be153f20bde25bdea..956347660e1bb66722f51eb8b3bac8630e0b2c7d 100644 (file)
@@ -17,7 +17,7 @@
 #  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.265 2002-07-11 09:17:22 guy Exp $ (LBL)
+# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.266 2002-09-05 21:25:35 guy Exp $ (LBL)
 
 #
 # Various configurable paths (remember to edit Makefile.in, not Makefile)
@@ -74,12 +74,12 @@ CSRC =      addrtoname.c gmt2local.c machdep.c parsenfsfh.c \
        print-fddi.c print-fr.c print-gre.c print-hsrp.c \
        print-icmp.c print-igmp.c print-igrp.c print-ip.c \
        print-ipcomp.c print-ipx.c print-isakmp.c print-isoclns.c \
-       print-krb.c print-l2tp.c print-lane.c print-lcp.c \
-       print-llc.c print-lwres.c print-msdp.c print-mobile.c \
-       print-mpls.c print-nfs.c print-ntp.c print-null.c \
-       print-ospf.c print-pflog.c print-pim.c print-ppp.c \
-       print-pppoe.c print-pptp.c print-radius.c print-raw.c \
-       print-rip.c print-rx.c print-sctp.c print-sl.c print-sll.c \
+       print-krb.c print-l2tp.c print-lane.c print-llc.c \
+       print-lwres.c print-msdp.c print-mobile.c print-mpls.c \
+       print-nfs.c print-ntp.c print-null.c print-ospf.c \
+       print-pflog.c print-pim.c print-ppp.c print-pppoe.c \
+       print-pptp.c print-radius.c print-raw.c print-rip.c \
+       print-rx.c print-sctp.c print-sl.c print-sll.c \
        print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
        print-tcp.c print-telnet.c print-tftp.c print-timed.c \
        print-token.c print-udp.c print-vjc.c print-vrrp.c \
index 641b737aff5416b2ed8d00c81f768f30d9a9cd47..48d5c37e096d65d3a0e9f9dae0cef08561ab3f7e 100644 (file)
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.88 2002-09-05 00:00:07 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.89 2002-09-05 21:25:35 guy Exp $ (LBL)
 dnl
 dnl Copyright (c) 1995, 1996, 1997, 1998
 dnl    The Regents of the University of California.  All rights reserved.
@@ -621,7 +621,7 @@ AC_DEFUN(AC_LBL_DEVEL,
                            fi
                            $1="$$1 -Wall"
                            if test $ac_cv_lbl_gcc_vers -gt 1 ; then
-                                   $1="$$1 -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W -Wno-unused"
+                                   $1="$$1 -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W"
                            fi
                    fi
            else
index 47057dd8832ed94ec853d4b39d6833d12ceb9fa7..005bc8a0e1346cad9f8c47b976c8ef82bcffbbec 100755 (executable)
--- a/configure
+++ b/configure
@@ -4405,7 +4405,7 @@ rm -f os-proto.h
                            fi
                            V_CCOPT="$V_CCOPT -Wall"
                            if test $ac_cv_lbl_gcc_vers -gt 1 ; then
-                                   V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W -Wno-unused"
+                                   V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W"
                            fi
                    fi
            else
index 9620ec21e789a9e9cb2bdec867934d298e60311d..ea7c5593056e6395c2ca9eb365ca109f721e4521 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.193 2002-08-01 08:52:57 risso Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.194 2002-09-05 21:25:36 guy Exp $ (LBL)
  */
 
 #ifndef tcpdump_interface_h
@@ -32,6 +32,8 @@
 #define __attribute__(x)
 #endif
 
+#define _U_    __attribute__((unused))
+
 /* snprintf et al */
 
 #include <stdarg.h>
@@ -196,8 +198,8 @@ extern void hex_print(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, const u_char *,
-       const u_char *, u_short *, u_int32_t, u_short, u_int);
+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 arp_print(const u_char *, u_int, u_int);
 extern void atalk_print(const u_char *, u_int);
@@ -205,15 +207,15 @@ extern void atm_print(u_int, u_int, u_int, const u_char *, u_int, u_int);
 extern void atm_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
 extern void bpfatm_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
 extern void sunatm_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
-extern void bootp_print(const u_char *, u_int, u_short, u_short);
+extern void bootp_print(const u_char *, u_short, u_short);
 extern void bgp_print(const u_char *, int);
 extern void beep_print(const u_char *, u_int);
-extern void cnfp_print(const u_char *, u_int, const u_char *);
+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 *, u_int, const u_char *);
+extern void egp_print(const u_char *);
 extern void pflog_if_print(u_char *, const struct pcap_pkthdr *,
         const u_char *);
 extern void arcnet_if_print(u_char *, const struct pcap_pkthdr *,
@@ -238,7 +240,7 @@ extern void ipN_print(const u_char *, u_int);
 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 krb_print(const u_char *, u_int);
+extern void krb_print(const u_char *);
 extern void llap_print(const u_char *, u_int);
 extern void ltalk_if_print(u_char *, const struct pcap_pkthdr *,
        const u_char *);
@@ -262,7 +264,7 @@ extern void ppp_bsdos_if_print(u_char *, const struct pcap_pkthdr *,
        const u_char *);
 extern void pppoe_if_print(u_char *, const struct pcap_pkthdr *,
        const u_char *);
-extern int vjc_print(register const char *, register u_int, u_short);
+extern int vjc_print(register const char *, u_short);
 extern void raw_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
 extern void rip_print(const u_char *, u_int);
 extern void sl_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
@@ -279,13 +281,13 @@ extern void snmp_print(const u_char *, u_int);
 extern void sunrpcrequest_print(const u_char *, u_int, 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 *, 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 *, register const u_char *);
+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 *, register const u_char *, int *);
+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);
 extern void ipx_netbios_print(const u_char *, u_int);
@@ -295,14 +297,12 @@ extern void nbt_udp138_print(const u_char *, int);
 extern char *smb_errstr(int, int);
 extern void print_data(const unsigned char *, int);
 extern void l2tp_print(const u_char *, u_int);
-extern void lcp_print(const u_char *, u_int);
 extern void vrrp_print(const u_char *, u_int, int);
-extern void cdp_print(const u_char *, u_int, u_int, const u_char *,
-       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);
 extern void lwres_print(const u_char *, u_int);
-extern void pptp_print(const u_char *, u_int);
+extern void pptp_print(const u_char *);
 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);
index d789c2832128b444e3f03b3824d4e3466eaf63bb..fdfcac59a04492efdce597f9b99d9ebf6ac45d15 100644 (file)
--- a/machdep.c
+++ b/machdep.c
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.9 2002-08-06 04:40:11 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.10 2002-09-05 21:25:36 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,15 +36,17 @@ static const char rcsid[] =
  */
 #include <tcpdump-stdinc.h>
 
+#ifndef HAVE___ATTRIBUTE__
+#define __attribute__(x)
+#endif /* HAVE___ATTRIBUTE__ */
+
+#define _U_    __attribute__((unused))
+
 #ifdef __osf__
 #include <sys/sysinfo.h>
 #include <sys/proc.h>
 
 #if !defined(HAVE_SNPRINTF)
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif /* HAVE___ATTRIBUTE__ */
-
 int snprintf(char *, size_t, const char *, ...)
      __attribute__((format(printf, 3, 4)));
 #endif /* !defined(HAVE_SNPRINTF) */
@@ -53,7 +55,7 @@ int snprintf(char *, size_t, const char *, ...)
 #include "machdep.h"
 
 int
-abort_on_misalignment(char *ebuf, size_t ebufsiz)
+abort_on_misalignment(char *ebuf _U_, size_t ebufsiz _U_)
 {
 #ifdef __osf__
        static int buf[2] = { SSIN_UACPROC, UAC_SIGBUS };
index 2897a468da13fd9924f7576249a0698b994d8b86..1c5153944ae08b32b083c6524bcb5bccab09c292 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.10 2002-09-05 00:00:09 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.11 2002-09-05 21:25:36 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -113,7 +113,7 @@ static const char *reason_text[] = {
        NULL
 };
 
-static int wep_print(const u_char *p,u_int length)
+static int wep_print(const u_char *p)
 {
        u_int32_t iv;
 
@@ -210,8 +210,7 @@ static int parse_elements(struct mgmt_body_t *pbody,const u_char *p,int offset)
  * Print Handle functions for the management frame types
  *********************************************************************************/
 
-static int handle_beacon(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_beacon(u_int16_t fc, const u_char *p)
 {
        struct mgmt_body_t pbody;
        int offset = 0;
@@ -242,8 +241,7 @@ static int handle_beacon(u_int16_t fc, const struct mgmt_header_t *pmh,
        return 1;
 }
 
-static int handle_assoc_request(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_assoc_request(u_int16_t fc, const u_char *p)
 {
        struct mgmt_body_t pbody;
        int offset = 0;
@@ -267,8 +265,7 @@ static int handle_assoc_request(u_int16_t fc, const struct mgmt_header_t *pmh,
        return 1;
 }
 
-static int handle_assoc_response(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_assoc_response(u_int16_t fc, const u_char *p)
 {
        struct mgmt_body_t pbody;
        int offset = 0;
@@ -296,8 +293,7 @@ static int handle_assoc_response(u_int16_t fc, const struct mgmt_header_t *pmh,
 }
 
 
-static int handle_reassoc_request(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_reassoc_request(u_int16_t fc, const u_char *p)
 {
        struct mgmt_body_t pbody;
        int offset = 0;
@@ -323,15 +319,13 @@ static int handle_reassoc_request(u_int16_t fc, const struct mgmt_header_t *pmh,
        return 1;
 }
 
-static int handle_reassoc_response(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_reassoc_response(u_int16_t fc, const u_char *p)
 {
        /* Same as a Association Reponse */
-       return handle_assoc_response(fc,pmh,p);
+       return handle_assoc_response(fc, p);
 }
 
-static int handle_probe_request(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_probe_request(u_int16_t fc, const u_char *p)
 {
        struct mgmt_body_t  pbody;
        int offset = 0;
@@ -349,8 +343,7 @@ static int handle_probe_request(u_int16_t fc, const struct mgmt_header_t *pmh,
        return 1;
 }
 
-static int handle_probe_response(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_probe_response(u_int16_t fc, const u_char *p)
 {
        struct mgmt_body_t  pbody;
        int offset = 0;
@@ -379,16 +372,14 @@ static int handle_probe_response(u_int16_t fc, const struct mgmt_header_t *pmh,
        return 1;
 }
 
-static int handle_atim(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_atim(void)
 {
        /* the frame body for ATIM is null. */
        printf("ATIM");
        return 1;
 }
 
-static int handle_disassoc(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_disassoc(u_int16_t fc, const u_char *p)
 {
        struct mgmt_body_t  pbody;
        int offset = 0;
@@ -406,8 +397,7 @@ static int handle_disassoc(u_int16_t fc, const struct mgmt_header_t *pmh,
        return 1;
 }
 
-static int handle_auth(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+static int handle_auth(u_int16_t fc, const u_char *p)
 {
        struct mgmt_body_t  pbody;
        int offset = 0;
@@ -478,36 +468,36 @@ static int handle_deauth(u_int16_t fc, const struct mgmt_header_t *pmh,
 
 
 static int mgmt_body_print(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p, u_int length)
+    const u_char *p)
 {
        switch (FC_SUBTYPE(fc)) {
        case ST_ASSOC_REQUEST:
-               return (handle_assoc_request(fc, pmh, p));
+               return (handle_assoc_request(fc, p));
        case ST_ASSOC_RESPONSE:
-               return (handle_assoc_response(fc, pmh, p));
+               return (handle_assoc_response(fc, p));
        case ST_REASSOC_REQUEST:
-               return (handle_reassoc_request(fc, pmh, p));
+               return (handle_reassoc_request(fc, p));
        case ST_REASSOC_RESPONSE:
-               return (handle_reassoc_response(fc, pmh, p));
+               return (handle_reassoc_response(fc, p));
        case ST_PROBE_REQUEST:
-               return (handle_probe_request(fc, pmh, p));
+               return (handle_probe_request(fc, p));
        case ST_PROBE_RESPONSE:
-               return (handle_probe_response(fc, pmh, p));
+               return (handle_probe_response(fc, p));
        case ST_BEACON:
-               return (handle_beacon(fc, pmh, p));
+               return (handle_beacon(fc, p));
        case ST_ATIM:
-               return (handle_atim(fc, pmh, p));
+               return (handle_atim());
        case ST_DISASSOC:
-               return (handle_disassoc(fc, pmh, p));
+               return (handle_disassoc(fc, p));
        case ST_AUTH:
                if (!TTEST2(*p, 3))
                        return 0;
                if ((p[0] == 0 ) && (p[1] == 0) && (p[2] == 0)) {
                        printf("Authentication (Shared-Key)-3 ");
-                       return (wep_print(p, length));
+                       return (wep_print(p));
                }
                else
-                       return (handle_auth(fc, pmh, p));
+                       return (handle_auth(fc, p));
        case ST_DEAUTH:
                return (handle_deauth(fc, pmh, p));
                break;
@@ -523,7 +513,7 @@ static int mgmt_body_print(u_int16_t fc, const struct mgmt_header_t *pmh,
  * Handles printing all the control frame types
  *********************************************************************************/
 
-static int ctrl_body_print(u_int16_t fc,const u_char *p, u_int length)
+static int ctrl_body_print(u_int16_t fc, const u_char *p)
 {
        switch (FC_SUBTYPE(fc)) {
        case CTRL_PS_POLL:
@@ -599,7 +589,7 @@ static int ctrl_body_print(u_int16_t fc,const u_char *p, u_int length)
  *    1    |  1      |  RA    | TA     | DA     | SA
  */
 
-static void data_header_print(u_int16_t fc,const u_char *p, u_int length)
+static void data_header_print(u_int16_t fc, const u_char *p)
 {
 #define ADDR1  (p + 4)
 #define ADDR2  (p + 10)
@@ -633,7 +623,7 @@ static void data_header_print(u_int16_t fc,const u_char *p, u_int length)
 }
 
 
-static void mgmt_header_print(const u_char *p, u_int length)
+static void mgmt_header_print(const u_char *p)
 {
        const struct mgmt_header_t *hp = (const struct mgmt_header_t *) p;
 
@@ -642,7 +632,7 @@ static void mgmt_header_print(const u_char *p, u_int length)
            etheraddr_string((hp)->sa));
 }
 
-static void ctrl_header_print(u_int16_t fc,const u_char *p, u_int length)
+static void ctrl_header_print(u_int16_t fc, const u_char *p)
 {
        switch (FC_SUBTYPE(fc)) {
        case CTRL_PS_POLL:
@@ -730,19 +720,19 @@ static int GetHeaderLength(u_int16_t fc)
  * Print the 802.11 MAC header
  */
 static inline void
-ieee_802_11_print(u_int16_t fc, const u_char *p, u_int length)
+ieee_802_11_print(u_int16_t fc, const u_char *p)
 {
        switch (FC_TYPE(fc)) {
        case T_MGMT:
-               mgmt_header_print(p, length);
+               mgmt_header_print(p);
                break;
 
        case T_CTRL:
-               ctrl_header_print(fc, p, length);
+               ctrl_header_print(fc, p);
                break;
 
        case T_DATA:
-               data_header_print(fc, p, length);
+               data_header_print(fc, p);
                break;
 
        default:
@@ -753,13 +743,13 @@ ieee_802_11_print(u_int16_t fc, const u_char *p, u_int length)
 }
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the ether header of the packet, 'h->tv' is the timestamp,
+ * This is the top level routine of the printer.  'p' points
+ * to the 802.11 header of the packet, 'h->ts' is the timestamp,
  * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-ieee802_11_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+ieee802_11_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
@@ -775,10 +765,16 @@ ieee802_11_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
                goto out;
        }
 
-       fc=EXTRACT_LE_16BITS(p);
+       fc = EXTRACT_LE_16BITS(p);
+       HEADER_LENGTH = GetHeaderLength(fc);
+
+       if (caplen < HEADER_LENGTH) {
+               printf("[|802.11]");
+               goto out;
+       }
 
        if (eflag)
-               ieee_802_11_print(fc, p, length);
+               ieee_802_11_print(fc, p);
 
        /*
         * Some printers want to get back at the ethernet addresses,
@@ -788,8 +784,6 @@ ieee802_11_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
        packetp = p;
        snapend = p + caplen;
 
-       HEADER_LENGTH=GetHeaderLength(fc);
-
        length -= HEADER_LENGTH;
        caplen -= HEADER_LENGTH;
        p += HEADER_LENGTH;
@@ -797,15 +791,14 @@ ieee802_11_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
        switch (FC_TYPE(fc)) {
        case T_MGMT:
                if (!mgmt_body_print(fc, (const struct mgmt_header_t *)packetp,
-                   p, length)) {
+                   p)) {
                        printf("[|802.11]");
                        goto out;
                }
                break;
 
        case T_CTRL:
-               if (!ctrl_body_print(fc, p - HEADER_LENGTH,
-                   length + HEADER_LENGTH)) {
+               if (!ctrl_body_print(fc, p - HEADER_LENGTH)) {
                        printf("[|802.11]");
                        goto out;
                }
@@ -814,7 +807,7 @@ ieee802_11_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
        case T_DATA:
                /* There may be a problem w/ AP not having this bit set */
                if (FC_WEP(fc)) {
-                       if (!wep_print(p,length)) {
+                       if (!wep_print(p)) {
                                printf("[|802.11]");
                                goto out;
                        }
@@ -826,8 +819,7 @@ ieee802_11_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
                                 * handle intelligently
                                 */
                                if (!eflag)
-                                       ieee_802_11_print(fc, p - HEADER_LENGTH,
-                                           length + HEADER_LENGTH);
+                                       ieee_802_11_print(fc, p - HEADER_LENGTH);
                                if (extracted_ethertype) {
                                        printf("(LLC %s) ",
                                            etherproto_string(htons(extracted_ethertype)));
index 27616c59a52dfe482ed8458a81aa1d9fb5e8f3c4..aab575786a86d0a0f35da46733ba0e400031ba31 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ah.c,v 1.17 2002-08-01 08:52:59 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ah.c,v 1.18 2002-09-05 21:25:36 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -40,7 +40,7 @@ static const char rcsid[] =
 #include "addrtoname.h"
 
 int
-ah_print(register const u_char *bp, register const u_char *bp2)
+ah_print(register const u_char *bp)
 {
        register const struct ah *ah;
        register const u_char *ep;
index c8447a5a9baf09ec35c9c61946ba46f0ebcdfc62..56f7f1e3bce25653acdd9b184406dd4f7a141949 100644 (file)
@@ -22,7 +22,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.9 2002-08-01 08:52:59 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.10 2002-09-05 21:25:37 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -101,13 +101,13 @@ arcnet_print(const u_char *bp, u_int length, int phds, int flag, u_int seqid)
 }
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the ether header of the packet, 'tvp' is the timestamp,
- * 'length' is the length of the packet off the wire, and 'caplen'
+ * This is the top level routine of the printer.  'p' points
+ * to the ARCNET header of the packet, 'h->ts' is the timestamp,
+ * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-arcnet_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+arcnet_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
index 02713752662261e439dc3b98d59e2a7242ef0870..8a5dbef5410767e7b84ae63fc6c1e2cb42c6d1e1 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.73 2002-08-06 04:42:04 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.74 2002-09-05 21:25:37 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -82,7 +82,7 @@ static const char *ddpskt_string(int);
  * Print LLAP packets received on a physical LocalTalk interface.
  */
 void
-ltalk_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+ltalk_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        snapend = p + h->caplen;
        ++infodelay;
index 6cf314751edb8e9b592f81be122a214a0632ff52..19afb94321d8867ae50cd8c64f154930db9d232e 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.25 2002-08-01 08:53:01 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.26 2002-09-05 21:25:37 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -84,13 +84,13 @@ atm_llc_print(const u_char *p, int length, int caplen)
 }
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the LLC/SNAP header of the packet, 'tvp' is the timestamp,
- * 'length' is the length of the packet off the wire, and 'caplen'
+ * This is the top level routine of the printer.  'p' points
+ * to the LLC/SNAP header of the packet, 'h->ts' is the timestamp,
+ * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-atm_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+atm_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
index a44ef804b412473328516251c19ed29e4b1a3095..daa69aadce18914c6a8ff7ac6faaeeaae2b5e3ea 100644 (file)
@@ -22,7 +22,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.65 2002-08-06 04:42:05 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.66 2002-09-05 21:25:38 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -49,8 +49,7 @@ static char tstr[] = " [|bootp]";
  * Print bootp requests
  */
 void
-bootp_print(register const u_char *cp, u_int length,
-           u_short sport, u_short dport)
+bootp_print(register const u_char *cp, u_short sport, u_short dport)
 {
        register const struct bootp *bp;
        static const u_char vm_cmu[4] = VM_CMU;
index a48eb5dd3b433870848e1f303a9c50a67924cf9c..72f9ea857dac251c565185d103d0a0b7a2b71b04 100644 (file)
@@ -26,7 +26,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.16 2002-08-07 05:21:07 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.17 2002-09-05 21:25:38 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -47,8 +47,7 @@ static int cdp_print_prefixes(const u_char *, int);
 static unsigned long cdp_get_number(const u_char *, int);
 
 void
-cdp_print(const u_char *p, u_int length, u_int caplen,
-         const u_char *esrc, const u_char *edst)
+cdp_print(const u_char *p, u_int length, u_int caplen)
 {
        u_int i;
        int type, len;
index a23b3d516ccf89c9cdc45610f948e66a12d2b91a..7695b759df14a2b359cfcbfca43fa20f4b3c42c7 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.14 2002-08-01 08:53:03 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.15 2002-09-05 21:25:38 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -45,7 +45,7 @@ static void chdlc_slarp_print(const u_char *, u_int);
 
 /* Standard CHDLC printer */
 void
-chdlc_if_print(u_char *user, const struct pcap_pkthdr *h,
+chdlc_if_print(u_char *user _U_, const struct pcap_pkthdr *h,
             register const u_char *p)
 {
        register u_int length = h->len;
index ff39180890b8c5abc4e0c0433c597edc329c9313..e986e52c1cdc1ff2d7329e5ac728df64836f4fa5 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.18 2002-08-01 08:53:03 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.19 2002-09-05 21:25:38 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -52,7 +52,7 @@ static unsigned char rfcllc[] = {
        0x00 };
 
 static inline void
-cip_print(register const u_char *bp, int length)
+cip_print(int length)
 {
        /*
         * There is no MAC-layer header, so just print the length.
@@ -61,13 +61,13 @@ cip_print(register const u_char *bp, int length)
 }
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the raw header of the packet, 'tvp' is the timestamp,
- * 'length' is the length of the packet off the wire, and 'caplen'
+ * This is the top level routine of the printer.  'p' points
+ * to the LLC/SNAP or raw header of the packet, 'h->ts' is the timestamp,
+ * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-cip_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+cip_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
@@ -82,7 +82,7 @@ cip_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
        }
 
        if (eflag)
-               cip_print(p, length);
+               cip_print(length);
 
        /*
         * Some printers want to get back at the ethernet addresses,
@@ -100,7 +100,7 @@ cip_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
                    &extracted_ethertype) == 0) {
                        /* ether_type not known, print raw packet */
                        if (!eflag)
-                               cip_print(p, length);
+                               cip_print(length);
                        if (extracted_ethertype) {
                                printf("(LLC %s) ",
                               etherproto_string(htons(extracted_ethertype)));
index 02cef037cde728f140f5d734eff99222b1a8fd4d..5981557c3058c8438d8cfb4e9a62848f0a4408cb 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.10 2002-09-05 00:00:10 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.11 2002-09-05 21:25:39 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -78,7 +78,7 @@ struct nfrec {
 };
 
 void
-cnfp_print(const u_char *cp, u_int len, const u_char *bp)
+cnfp_print(const u_char *cp, const u_char *bp)
 {
        register const struct nfhdr *nh;
        register const struct nfrec *nr;
index 960669d297d14959547ee0f01200831862e189e6..da5a0ca17e1926b60f9663fa947b489b7bf24207 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.35 2002-08-01 08:53:04 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.36 2002-09-05 21:25:39 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -340,13 +340,13 @@ print_i_info(int info)
 }
 
 static void
-print_elist(const char *elp, u_int len)
+print_elist(const char *elp _U_, u_int len _U_)
 {
        /* Not enough examples available for me to debug this */
 }
 
 static void
-print_nsp(const u_char *nspp, u_int nsplen)
+print_nsp(const u_char *nspp, u_int nsplen _U_)
 {
        const struct nsphdr *nsphp = (struct nsphdr *)nspp;
        int dst, src, flags;
index ecb06eb3344a3addbf832344a366ecc678cd47a1..724c649701d3089519ea6fe960b4c391dfbd0071 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.80 2002-09-05 00:00:11 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.81 2002-09-05 21:25:39 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -54,7 +54,7 @@ static const char *ns_resp[] = {
 
 /* skip over a domain name */
 static const u_char *
-ns_nskip(register const u_char *cp, register const u_char *bp)
+ns_nskip(register const u_char *cp)
 {
        register u_char i;
 
@@ -227,7 +227,7 @@ ns_nprint(register const u_char *cp, register const u_char *bp)
 
 /* print a <character-string> */
 static const u_char *
-ns_cprint(register const u_char *cp, register const u_char *bp)
+ns_cprint(register const u_char *cp)
 {
        register u_int i;
 
@@ -308,7 +308,7 @@ ns_qprint(register const u_char *cp, register const u_char *bp)
        register const u_char *np = cp;
        register u_int i;
 
-       cp = ns_nskip(cp, bp);
+       cp = ns_nskip(cp);
 
        if (cp == NULL || !TTEST2(*cp, 4))
                return(NULL);
@@ -340,7 +340,7 @@ ns_rprint(register const u_char *cp, register const u_char *bp)
                if ((cp = ns_nprint(cp, bp)) == NULL)
                        return NULL;
        } else
-               cp = ns_nskip(cp, bp);
+               cp = ns_nskip(cp);
 
        if (cp == NULL || !TTEST2(*cp, 10))
                return (snapend);
@@ -416,7 +416,7 @@ ns_rprint(register const u_char *cp, register const u_char *bp)
 
        case T_TXT:
                putchar(' ');
-               (void)ns_cprint(cp, bp);
+               (void)ns_cprint(cp);
                break;
 
 #ifdef INET6
@@ -538,7 +538,7 @@ ns_print(register const u_char *bp, u_int length)
                                if ((cp = ns_qprint(cp, bp)) == NULL)
                                        goto trunc;
                        } else {
-                               if ((cp = ns_nskip(cp, bp)) == NULL)
+                               if ((cp = ns_nskip(cp)) == NULL)
                                        goto trunc;
                                cp += 4;        /* skip QTYPE and QCLASS */
                        }
index fcd1a31a75297d6e5540c76993052a4ec4f9ce7e..0c72264a894c3a304d2fb4eaddb4fb801f5f2dc8 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.23 2002-09-05 00:00:11 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.24 2002-09-05 21:25:40 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -66,9 +66,9 @@ static void print_probe(const u_char *, const u_char *, u_int);
 static void print_report(const u_char *, const u_char *, u_int);
 static void print_neighbors(const u_char *, const u_char *, u_int);
 static void print_neighbors2(const u_char *, const u_char *, u_int);
-static void print_prune(const u_char *, const u_char *, u_int);
-static void print_graft(const u_char *, const u_char *, u_int);
-static void print_graft_ack(const u_char *, const u_char *, u_int);
+static void print_prune(const u_char *);
+static void print_graft(const u_char *);
+static void print_graft_ack(const u_char *);
 
 static u_int32_t target_level;
 
@@ -130,17 +130,17 @@ dvmrp_print(register const u_char *bp, register u_int len)
 
        case DVMRP_PRUNE:
                printf(" Prune");
-               print_prune(bp, ep, len);
+               print_prune(bp);
                break;
 
        case DVMRP_GRAFT:
                printf(" Graft");
-               print_graft(bp, ep, len);
+               print_graft(bp);
                break;
 
        case DVMRP_GRAFT_ACK:
                printf(" Graft-ACK");
-               print_graft_ack(bp, ep, len);
+               print_graft_ack(bp);
                break;
 
        default:
@@ -313,8 +313,7 @@ trunc:
 }
 
 static void
-print_prune(register const u_char *bp, register const u_char *ep,
-    register u_int len)
+print_prune(register const u_char *bp)
 {
        TCHECK2(bp[0], 12);
        printf(" src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4));
@@ -327,8 +326,7 @@ trunc:
 }
 
 static void
-print_graft(register const u_char *bp, register const u_char *ep,
-    register u_int len)
+print_graft(register const u_char *bp)
 {
        TCHECK2(bp[0], 8);
        printf(" src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4));
@@ -338,8 +336,7 @@ trunc:
 }
 
 static void
-print_graft_ack(register const u_char *bp, register const u_char *ep,
-    register u_int len)
+print_graft_ack(register const u_char *bp)
 {
        TCHECK2(bp[0], 8);
        printf(" src %s grp %s", ipaddr_string(bp), ipaddr_string(bp + 4));
index 06fc4dae0f11250091cbb380b6f4e0481f21fdbe..5ad20f0227e85760659872ae4f09eeebba32c228 100644 (file)
@@ -20,7 +20,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.31 2002-09-05 00:00:12 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.32 2002-09-05 21:25:40 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -134,7 +134,7 @@ const char *egp_reasons[] = {
 };
 
 static void
-egpnrprint(register const struct egp_packet *egp, register u_int length)
+egpnrprint(register const struct egp_packet *egp)
 {
        register const u_char *cp;
        u_int32_t addr;
@@ -213,17 +213,18 @@ trunc:
 }
 
 void
-egp_print(register const u_char *bp, register u_int length,
-         register const u_char *bp2)
+egp_print(register const u_char *bp)
 {
        register const struct egp_packet *egp;
-       register const struct ip *ip;
        register int status;
        register int code;
        register int type;
 
        egp = (struct egp_packet *)bp;
-       ip = (struct ip *)bp2;
+       if (!TTEST(*egp)) {
+               printf("[|egp]");
+               return;
+       }
        (void)printf("egp: ");
 
        if (egp->egp_version != EGP_VERSION) {
@@ -327,7 +328,7 @@ egp_print(register const u_char *bp, register u_int length,
                       egp->egp_intgw,
                       egp->egp_extgw);
                if (vflag)
-                       egpnrprint(egp, length);
+                       egpnrprint(egp);
                break;
 
        case EGPT_ERROR:
index ab4e7d50554aedf7a6453e2bc612d53994a5eb1d..5909f4c61223c8760d19f4d8c70d875cd626437d 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.72 2002-08-01 08:53:06 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.73 2002-09-05 21:25:40 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -119,13 +119,13 @@ ether_print(const u_char *p, u_int length, u_int caplen)
 }
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the ether header of the packet, 'h->tv' is the timestamp,
+ * This is the top level routine of the printer.  'p' points
+ * to the ether header of the packet, 'h->ts' is the timestamp,
  * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-ether_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+ether_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
index d493c9f709de89f1a7ce70f9f24094dab1f6ac3c..c97134a6126e6c42b58c903cf58ba66669e51c17 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.57 2002-08-01 08:53:06 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.58 2002-09-05 21:25:40 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -233,7 +233,7 @@ fddi_hdr_print(register const struct fddi_header *fddip, register u_int length,
 }
 
 static inline void
-fddi_smt_print(const u_char *p, u_int length)
+fddi_smt_print(const u_char *p _U_, u_int length _U_)
 {
        printf("<SMT printer not yet implemented>");
 }
@@ -308,13 +308,13 @@ fddi_print(const u_char *p, u_int length, u_int caplen)
 }
 
 /*
- * This is the top level routine of the printer.  'sp' is the points
- * to the FDDI header of the packet, 'tvp' is the timestamp,
- * 'length' is the length of the packet off the wire, and 'caplen'
+ * This is the top level routine of the printer.  'p' points
+ * to the FDDI header of the packet, 'h->ts' is the timestamp,
+ * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-fddi_if_print(u_char *pcap, const struct pcap_pkthdr *h,
+fddi_if_print(u_char *pcap _U_, const struct pcap_pkthdr *h,
              register const u_char *p)
 {
        u_int caplen = h->caplen;
index 87fa4b2e135c09617dccabf65ce3448ddcbce893..a2271d67b0fb0edde0598f18c9d8e2d126f18133 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.5 2002-09-05 00:00:12 guy Exp $ (LBL)";
+       "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.6 2002-09-05 21:25:41 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -212,7 +212,7 @@ fr_hdr_print(const u_char *p, int length)
 }
 
 void
-fr_if_print(u_char *user, const struct pcap_pkthdr *h,
+fr_if_print(u_char *user _U_, const struct pcap_pkthdr *h,
             register const u_char *p)
 {
        register u_int length = h->len;
@@ -263,8 +263,8 @@ fr_if_print(u_char *user, const struct pcap_pkthdr *h,
                orgcode = EXTRACT_24BITS(p);
                et = EXTRACT_16BITS(p + 3);
                if (snap_print((const u_char *)(p + 5), length - 5,
-                          caplen - 5, NULL, NULL,
-                          &extracted_ethertype, orgcode, et, 0) == 0) {
+                          caplen - 5, &extracted_ethertype, orgcode, et,
+                          0) == 0) {
                        /* ether_type not known, print raw packet */
                        if (!eflag)
                                fr_hdr_print(p - layer2_len, length + layer2_len);
index 76d176ccbb9d01f472ca6064f4e430519f7113eb..9c17f62a481679a9be985ac571ce35b24fe6bf54 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.8 2002-08-01 08:53:09 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.9 2002-09-05 21:25:41 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -111,12 +111,21 @@ print_mtrace(register const u_char *bp, register u_int len)
 {
     register const struct tr_query *tr = (const struct tr_query *)(bp + 8);
 
+    TCHECK(*tr);
+    if (len < 8 + sizeof (struct tr_query)) {
+       (void)printf(" [invalid len %d]", len);
+       return;
+    }
     printf("mtrace %lu: %s to %s reply-to %s",
         (u_long)TR_GETQID(ntohl(tr->tr_rttlqid)),
         ipaddr_string(&tr->tr_src), ipaddr_string(&tr->tr_dst),
         ipaddr_string(&tr->tr_raddr));
     if (IN_CLASSD(ntohl(tr->tr_raddr)))
         printf(" with-ttl %d", TR_GETTTL(ntohl(tr->tr_rttlqid)));
+    return;
+trunc:
+    (void)printf("[|igmp]");
+    return;
 }
 
 static void
@@ -124,12 +133,21 @@ print_mresp(register const u_char *bp, register u_int len)
 {
     register const struct tr_query *tr = (const struct tr_query *)(bp + 8);
 
+    TCHECK(*tr);
+    if (len < 8 + sizeof (struct tr_query)) {
+       (void)printf(" [invalid len %d]", len);
+       return;
+    }
     printf("mresp %lu: %s to %s reply-to %s",
         (u_long)TR_GETQID(ntohl(tr->tr_rttlqid)),
         ipaddr_string(&tr->tr_src), ipaddr_string(&tr->tr_dst),
         ipaddr_string(&tr->tr_raddr));
     if (IN_CLASSD(ntohl(tr->tr_raddr)))
         printf(" with-ttl %d", TR_GETTTL(ntohl(tr->tr_rttlqid)));
+    return;
+trunc:
+    (void)printf("[|igmp]");
+    return;
 }
 
 static void
index 4a3c0af2f8b94bebf208f78a4a9d99a7101378d6..a94ae30e5e4ae724ba31830ae780ef170243b6e1 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.112 2002-09-05 00:00:13 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.113 2002-09-05 21:25:41 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -450,7 +450,7 @@ again:
 #endif
                case IPPROTO_AH:
                        nh = *cp;
-                       advance = ah_print(cp, (const u_char *)ip);
+                       advance = ah_print(cp);
                        cp += advance;
                        len -= advance;
                        goto again;
@@ -476,7 +476,7 @@ again:
                case IPPROTO_IPCOMP:
                    {
                        int enh;
-                       advance = ipcomp_print(cp, (const u_char *)ip, &enh);
+                       advance = ipcomp_print(cp, &enh);
                        cp += advance;
                        len -= advance;
                        if (enh < 0)
@@ -513,7 +513,7 @@ again:
                        break;
 
                case IPPROTO_EGP:
-                       egp_print(cp, len, (const u_char *)ip);
+                       egp_print(cp);
                        break;
 
 #ifndef IPPROTO_OSPF
index e58b3f9cb6205498c483f0ab93d3e207762c60b7..d30b5b28366586fe0845ddc3d2b9f0309953f901 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.25 2002-08-02 04:10:14 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.26 2002-09-05 21:25:42 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -142,7 +142,7 @@ ip6_print(register const u_char *bp, register u_int length)
                        icmp6_print(cp, (const u_char *)ip6);
                        goto end;
                case IPPROTO_AH:
-                       advance = ah_print(cp, (const u_char *)ip6);
+                       advance = ah_print(cp);
                        nh = *cp;
                        break;
                case IPPROTO_ESP:
@@ -161,7 +161,7 @@ ip6_print(register const u_char *bp, register u_int length)
                case IPPROTO_IPCOMP:
                    {
                        int enh;
-                       advance = ipcomp_print(cp, (const u_char *)ip6, &enh);
+                       advance = ipcomp_print(cp, &enh);
                        if (enh < 0)
                                goto end;
                        nh = enh & 0xff;
index 0d8206062e43708bbd2a836e4b767ec57d5dc03c..2ee0118306222fb302e47069e6a8607f8c5c9f6b 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.14 2002-08-01 08:53:11 risso Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.15 2002-09-05 21:25:42 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -47,7 +47,7 @@ struct ipcomp {
 #include "addrtoname.h"
 
 int
-ipcomp_print(register const u_char *bp, register const u_char *bp2, int *nhdr)
+ipcomp_print(register const u_char *bp, int *nhdr)
 {
        register const struct ipcomp *ipcomp;
        register const u_char *ep;
index 106d3479d9a8dfa4d3b920c376f010de817643cd..43e86fb05fde8fa0e87ef9e5ea1f6e7187f293ee 100644 (file)
@@ -30,7 +30,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.34 2002-09-05 00:43:21 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.35 2002-09-05 21:25:42 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -411,7 +411,7 @@ isakmp_attr_print(const u_char *p, const u_char *ep)
 
 static const u_char *
 isakmp_sa_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
-       u_int32_t doi0, u_int32_t proto0, int depth)
+       u_int32_t doi0 _U_, u_int32_t proto0, int depth)
 {
        const struct isakmp_pl_sa *p;
        struct isakmp_pl_sa sa;
@@ -464,7 +464,7 @@ isakmp_sa_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
 
 static const u_char *
 isakmp_p_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
-       u_int32_t doi0, u_int32_t proto0, int depth)
+       u_int32_t doi0, u_int32_t proto0 _U_, int depth)
 {
        const struct isakmp_pl_p *p;
        struct isakmp_pl_p prop;
@@ -546,8 +546,9 @@ const struct attrmap oakley_t_map[] = {
 };
 
 static const u_char *
-isakmp_t_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
-       u_int32_t doi, u_int32_t proto, int depth)
+isakmp_t_print(const struct isakmp_gen *ext, const u_char *ep,
+       u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto,
+       int depth _U_)
 {
        const struct isakmp_pl_t *p;
        struct isakmp_pl_t t;
@@ -609,8 +610,9 @@ isakmp_t_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
 }
 
 static const u_char *
-isakmp_ke_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
-       u_int32_t doi, u_int32_t proto, int depth)
+isakmp_ke_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+       int depth _U_)
 {
        struct isakmp_gen e;
 
@@ -626,8 +628,9 @@ isakmp_ke_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
 }
 
 static const u_char *
-isakmp_id_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
-       u_int32_t doi, u_int32_t proto, int depth)
+isakmp_id_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase, u_int32_t doi _U_, u_int32_t proto _U_,
+       int depth _U_)
 {
 #define USE_IPSECDOI_IN_PHASE1 1
        const struct isakmp_pl_id *p;
@@ -768,8 +771,9 @@ isakmp_id_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
 }
 
 static const u_char *
-isakmp_cert_print(const struct isakmp_gen *ext, const u_char *ep,
-       u_int32_t phase, u_int32_t doi0, u_int32_t proto0, int depth)
+isakmp_cert_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase _U_, u_int32_t doi0 _U_, u_int32_t proto0 _U_,
+       int depth _U_)
 {
        const struct isakmp_pl_cert *p;
        struct isakmp_pl_cert cert;
@@ -793,8 +797,9 @@ isakmp_cert_print(const struct isakmp_gen *ext, const u_char *ep,
 }
 
 static const u_char *
-isakmp_cr_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
-       u_int32_t doi0, u_int32_t proto0, int depth)
+isakmp_cr_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase _U_, u_int32_t doi0 _U_, u_int32_t proto0 _U_,
+       int depth _U_)
 {
        const struct isakmp_pl_cert *p;
        struct isakmp_pl_cert cert;
@@ -818,8 +823,9 @@ isakmp_cr_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
 }
 
 static const u_char *
-isakmp_hash_print(const struct isakmp_gen *ext, const u_char *ep,
-       u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+isakmp_hash_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+       int depth _U_)
 {
        struct isakmp_gen e;
 
@@ -835,8 +841,9 @@ isakmp_hash_print(const struct isakmp_gen *ext, const u_char *ep,
 }
 
 static const u_char *
-isakmp_sig_print(const struct isakmp_gen *ext, const u_char *ep,
-       u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+isakmp_sig_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+       int depth _U_)
 {
        struct isakmp_gen e;
 
@@ -852,8 +859,9 @@ isakmp_sig_print(const struct isakmp_gen *ext, const u_char *ep,
 }
 
 static const u_char *
-isakmp_nonce_print(const struct isakmp_gen *ext, const u_char *ep,
-       u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+isakmp_nonce_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+       int depth _U_)
 {
        struct isakmp_gen e;
 
@@ -870,7 +878,7 @@ isakmp_nonce_print(const struct isakmp_gen *ext, const u_char *ep,
 
 static const u_char *
 isakmp_n_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
-       u_int32_t doi0, u_int32_t proto0, int depth)
+       u_int32_t doi0 _U_, u_int32_t proto0 _U_, int depth)
 {
        struct isakmp_pl_n *p, n;
        const u_char *cp;
@@ -1002,8 +1010,9 @@ isakmp_n_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
 }
 
 static const u_char *
-isakmp_d_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
-       u_int32_t doi0, u_int32_t proto0, int depth)
+isakmp_d_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase _U_, u_int32_t doi0 _U_, u_int32_t proto0 _U_,
+       int depth _U_)
 {
        const struct isakmp_pl_d *p;
        struct isakmp_pl_d d;
@@ -1039,8 +1048,9 @@ isakmp_d_print(const struct isakmp_gen *ext, const u_char *ep, u_int32_t phase,
 }
 
 static const u_char *
-isakmp_vid_print(const struct isakmp_gen *ext, const u_char *ep,
-       u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+isakmp_vid_print(const struct isakmp_gen *ext, const u_char *ep _U_,
+       u_int32_t phase _U_, u_int32_t doi _U_, u_int32_t proto _U_,
+       int depth _U_)
 {
        struct isakmp_gen e;
 
index 0417ac8388fb957a3bb654e9c5449749d978722e..382a4b60858ec72176142a7235bb964a9000e228 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-krb.c,v 1.17 2002-08-06 04:42:05 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-krb.c,v 1.18 2002-09-05 21:25:43 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -37,11 +37,9 @@ static const char rcsid[] =
 #include "interface.h"
 #include "addrtoname.h"
 
-const u_char *c_print(register const u_char *, register const u_char *);
-const u_char *krb4_print_hdr(const u_char *);
-void krb4_print(const u_char *);
-void krb_print(const u_char *, u_int);
-
+static const u_char *c_print(register const u_char *, register const u_char *);
+static const u_char *krb4_print_hdr(const u_char *);
+static void krb4_print(const u_char *);
 
 #define AUTH_MSG_KDC_REQUEST                   1<<1
 #define AUTH_MSG_KDC_REPLY                     2<<1
@@ -119,7 +117,7 @@ static struct tok kerr2str[] = {
 
 
 
-const u_char *
+static const u_char *
 c_print(register const u_char *s, register const u_char *ep)
 {
        register u_char c;
@@ -148,7 +146,7 @@ c_print(register const u_char *s, register const u_char *ep)
        return (s);
 }
 
-const u_char *
+static const u_char *
 krb4_print_hdr(const u_char *cp)
 {
        cp += 2;
@@ -169,7 +167,7 @@ trunc:
 #undef PRINT
 }
 
-void
+static void
 krb4_print(const u_char *cp)
 {
        register const struct krb *kp;
@@ -247,7 +245,7 @@ trunc:
 }
 
 void
-krb_print(const u_char *dat, u_int length)
+krb_print(const u_char *dat)
 {
        register const struct krb *kp;
 
index a7fa2908d41fd6d319d806767c610929003667a1..41967da51e6602e8f66e4004818af31fa10bf45a 100644 (file)
@@ -22,7 +22,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.15 2002-08-01 08:53:15 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.16 2002-09-05 21:25:43 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -81,8 +81,8 @@ lane_hdr_print(register const u_char *bp, int length)
 }
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the ether header of the packet, 'h->tv' is the timestamp,
+ * This is the top level routine of the printer.  'p' points
+ * to the LANE header of the packet, 'h->ts' is the timestamp,
  * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  *
@@ -166,7 +166,7 @@ lane_print(const u_char *p, u_int length, u_int caplen)
 }
 
 void
-lane_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+lane_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        int caplen = h->caplen;
        int length = h->len;
diff --git a/print-lcp.c b/print-lcp.c
deleted file mode 100644 (file)
index ee0a3a4..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
- *     The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that: (1) source code distributions
- * retain the above copyright notice and this paragraph in its entirety, (2)
- * distributions including binary code include the above copyright notice and
- * this paragraph in its entirety in the documentation or other materials
- * provided with the distribution, and (3) all advertising materials mentioning
- * features or use of this software display the following acknowledgement:
- * ``This product includes software developed by the University of California,
- * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
- * the University nor the names of its contributors may be used to endorse
- * or promote products derived from this software without specific prior
- * written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef lint
-static const char rcsid[] =
-"@(#) $Header: /tcpdump/master/tcpdump/Attic/print-lcp.c,v 1.11 2002-08-01 08:53:17 risso Exp $ (LBL)";
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <tcpdump-stdinc.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "extract.h"                   /* must come after interface.h */
-#include "ppp.h"
-
-/* Codes */
-enum {
-  LCP_CONFREQ = 1,
-  LCP_CONFACK = 2,
-  LCP_CONFNAK = 3,
-  LCP_CONFREJ = 4,
-  LCP_TERMREQ = 5,
-  LCP_TERMACK = 6,
-  LCP_CODEREJ = 7,
-  LCP_PROTREJ = 8,
-  LCP_ECHOREQ = 9,
-  LCP_ECHOREP = 10,
-  LCP_DISCARD = 11
-};
-
-static struct tok lcpcode2str[] = {
-  { LCP_CONFREQ, "ConfReq" },
-  { LCP_CONFACK, "ConfAck" },
-  { LCP_CONFNAK, "ConfNak" },
-  { LCP_CONFREJ, "ConfRej" },
-  { LCP_TERMREQ, "TermReq" },
-  { LCP_TERMACK, "TermAck" },
-  { LCP_CODEREJ, "CodeRej" },
-  { LCP_PROTREJ, "ProtRej" },
-  { LCP_ECHOREQ, "EchoReq" },
-  { LCP_ECHOREP, "EchoRep" },
-  { LCP_DISCARD, "Discard" },
-  { 0, NULL }
-};
-
-
-enum {
-  LCP_RESERVED  = 0,
-  LCP_MRU      = 1,
-  LCP_ASYNCMAP  = 2,
-  LCP_AUTHPROTO = 3,
-  LCP_QUALPROTO = 4,
-  LCP_MAGICNUM  = 5,
-  LCP_PCOMP    = 7,
-  LCP_ACFCOMP  = 8,
-  LCP_CALLBACK  = 13
-};
-
-static struct tok lcpoption2str[] = {
-  { LCP_RESERVED, "reserved"},
-  { LCP_MRU, "mru"},
-  { LCP_ASYNCMAP, "asyncmap"},
-  { LCP_AUTHPROTO, "auth"},
-  { LCP_QUALPROTO, "qual"},
-  { LCP_MAGICNUM, "magic"},
-  { LCP_PCOMP, "pcomp"},
-  { LCP_ACFCOMP, "acfcomp"},
-  { LCP_CALLBACK, "callback"},
-  { 0, NULL }
-};
-
-static struct tok lcpauth2str[] = {
-  {0xc023, "PAP"},
-  {0xc223, "CHAP"},
-  { 0, NULL }
-};
-
-static struct tok lcpqual2str[] = {
-  {0xc025, "LQR"},
-  { 0, NULL }
-};
-
-static struct tok lcpchap2str[] = {
-  {0x05, "MD5"},
-  {0x80, "MS"},
-  { 0, NULL }
-};
-
-void
-lcp_print(register const u_char *bp, u_int length)
-{
-  u_short lcp_code, lcp_id, lcp_length;
-  const u_char *lcp_data;
-
-  lcp_data = bp+4;
-
-  if (snapend < lcp_data) {
-    printf(" [LCP|]");
-    return;
-  }
-
-  lcp_code  = bp[0];
-  lcp_id    = bp[1];
-  lcp_length = EXTRACT_16BITS(bp+2);
-
-  printf("LCP %s id=0x%x", tok2str(lcpcode2str, "LCP-#%d", lcp_code), lcp_id);
-
-  switch (lcp_code) {
-  case LCP_CONFREQ:
-  case LCP_CONFACK:
-  case LCP_CONFNAK:
-  case LCP_CONFREJ:
-    /* Print Options */
-    {
-      u_char lcpopt_type, lcpopt_length;
-      const u_char *p=lcp_data;
-      while (p+2 < lcp_data+lcp_length && p+2 < snapend) {
-       lcpopt_type = p[0];
-       lcpopt_length = p[1];
-       p+=2;
-       printf(" <%s ",tok2str(lcpoption2str, "option-#%d", lcpopt_type));
-       if (lcpopt_length)
-         switch (lcpopt_type) {
-         case LCP_MRU:
-           if (snapend < p+2) return;
-           printf("%d",ntohs(*(u_short*)p));
-           if (lcpopt_length != 4) printf(" len=%d!",lcpopt_length);
-           break;
-         case LCP_AUTHPROTO:
-           if (snapend < p+2) return;
-           printf("%s",tok2str(lcpauth2str, "AUTH-%#x", ntohs(*(u_short*)p)));
-           if (lcpopt_length < 4) printf(" len=%d!",lcpopt_length);
-           if (lcpopt_length >= 5 && p < snapend)
-             printf(" %s",tok2str(lcpchap2str, "%#x", p[0]));
-           break;
-         case LCP_QUALPROTO:
-           if (snapend < p+2) return;
-           printf("%s",tok2str(lcpqual2str, "QUAL-%#x", ntohs(*(u_short*)p)));
-           if (lcpopt_length < 4) printf(" len=%d!",lcpopt_length);
-           /* Print data field of auth? */
-           break;
-         case LCP_ASYNCMAP:
-         case LCP_MAGICNUM:
-           if (snapend < p+4) return;
-           printf("%#x", (unsigned)ntohl(*(u_long*)p));
-           if (lcpopt_length != 6) printf(" len=%d!",lcpopt_length);
-           break;
-         case LCP_PCOMP:
-         case LCP_ACFCOMP:
-         case LCP_RESERVED:
-           if (lcpopt_length != 2) printf(" len=%d!",lcpopt_length);
-           break;
-         default:
-           if (lcpopt_length != 2) printf(" len=%d",lcpopt_length);
-           break;
-         }
-       printf(">");
-       p+=lcpopt_length-2;
-      }
-    }
-    break;
-  case LCP_ECHOREQ:
-  case LCP_ECHOREP:
-  case LCP_DISCARD:
-    if (snapend < lcp_data+4) return;
-    printf(" magic=%#x", (unsigned)ntohl(*(u_long *) lcp_data));
-    lcp_data +=4;
-    break;
-  case LCP_PROTREJ:
-    if (snapend < lcp_data+2) return;
-    printf(" prot=%s", tok2str(ppptype2str, "PROT-%#x", ntohs(*(u_short *) lcp_data)));
-    /* TODO print rejected packet too ? */
-    break;
-  case LCP_CODEREJ:
-    if (snapend < lcp_data+4) return;
-    printf(" ");
-    lcp_print(lcp_data, (lcp_length+lcp_data > snapend ? snapend-lcp_data : lcp_length));
-    break;
-  case LCP_TERMREQ:
-  case LCP_TERMACK:
-    break;
-  default:
-    break;
-  }
-
-  return;
-}
index 73a0ee72c09816f90cdc19bf9d151dba1e4c92c7..cbdd03900b1d273cbaf3148c07052b26e3c0e390 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.49 2002-09-05 00:00:15 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.50 2002-09-05 21:25:44 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -193,8 +193,8 @@ llc_print(const u_char *p, u_int length, u_int caplen,
                 * Does anybody ever bridge one form of LAN traffic
                 * over a networking type that uses 802.2 LLC?
                 */
-               ret = snap_print(p, length, caplen, esrc, edst,
-                   extracted_ethertype, orgcode, et, 2);
+               ret = snap_print(p, length, caplen, extracted_ethertype,
+                   orgcode, et, 2);
                if (ret)
                        return (ret);
        }
@@ -286,8 +286,8 @@ llc_print(const u_char *p, u_int length, u_int caplen,
 
 int
 snap_print(const u_char *p, u_int length, u_int caplen,
-    const u_char *esrc, const u_char *edst, u_short *extracted_ethertype,
-    u_int32_t orgcode, u_short et, u_int bridge_pad)
+    u_short *extracted_ethertype, u_int32_t orgcode, u_short et,
+    u_int bridge_pad)
 {
        register int ret;
 
@@ -325,7 +325,7 @@ snap_print(const u_char *p, u_int length, u_int caplen,
 
        case OUI_CISCO:
                if (et == PID_CISCO_CDP) {
-                       cdp_print(p, length, caplen, esrc, edst);
+                       cdp_print(p, length, caplen);
                        return (1);
                }
                break;
index 821a447d280ad8a161e58b4693987905db853078..cfd41e665706f374a0b573092ce27bafa607e490 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.43 2002-08-01 08:53:22 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.44 2002-09-05 21:25:44 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -97,7 +97,7 @@ null_print(u_int family, u_int length)
 ((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff))
 
 void
-null_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+null_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int length = h->len;
        u_int caplen = h->caplen;
index e1c8af98bee29b5b25b3696746f24b6508070313..b8485ea5ea299a7a22aabaa5b2b93ec4d4446199 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.3 2002-08-01 08:53:23 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.4 2002-09-05 21:25:44 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -97,7 +97,7 @@ pflog_print(const struct pfloghdr *hdr)
 }
 
 void
-pflog_if_print(u_char *user, const struct pcap_pkthdr *h,
+pflog_if_print(u_char *user _U_, const struct pcap_pkthdr *h,
      register const u_char *p)
 {
        u_int length = h->len;
index 3427cdaa6474afb6a4e29b33d41c30b268143aac..6032b1d776c4c10f2737174bab93d820a566e32c 100644 (file)
@@ -31,7 +31,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.69 2002-09-05 00:00:17 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.70 2002-09-05 21:25:45 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -801,7 +801,7 @@ handle_pap(const u_char *p, int length)
 
 /* BAP */
 static void
-handle_bap(const u_char *p, int length)
+handle_bap(const u_char *p _U_, int length _U_)
 {
        /* XXX: to be supported!! */
 }
@@ -1029,7 +1029,7 @@ trunc:
 
 /* PPP I/F printer */
 void
-ppp_if_print(u_char *user, const struct pcap_pkthdr *h,
+ppp_if_print(u_char *user _U_, const struct pcap_pkthdr *h,
             register const u_char *p)
 {
        register u_int length = h->len;
@@ -1113,7 +1113,7 @@ out:
  * This handles, for example, DLT_PPP_SERIAL in NetBSD.
  */
 void
-ppp_hdlc_if_print(u_char *user, const struct pcap_pkthdr *h,
+ppp_hdlc_if_print(u_char *user _U_, const struct pcap_pkthdr *h,
             register const u_char *p)
 {
        register u_int length = h->len;
@@ -1227,8 +1227,8 @@ struct tok ppptype2str[] = {
 
 /* BSD/OS specific PPP printer */
 void
-ppp_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h,
-            register const u_char *p)
+ppp_bsdos_if_print(u_char *user _U_, const struct pcap_pkthdr *h _U_,
+            register const u_char *p _U_)
 {
 #ifdef __bsdi__
        register u_int length = h->len;
@@ -1316,7 +1316,7 @@ ppp_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h,
 
                switch (ptype) {
                case PPP_VJC:
-                       ptype = vjc_print(q, length - (q - p), ptype);
+                       ptype = vjc_print(q, ptype);
                        hdrlength = PPP_BSDI_HDRLEN;
                        p += hdrlength;
                        switch (ptype) {
@@ -1331,7 +1331,7 @@ ppp_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h,
                        }
                        goto printx;
                case PPP_VJNC:
-                       ptype = vjc_print(q, length - (q - p), ptype);
+                       ptype = vjc_print(q, ptype);
                        hdrlength = PPP_BSDI_HDRLEN;
                        p += hdrlength;
                        switch (ptype) {
index 6abe6004374690ced9ebb566f9f1fff3c05d712a..3456225bd33d771b74871463528ab2aa0783b53a 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.17 2002-08-01 08:53:24 risso Exp $ (LBL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.18 2002-09-05 21:25:45 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -90,7 +90,7 @@ static struct tok pppoetag2str[] = {
 #define PPPOE_HDRLEN 6
 
 void
-pppoe_if_print(u_char *user, const struct pcap_pkthdr *h,
+pppoe_if_print(u_char *user _U_, const struct pcap_pkthdr *h,
             register const u_char *p)
 {
        register u_int length = h->len;
index f5026455d4b2c94a34c0bbf37adaa7198bc9a4dd..2213607d1be0e49994d0858e505c0dad2edb9de5 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-     "@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.6 2002-09-05 00:00:17 guy Exp $";
+     "@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.7 2002-09-05 21:25:45 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -961,7 +961,7 @@ trunc:
 }
 
 void
-pptp_print(const u_char *dat, u_int length)
+pptp_print(const u_char *dat)
 {
        const struct pptp_hdr *hdr;
        u_int32_t mc;
index b4a2139dd39e8d32c98c770f6e44c589c79b78e3..c8cba8f74394ba35c2381e1671d7e169ab9403d4 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.36 2002-08-01 08:53:25 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.37 2002-09-05 21:25:46 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -42,7 +42,7 @@ static const char rcsid[] =
  */
 
 void
-raw_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+raw_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int length = h->len;
        u_int caplen = h->caplen;
index 5b2220e6ac0c7847d17e4d610470d9fdc5f25b74..78403a4b41c678e5300c4250336346ccdbcde142 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.51 2002-09-05 00:00:18 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.52 2002-09-05 21:25:46 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -69,7 +69,7 @@ rip_printblk(const u_char *cp, const u_char *ep)
 }
 
 static void
-rip_entry_print_v1(register int vers, register const struct rip_netinfo *ni)
+rip_entry_print_v1(register const struct rip_netinfo *ni)
 {
        register u_short family;
 
@@ -97,7 +97,7 @@ rip_entry_print_v1(register int vers, register const struct rip_netinfo *ni)
 }
 
 static void
-rip_entry_print_v2(register int vers, register const struct rip_netinfo *ni)
+rip_entry_print_v2(register const struct rip_netinfo *ni)
 {
        register u_char *p;
        register u_short family;
@@ -208,9 +208,9 @@ rip_print(const u_char *dat, u_int length)
                        ni = (struct rip_netinfo *)(rp + 1);
                        for (; i >= sizeof(*ni); ++ni) {
                                if (rp->rip_vers == 1)
-                                       rip_entry_print_v1(rp->rip_vers, ni);
+                                       rip_entry_print_v1(ni);
                                else
-                                       rip_entry_print_v2(rp->rip_vers, ni);
+                                       rip_entry_print_v2(ni);
                                i -= sizeof(*ni);
                        }
                        if (trunc)
index 20ea3b33deac2d960176555b864cafbf87376576..ffaefe45d2b93e65fe3c509297ce69cd8cec0c56 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.33 2002-09-05 00:00:19 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.34 2002-09-05 21:25:46 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -398,7 +398,7 @@ static struct rx_cache_entry        rx_cache[RX_CACHE_SIZE];
 
 static int     rx_cache_next = 0;
 static int     rx_cache_hint = 0;
-static void    rx_cache_insert(const u_char *, const struct ip *, int, int);
+static void    rx_cache_insert(const u_char *, const struct ip *, int);
 static int     rx_cache_find(const struct rx_header *, const struct ip *,
                              int, int32_t *);
 
@@ -418,7 +418,7 @@ static void vol_print(const u_char *, int);
 static void vol_reply_print(const u_char *, int, int32_t);
 static void bos_print(const u_char *, int);
 static void bos_reply_print(const u_char *, int, int32_t);
-static void ubik_print(const u_char *, int);
+static void ubik_print(const u_char *);
 static void ubik_reply_print(const u_char *, int, int32_t);
 
 static void rx_ack_print(const u_char *, int);
@@ -500,7 +500,7 @@ rx_print(register const u_char *bp, int length, int sport, int dport,
                 * have a chance to print out replies
                 */
 
-               rx_cache_insert(bp, (const struct ip *) bp2, dport, length);
+               rx_cache_insert(bp, (const struct ip *) bp2, dport);
 
                switch (dport) {
                        case FS_RX_PORT:        /* AFS file service */
@@ -586,8 +586,7 @@ rx_print(register const u_char *bp, int length, int sport, int dport,
  */
 
 static void
-rx_cache_insert(const u_char *bp, const struct ip *ip, int dport,
-               int length)
+rx_cache_insert(const u_char *bp, const struct ip *ip, int dport)
 {
        struct rx_cache_entry *rxent;
        const struct rx_header *rxh = (const struct rx_header *) bp;
@@ -1308,7 +1307,7 @@ prot_print(register const u_char *bp, int length)
        printf(" pt");
 
        if (is_ubik(pt_op)) {
-               ubik_print(bp, length);
+               ubik_print(bp);
                return;
        }
 
@@ -1562,7 +1561,7 @@ vldb_print(register const u_char *bp, int length)
        printf(" vldb");
 
        if (is_ubik(vldb_op)) {
-               ubik_print(bp, length);
+               ubik_print(bp);
                return;
        }
        printf(" call %s", tok2str(vldb_req, "op#%d", vldb_op));
@@ -1841,7 +1840,7 @@ kauth_print(register const u_char *bp, int length)
        printf(" kauth");
 
        if (is_ubik(kauth_op)) {
-               ubik_print(bp, length);
+               ubik_print(bp);
                return;
        }
 
@@ -2195,7 +2194,7 @@ is_ubik(u_int32_t opcode)
  */
 
 static void
-ubik_print(register const u_char *bp, int length)
+ubik_print(register const u_char *bp)
 {
        int ubik_op;
        int32_t temp;
index ff2b86c70a7a489a2a43ad85755cddd9bb3f30de..4fec3d0906c2d1dcac03513bbd217d456233f77f 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.58 2002-08-01 08:53:28 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.59 2002-09-05 21:25:47 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -49,7 +49,7 @@ static void sliplink_print(const u_char *, const struct ip *, u_int);
 static void compressed_sl_print(const u_char *, const struct ip *, u_int, int);
 
 void
-sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+sl_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        register u_int caplen = h->caplen;
        register u_int length = h->len;
@@ -101,7 +101,7 @@ sl_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
 
 
 void
-sl_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+sl_bsdos_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        register u_int caplen = h->caplen;
        register u_int length = h->len;
index 4fb792e0d9378f9c41b8c22162277937fe199f7f..7454d334a5c12a5bb6ae80bd0fd50d7dcbf6293e 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.8 2002-08-01 08:53:28 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.9 2002-09-05 21:25:48 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -87,13 +87,13 @@ sll_print(register const struct sll_header *sllp, u_int length)
 }
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the ether header of the packet, 'h->tv' is the timestamp,
+ * This is the top level routine of the printer.  'p' points to the
+ * Linux "cooked capture" header of the packet, 'h->ts' is the timestamp,
  * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-sll_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+sll_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
index 058bf0e60efaf39ddc6f37579812ef1376bac667..985575c23d60f83ce948c2d1cc756d517b53510c 100644 (file)
@@ -12,7 +12,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-     "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.26 2002-09-05 00:00:20 guy Exp $";
+     "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.27 2002-09-05 21:25:48 guy Exp $";
 #endif
 
 #include <tcpdump-stdinc.h>
@@ -169,7 +169,7 @@ struct smbfnsint trans2_fns[] = {
 
 
 static void
-print_trans2(const u_char *words, const u_char *dat, const u_char *buf, const u_char *maxbuf)
+print_trans2(const u_char *words, const u_char *dat _U_, const u_char *buf, const u_char *maxbuf)
 {
     static struct smbfnsint *fn = &trans2_fns[0];
     const u_char *data, *param;
@@ -382,7 +382,7 @@ trunc:
 
 
 static void
-print_negprot(const u_char *words, const u_char *data, const u_char *buf, const u_char *maxbuf)
+print_negprot(const u_char *words, const u_char *data, const u_char *buf _U_, const u_char *maxbuf)
 {
     u_int wcnt;
     const char *f1 = NULL, *f2 = NULL;
@@ -417,7 +417,7 @@ trunc:
 }
 
 static void
-print_sesssetup(const u_char *words, const u_char *data, const u_char *buf, const u_char *maxbuf)
+print_sesssetup(const u_char *words, const u_char *data, const u_char *buf _U_, const u_char *maxbuf)
 {
     u_int wcnt;
     const char *f1 = NULL, *f2 = NULL;
index 057272b9c6cb4522c8966f3011d323c49b7b0a88..dd7169576c41438f269d48513641e990be8f1c1f 100644 (file)
@@ -11,7 +11,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.9 2002-08-01 08:53:30 risso Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.10 2002-09-05 21:25:49 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,7 +36,7 @@ stp_print_bridge_id(const u_char *p)
 }
 
 static void
-stp_print_config_bpdu(const u_char *p, u_int length)
+stp_print_config_bpdu(const u_char *p)
 {
        printf("config ");
        if (p[7] & 1)
@@ -59,7 +59,7 @@ stp_print_config_bpdu(const u_char *p, u_int length)
 }
 
 static void
-stp_print_tcn_bpdu(const u_char *p, u_int length)
+stp_print_tcn_bpdu(void)
 {
        printf("tcn");
 }
@@ -84,11 +84,11 @@ stp_print(const u_char *p, u_int length)
        case 0:
                if (length < 10)
                        goto trunc;
-               stp_print_config_bpdu(p, length);
+               stp_print_config_bpdu(p);
                break;
 
        case 1:
-               stp_print_tcn_bpdu(p, length);
+               stp_print_tcn_bpdu();
                break;
 
        default:
index f3aafe94135f8a9f6caa7053b9df3d28be1ab61a..3df26fb2c26343f6e853f05ed7d61c3658d1e339 100644 (file)
@@ -31,7 +31,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.3 2002-08-05 07:47:23 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.4 2002-09-05 21:25:49 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -64,13 +64,13 @@ struct rtentry;
 #define PT_LLC         0x02    /* LLC encapsulation */
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the SunATM pseudo-header for the packet, 'h->tv' is the timestamp,
+ * This is the top level routine of the printer.  'p' points
+ * to the SunATM pseudo-header for the packet, 'h->ts' is the timestamp,
  * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-sunatm_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+sunatm_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
index 536fd57ac09395e4081c14a7fab55baa7ccd3f65..e423f8c3320c6f7c7c82b63cc11a1c15157672db 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.102 2002-09-05 00:00:22 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.103 2002-09-05 21:25:49 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -601,7 +601,7 @@ tcp_print(register const u_char *bp, register u_int length,
                } else if (sport == BGP_PORT || dport == BGP_PORT)
                        bgp_print(bp, length);
                else if (sport == PPTP_PORT || dport == PPTP_PORT)
-                       pptp_print(bp, length);
+                       pptp_print(bp);
 #ifdef TCPDUMP_DO_SMB
                else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT)
                        nbt_tcp_print(bp, length);
index d6fc3b0f8792bab90b4850e3cf33b811fc25afb2..0396cee94bad455254d88c27de563e173557e5ec 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.5 2002-09-05 00:00:23 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.6 2002-09-05 21:25:50 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -43,7 +43,7 @@ static const char *tsptype[TSPTYPENUMBER] =
   "TEST", "SETDATE", "SETDATEREQ", "LOOP" };
 
 void
-timed_print(register const u_char *bp, u_int length)
+timed_print(register const u_char *bp)
 {
 #define endof(x) ((u_char *)&(x) + sizeof (x))
        struct tsp *tsp = (struct tsp *)bp;
index dd8066911f7d524288b54e8a5e74dd8347ad6bf2..81a3024945ba9a75dec69c8b32b2b2f110816018 100644 (file)
@@ -25,7 +25,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.18 2002-09-05 00:00:23 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.19 2002-09-05 21:25:50 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -195,13 +195,13 @@ token_print(const u_char *p, u_int length, u_int caplen)
 }
 
 /*
- * This is the top level routine of the printer.  'p' is the points
- * to the TR header of the packet, 'tvp' is the timestamp,
- * 'length' is the length of the packet off the wire, and 'caplen'
+ * This is the top level routine of the printer.  'p' points
+ * to the TR header of the packet, 'h->ts' is the timestamp,
+ * 'h->length' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 void
-token_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
+token_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
index 3e19a2ce72f968c5a5c6e5ad48efc464c1116804..b1f466095a80a10769219b42b1abb76b425693b4 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.108 2002-08-20 00:01:38 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.109 2002-09-05 21:25:50 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -105,7 +105,7 @@ struct rtcp_rr {
 #define RTCP_PT_APP    204
 
 static void
-vat_print(const void *hdr, u_int len, register const struct udphdr *up)
+vat_print(const void *hdr, register const struct udphdr *up)
 {
        /* vat/vt audio */
        u_int ts = *(u_int16_t *)hdr;
@@ -489,7 +489,7 @@ udp_print(register const u_char *bp, u_int length,
 
                case PT_VAT:
                        udpipaddr_print(ip, sport, dport);
-                       vat_print((void *)(up + 1), length, up);
+                       vat_print((void *)(up + 1), up);
                        break;
 
                case PT_WB:
@@ -526,7 +526,7 @@ udp_print(register const u_char *bp, u_int length,
 
                case PT_CNFP:
                        udpipaddr_print(ip, sport, dport);
-                       cnfp_print(cp, length, (const u_char *)ip);
+                       cnfp_print(cp, (const u_char *)ip);
                        break;
                }
                return;
@@ -598,12 +598,11 @@ udp_print(register const u_char *bp, u_int length,
                if (ISPORT(NAMESERVER_PORT) || ISPORT(MULTICASTDNS_PORT))
                        ns_print((const u_char *)(up + 1), length);
                else if (ISPORT(TIMED_PORT))
-                       timed_print((const u_char *)(up + 1), length);
+                       timed_print((const u_char *)(up + 1));
                else if (ISPORT(TFTP_PORT))
                        tftp_print((const u_char *)(up + 1), length);
                else if (ISPORT(IPPORT_BOOTPC) || ISPORT(IPPORT_BOOTPS))
-                       bootp_print((const u_char *)(up + 1), length,
-                           sport, dport);
+                       bootp_print((const u_char *)(up + 1), sport, dport);
                else if (ISPORT(RIP_PORT))
                        rip_print((const u_char *)(up + 1), length);
                else if (ISPORT(ISAKMP_PORT))
@@ -617,7 +616,7 @@ udp_print(register const u_char *bp, u_int length,
                else if (ISPORT(NTP_PORT))
                        ntp_print((const u_char *)(up + 1), length);
                else if (ISPORT(KERBEROS_PORT) || ISPORT(KERBEROS_SEC_PORT))
-                       krb_print((const void *)(up + 1), length);
+                       krb_print((const void *)(up + 1));
                else if (ISPORT(L2TP_PORT))
                        l2tp_print((const u_char *)(up + 1), length);
 #ifdef TCPDUMP_DO_SMB
@@ -627,7 +626,7 @@ udp_print(register const u_char *bp, u_int length,
                        nbt_udp138_print((const u_char *)(up + 1), length);
 #endif
                else if (dport == 3456)
-                       vat_print((const void *)(up + 1), length, up);
+                       vat_print((const void *)(up + 1), up);
                else if (ISPORT(ZEPHYR_SRV_PORT) || ISPORT(ZEPHYR_CLT_PORT))
                        zephyr_print((const void *)(up + 1), length);
                /*
index 51375164c15e574887e848042cd403d6400e8e38..52c083ba5f8cdd952e6be52aca135a5c82341cb4 100644 (file)
@@ -25,7 +25,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-vjc.c,v 1.10 2002-08-01 08:53:34 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-vjc.c,v 1.11 2002-09-05 21:25:51 guy Exp $ (LBL)";
 #endif
 
 #include <tcpdump-stdinc.h>
@@ -40,7 +40,7 @@ static const char rcsid[] =
 #include "ppp.h"
 
 int
-vjc_print(register const char *bp, register u_int length, u_short proto)
+vjc_print(register const char *bp, u_short proto)
 {
        int i;
 
index 5640078138177112cfe0d958ee6e820a1d9c1fa5..8f2e5e3a7e64f19b1de79991a86d171e1a8bd774 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -30,7 +30,7 @@ static const char copyright[] =
     "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.185 2002-09-05 01:31:42 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.186 2002-09-05 21:25:51 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -776,7 +776,7 @@ default_print(register const u_char *bp, register u_int length)
 }
 
 #ifdef SIGINFO
-RETSIGTYPE requestinfo(int signo)
+RETSIGTYPE requestinfo(int signo _U_)
 {
        if (infodelay)
                ++infoprint;
index d234d6737274d3c4022ea472be19b7cc7ee633c5..7a0404e0bdeac911288f412a9afc266e6bd6dc88 100644 (file)
@@ -68,7 +68,6 @@ OBJS = \
        ../../print-krb.o \
        ../../print-l2tp.o \
        ../../print-lane.o \
-       ../../print-lcp.o \
        ../../print-llc.o \
        ../../print-lwres.o \
        ../../print-mobile.o \
index 9a78dc3b8ac4470f3bcf430b9960639b8798fa68..8b489b79388353df281f137e5c11b2bd49e387f1 100644 (file)
@@ -281,10 +281,6 @@ SOURCE="..\..\print-lane.c"
 # End Source File
 # Begin Source File
 
-SOURCE="..\..\print-lcp.c"
-# End Source File
-# Begin Source File
-
 SOURCE="..\..\print-llc.c"
 # End Source File
 # Begin Source File