* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.165 2001-07-04 22:03:13 fenner Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.166 2001-07-05 18:54:13 guy Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
const u_char *);
extern void chdlc_if_print(u_char *, const struct pcap_pkthdr *,
const u_char *);
+extern void chdlc_print(register const u_char *, u_int, u_int);
extern void sll_if_print(u_char *, const struct pcap_pkthdr *, const u_char *);
extern void snmp_print(const u_char *, u_int);
extern void sunrpcrequest_print(const u_char *, u_int, const u_char *);
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.4 2001-06-15 07:39:43 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.5 2001-07-05 18:54:13 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
u_int HEADER_LENGTH;
u_short extracted_ethertype;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < IEEE802_11_FC_LEN) {
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.3 2001-05-22 06:23:29 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.4 2001-07-05 18:54:14 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
u_int seqid = 0;
u_char arc_type;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < ARC_HDRLEN) {
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
/*
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.66 2001-06-18 08:52:53 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.67 2001-07-05 18:54:14 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
ltalk_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
{
snapend = p + h->caplen;
+ ++infodelay;
ts_print(&h->ts);
llap_print(p, h->caplen);
if(xflag)
default_print(p, h->caplen);
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
/*
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.20 2000-12-22 22:45:09 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.21 2001-07-05 18:54:14 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
u_int length = h->len;
u_short ethertype;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < 8) {
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.11 2000-10-09 01:53:19 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.12 2001-07-05 18:54:14 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
{
register u_int length = h->len;
register u_int caplen = h->caplen;
- const struct ip *ip;
- u_int proto;
+ ++infodelay;
ts_print(&h->ts);
- if (caplen < CHDLC_HDRLEN) {
- printf("[|chdlc]");
- goto out;
- }
-
/*
* Some printers want to get back at the link level addresses,
* and/or check that they're not walking off the end of the packet.
* Rather than pass them all the way down, we set these globals.
*/
- proto = ntohs(*(u_short *)&p[2]);
packetp = p;
snapend = p + caplen;
+ chdlc_print(p, length, caplen);
+
+ putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
+}
+
+void
+chdlc_print(register const u_char *p, u_int length, u_int caplen)
+{
+ const struct ip *ip;
+ u_int proto;
+
+ if (caplen < CHDLC_HDRLEN) {
+ printf("[|chdlc]");
+ return;
+ }
+
+ proto = ntohs(*(u_short *)&p[2]);
if (eflag) {
switch (p[0]) {
case CHDLC_UNICAST:
}
if (xflag)
default_print((const u_char *)ip, caplen - CHDLC_HDRLEN);
-out:
- putchar('\n');
}
struct cisco_slarp {
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.13 2001-06-08 04:48:23 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.14 2001-07-05 18:54:15 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
u_short extracted_ethertype;
u_short *bp;
+ ++infodelay;
ts_print(&h->ts);
if (memcmp(rfcllc, p, sizeof(rfcllc))==0 && caplen < RFC1483LLC_LEN) {
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.11 2000-12-22 22:45:11 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.12 2001-07-05 18:54:15 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
u_short ether_type;
u_short extracted_ethertype;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < sizeof(struct lecdatahdr_8023)) {
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.40 2000-12-16 22:00:50 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.41 2001-07-05 18:54:15 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
const struct ip *ip;
u_int family;
+ ++infodelay;
ts_print(&h->ts);
memcpy((char *)&family, (char *)p, sizeof(family));
if (xflag)
default_print((const u_char *)ip, caplen - NULL_HDRLEN);
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.61 2001-06-11 10:33:03 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.62 2001-07-05 18:54:16 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
register u_int length = h->len;
register u_int caplen = h->caplen;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < PPP_HDRLEN) {
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
/*
register u_int caplen = h->caplen;
u_int proto;
+ ++infodelay;
+ ts_print(&h->ts);
+
if (caplen < 2) {
printf("[|ppp]");
goto out;
goto out;
}
- ts_print(&h->ts);
if (eflag)
printf("%02x %02x %d ", p[0], p[1], length);
p += 2;
case CHDLC_UNICAST:
case CHDLC_BCAST:
- /*
- * Have the Cisco HDLC print routine do all the work.
- */
- chdlc_if_print(user, h, p);
- return;
+ chdlc_print(p, length, caplen);
+ goto out;
default:
- ts_print(&h->ts);
if (eflag)
printf("%02x %02x %d ", p[0], p[1], length);
p += 2;
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
const u_char *q;
int i;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < PPP_BSDI_HDRLEN) {
default_print((const u_char *)p, caplen - hdrlength);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
#endif /* __bsdi__ */
}
#ifndef lint
static const char rcsid[] =
-"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.14 2001-06-20 07:40:44 guy Exp $ (LBL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.15 2001-07-05 18:54:17 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
register u_int length = h->len;
register u_int caplen = h->caplen;
+ ++infodelay;
ts_print(&h->ts);
/*
snapend = p + caplen;
pppoe_print(p, length);
+ putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
void
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.33 2000-10-06 04:23:13 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.34 2001-07-05 18:54:17 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
u_int length = h->len;
u_int caplen = h->caplen;
+ ++infodelay;
ts_print(&h->ts);
/*
if (xflag)
default_print(p, caplen);
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.56 2000-10-10 05:06:10 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.57 2001-07-05 18:54:17 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
register u_int length = h->len;
register const struct ip *ip;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < SLIP_HDRLEN) {
default_print((u_char *)ip, caplen - SLIP_HDRLEN);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
register u_int length = h->len;
register const struct ip *ip;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < SLIP_HDRLEN) {
default_print((u_char *)ip, caplen - SLIP_HDRLEN);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
static void
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.5 2001-06-08 04:48:23 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.6 2001-07-05 18:54:18 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
u_short ether_type;
u_short extracted_ethertype;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < SLL_HDR_LEN) {
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}