Convert LAPD and V.120 dissector to use tvbuff. Convert xdlc dissector-helper,
[obnox/wireshark/wip.git] / packet.c
index 76457bc26d8553f3e1a8282c8d445f8fb58b776c..eef7e534620e7f323e97c8e82bd6c9521d208938 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -1,7 +1,7 @@
 /* packet.c
  * Routines for packet disassembly
  *
- * $Id: packet.c,v 1.89 2000/05/25 07:42:26 gram Exp $
+ * $Id: packet.c,v 1.93 2000/05/31 03:58:55 gram Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -1168,7 +1168,7 @@ dissect_packet(union wtap_pseudo_header *pseudo_header, const u_char *pd,
        pi.len = fd->pkt_len;
        pi.captured_len = fd->cap_len;
 
-       tvb = tvb_new_real_data(pd, fd->cap_len, -1);
+       tvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len);
        pi.fd = fd;
        pi.compat_top_tvb = tvb;
        pi.pseudo_header = pseudo_header;
@@ -1194,25 +1194,25 @@ dissect_packet(union wtap_pseudo_header *pseudo_header, const u_char *pd,
                                dissect_ppp(tvb, &pi, tree);
                                break;
                        case WTAP_ENCAP_LAPB :
-                               dissect_lapb(pseudo_header, pd, fd, tree);
+                               dissect_lapb(tvb, &pi, tree);
                                break;
                        case WTAP_ENCAP_RAW_IP :
                                dissect_raw(tvb, &pi, tree);
                                break;
                        case WTAP_ENCAP_LINUX_ATM_CLIP :
-                               dissect_clip(pd, fd, tree);
+                               dissect_clip(tvb, &pi, tree);
                                break;
                        case WTAP_ENCAP_ATM_SNIFFER :
-                               dissect_atm(pseudo_header, pd, fd, tree);
+                               dissect_atm(tvb, &pi, tree);
                                break;
                        case WTAP_ENCAP_ASCEND :
                                dissect_ascend(tvb, &pi, tree);
                                break;
                        case WTAP_ENCAP_LAPD :
-                               dissect_lapd(pseudo_header, pd, fd, tree);
+                               dissect_lapd(tvb, &pi, tree);
                                break;
                        case WTAP_ENCAP_V120 :
-                               dissect_v120(pseudo_header, pd, fd, tree);
+                               dissect_v120(tvb, &pi, tree);
                                break;
                }
        }