]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sunatm.c
Address Michael's comments.
[tcpdump] / print-sunatm.c
index 3df26fb2c26343f6e853f05ed7d61c3658d1e339..e6f19e8586f15dbddcfd46f574f9250d3ae5a80e 100644 (file)
@@ -30,8 +30,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef lint
-static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.4 2002-09-05 21:25:49 guy Exp $ (LBL)";
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.8 2004-03-17 23:24:38 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -66,11 +66,11 @@ struct rtentry;
 /*
  * 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'
+ * 'h->len' 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 _U_, const struct pcap_pkthdr *h, const u_char *p)
+u_int
+sunatm_if_print(const struct pcap_pkthdr *h, const u_char *p)
 {
        u_int caplen = h->caplen;
        u_int length = h->len;
@@ -78,11 +78,9 @@ sunatm_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
        u_char vpi;
        u_int traftype;
 
-       ts_print(&h->ts);
-
        if (caplen < PKT_BEGIN_POS) {
                printf("[|atm]");
-               goto out;
+               return (caplen);
        }
 
        if (eflag) {
@@ -115,9 +113,5 @@ sunatm_if_print(u_char *user _U_, const struct pcap_pkthdr *h, const u_char *p)
        length -= PKT_BEGIN_POS;
        atm_print(vpi, vci, traftype, p, length, caplen);
 
- out:
-       putchar('\n');
-       --infodelay;
-       if (infoprint)
-               info(0);
+       return (PKT_BEGIN_POS);
 }