/* 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;
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) {
void
proto_reg_handoff_sll(void)
{
+ dissector_handle_t sll_handle;
+
/*
* Get handles for the IPX and LLC dissectors.
*/
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);
}