Update dissect_ndr_nt_STRING so it can also accept FT_BYTES and for that type
[obnox/wireshark/wip.git] / packet-sll.c
index eabcd0b7bd4e48fa1f95f76fc8b7c0236d60a3bd..bed9459242e24f46a97a28bb328bddc93481c626 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-sll.c
  * Routines for disassembly of packets from Linux "cooked mode" captures
  *
- * $Id: packet-sll.c,v 1.13 2001/11/25 22:19:25 hagbard Exp $
+ * $Id: packet-sll.c,v 1.16 2002/01/21 07:36:42 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #include <stdio.h>
 #include <string.h>
 #include <glib.h>
-#include "packet.h"
+#include <epan/packet.h>
 #include "packet-sll.h"
 #include "packet-ipx.h"
 #include "packet-llc.h"
-#include "resolv.h"
+#include <epan/resolv.h>
 #include "etypes.h"
 
 static int proto_sll = -1;
@@ -143,15 +143,15 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        tvbuff_t *next_tvb;
        proto_tree *fh_tree = NULL;
 
-       if (check_col(pinfo->fd, COL_PROTOCOL))
-               col_set_str(pinfo->fd, COL_PROTOCOL, "SLL");
-       if (check_col(pinfo->fd, COL_INFO))
-               col_clear(pinfo->fd, COL_INFO);
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "SLL");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
 
        pkttype = tvb_get_ntohs(tvb, 0);
 
-       if (check_col(pinfo->fd, COL_INFO))
-               col_add_str(pinfo->fd, COL_INFO,
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_add_str(pinfo->cinfo, COL_INFO,
                    val_to_str(pkttype, packet_type_vals, "Unknown (%u)"));
 
        if (tree) {
@@ -280,6 +280,8 @@ proto_register_sll(void)
 void
 proto_reg_handoff_sll(void)
 {
+       dissector_handle_t sll_handle;
+
        /*
         * Get handles for the IPX and LLC dissectors.
         */
@@ -287,5 +289,6 @@ proto_reg_handoff_sll(void)
        ipx_handle = find_dissector("ipx");
        data_handle = find_dissector("data");
 
-       dissector_add("wtap_encap", WTAP_ENCAP_SLL, dissect_sll, proto_sll);
+       sll_handle = create_dissector_handle(dissect_sll, proto_sll);
+       dissector_add("wtap_encap", WTAP_ENCAP_SLL, sll_handle);
 }