forked from osmocom/wireshark
Added a proto_reg_handoff_frame() function and switched from
using dissect_data() to using call_dissector() svn path=/trunk/; revision=4268
This commit is contained in:
parent
d08dbcc357
commit
7537283cc6
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* Top-most dissector. Decides dissector based on Wiretap Encapsulation Type.
|
||||
*
|
||||
* $Id: packet-frame.c,v 1.10 2001/11/01 04:00:56 gram Exp $
|
||||
* $Id: packet-frame.c,v 1.11 2001/11/26 01:23:59 hagbard Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -49,6 +49,8 @@ int proto_malformed = -1;
|
|||
|
||||
static gint ett_frame = -1;
|
||||
|
||||
static dissector_handle_t data_handle;
|
||||
|
||||
/* Preferences */
|
||||
static gboolean show_file_off = FALSE;
|
||||
|
||||
|
@ -138,7 +140,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
col_set_str(pinfo->fd, COL_PROTOCOL, "UNKNOWN");
|
||||
if (check_col(pinfo->fd, COL_INFO))
|
||||
col_add_fstr(pinfo->fd, COL_INFO, "WTAP_ENCAP = 0x%x", pinfo->fd->lnk_t);
|
||||
dissect_data(tvb, 0, pinfo, tree);
|
||||
call_dissector(data_handle,tvb, pinfo, tree);
|
||||
}
|
||||
}
|
||||
CATCH(BoundsError) {
|
||||
|
@ -225,3 +227,8 @@ proto_register_frame(void)
|
|||
prefs_register_bool_preference(frame_module, "show_file_off",
|
||||
"Show File Offset", "Show File Offset", &show_file_off);
|
||||
}
|
||||
|
||||
void
|
||||
proto_reg_handoff_frame(void){
|
||||
data_handle = find_dissector("data");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue