summaryrefslogtreecommitdiff
path: root/print-atm.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-atm.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-atm.c')
-rw-r--r--print-atm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/print-atm.c b/print-atm.c
index 7458116f..e2a2a46e 100644
--- a/print-atm.c
+++ b/print-atm.c
@@ -20,7 +20,7 @@
*/
#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
@@ -53,6 +53,7 @@ atm_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
u_int length = h->len;
u_short ethertype;
+ ++infodelay;
ts_print(&h->ts);
if (caplen < 8) {
@@ -141,4 +142,7 @@ atm_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
default_print(p, caplen);
out:
putchar('\n');
+ --infodelay;
+ if (infoprint)
+ info(0);
}