summaryrefslogtreecommitdiff
path: root/print-pppoe.c
diff options
context:
space:
mode:
authorguy <guy>2001-07-05 18:54:13 +0000
committerguy <guy>2001-07-05 18:54:13 +0000
commit176a3e498602351ae25833cf7456c1e30f7f59ae (patch)
treef6232fbc4f99e7043b1b41552a1ecbd3e534d458 /print-pppoe.c
parent2cfe2bf4a5bdba199215e4c92129a36271b10a64 (diff)
downloadtcpdump-176a3e498602351ae25833cf7456c1e30f7f59ae.tar.gz
Put the infodelay wrapping into the remaining "XXX_if_print()" routines.
Split the Cisco HDLC printer into "chdlc_if_print()", which does the stuff expected of a low-level print routine (printing the time stamp, printing the final newline, doing the infodelay stuff) and "chdlc_print()", which doesn't do that stuff. This lets us clean up "ppp_hdlc_if_print()" a bit - it can just print the time stamp at the beginning, and do the infodelay stuff at the end, without having to treat Cisco HDLC specially by skipping the time stamp printing. (This also ensures that the time stamp is always printed, which wasn't the case before.) Print the missing final newline in "pppoe_if_print()".
Diffstat (limited to 'print-pppoe.c')
-rw-r--r--print-pppoe.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/print-pppoe.c b/print-pppoe.c
index 5369a983..c6a2cb44 100644
--- a/print-pppoe.c
+++ b/print-pppoe.c
@@ -21,7 +21,7 @@
#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
@@ -100,6 +100,7 @@ pppoe_if_print(u_char *user, const struct pcap_pkthdr *h,
register u_int length = h->len;
register u_int caplen = h->caplen;
+ ++infodelay;
ts_print(&h->ts);
/*
@@ -111,6 +112,10 @@ pppoe_if_print(u_char *user, const struct pcap_pkthdr *h,
snapend = p + caplen;
pppoe_print(p, length);
+ putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}
void