print-krb.c
print-l2tp.c
print-lane.c
-print-lcp.c
print-llc.c
print-lwres.c
print-mobile.c
-@(#) $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.
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
# 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)
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 \
-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.
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
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
* 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
#define __attribute__(x)
#endif
+#define _U_ __attribute__((unused))
+
/* snprintf et al */
#include <stdarg.h>
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);
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 *,
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 *);
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 *);
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);
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);
#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
*/
#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) */
#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 };
#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
NULL
};
-static int wep_print(const u_char *p,u_int length)
+static int wep_print(const u_char *p)
{
u_int32_t iv;
* 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;
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;
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;
}
-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;
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;
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;
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;
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;
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;
* 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:
* 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)
}
-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;
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:
* 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:
}
/*
- * 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;
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,
packetp = p;
snapend = p + caplen;
- HEADER_LENGTH=GetHeaderLength(fc);
-
length -= HEADER_LENGTH;
caplen -= HEADER_LENGTH;
p += HEADER_LENGTH;
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;
}
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;
}
* 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)));
#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
#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;
*/
#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
}
/*
- * 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;
#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
* 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;
*/
#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
}
/*
- * 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;
*/
#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
* 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;
#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
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;
#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
/* 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;
#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
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.
}
/*
- * 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;
}
if (eflag)
- cip_print(p, length);
+ cip_print(length);
/*
* Some printers want to get back at the ethernet addresses,
&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)));
#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
};
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;
#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
}
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;
#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
/* 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;
/* 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;
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);
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);
case T_TXT:
putchar(' ');
- (void)ns_cprint(cp, bp);
+ (void)ns_cprint(cp);
break;
#ifdef INET6
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 */
}
#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
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;
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:
}
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));
}
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));
}
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));
#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
};
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;
}
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) {
egp->egp_intgw,
egp->egp_extgw);
if (vflag)
- egpnrprint(egp, length);
+ egpnrprint(egp);
break;
case EGPT_ERROR:
*/
#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
}
/*
- * 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;
#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
}
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>");
}
}
/*
- * 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;
#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
}
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;
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);
#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
{
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
{
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
#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
#endif
case IPPROTO_AH:
nh = *cp;
- advance = ah_print(cp, (const u_char *)ip);
+ advance = ah_print(cp);
cp += advance;
len -= advance;
goto 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)
break;
case IPPROTO_EGP:
- egp_print(cp, len, (const u_char *)ip);
+ egp_print(cp);
break;
#ifndef IPPROTO_OSPF
#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
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:
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;
#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
#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;
#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
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;
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;
};
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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;
}
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;
}
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;
#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
#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
-const u_char *
+static const u_char *
c_print(register const u_char *s, register const u_char *ep)
{
register u_char c;
return (s);
}
-const u_char *
+static const u_char *
krb4_print_hdr(const u_char *cp)
{
cp += 2;
#undef PRINT
}
-void
+static void
krb4_print(const u_char *cp)
{
register const struct krb *kp;
}
void
-krb_print(const u_char *dat, u_int length)
+krb_print(const u_char *dat)
{
register const struct krb *kp;
#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
}
/*
- * 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.
*
}
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;
+++ /dev/null
-/*
- * 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;
-}
#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
* 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);
}
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;
case OUI_CISCO:
if (et == PID_CISCO_CDP) {
- cdp_print(p, length, caplen, esrc, edst);
+ cdp_print(p, length, caplen);
return (1);
}
break;
#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
((((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;
#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
}
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;
#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
/* 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!! */
}
/* 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;
* 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;
/* 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;
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) {
}
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) {
#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
#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;
#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
}
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;
#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
*/
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;
#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
}
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;
}
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;
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)
#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
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 *);
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);
* 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 */
*/
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;
printf(" pt");
if (is_ubik(pt_op)) {
- ubik_print(bp, length);
+ ubik_print(bp);
return;
}
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));
printf(" kauth");
if (is_ubik(kauth_op)) {
- ubik_print(bp, length);
+ ubik_print(bp);
return;
}
*/
static void
-ubik_print(register const u_char *bp, int length)
+ubik_print(register const u_char *bp)
{
int ubik_op;
int32_t temp;
#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
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;
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;
*/
#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
}
/*
- * 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;
#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>
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;
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;
}
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;
#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
}
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)
}
static void
-stp_print_tcn_bpdu(const u_char *p, u_int length)
+stp_print_tcn_bpdu(void)
{
printf("tcn");
}
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:
*/
#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
#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;
#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
} 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);
#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
"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;
*/
#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
}
/*
- * 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;
#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
#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;
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:
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;
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))
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
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);
/*
#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>
#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;
"@(#) 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
/*
}
#ifdef SIGINFO
-RETSIGTYPE requestinfo(int signo)
+RETSIGTYPE requestinfo(int signo _U_)
{
if (infodelay)
++infoprint;
../../print-krb.o \
../../print-l2tp.o \
../../print-lane.o \
- ../../print-lcp.o \
../../print-llc.o \
../../print-lwres.o \
../../print-mobile.o \
# 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