create_dissector_handle -> new_create_dissector_handle
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: Ie514f126352e7598acc4f7c38db9c61d105d5e48 Reviewed-on: https://code.wireshark.org/review/11850 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
6012ba8f00
commit
bbdd89b973
|
@ -229,7 +229,7 @@ static header_field_info hfi_2dparityfec_payload _2DPARITYFEC_HFI_INIT =
|
|||
HFILL};
|
||||
|
||||
|
||||
static void dissect_2dparityfec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int dissect_2dparityfec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 OffsetField;
|
||||
guint8 NAField;
|
||||
|
@ -287,6 +287,8 @@ static void dissect_2dparityfec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
|
|||
proto_tree_add_item(tree_2dparityfec, &hfi_2dparityfec_snbase_ext, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1;
|
||||
proto_tree_add_item(tree_2dparityfec, &hfi_2dparityfec_payload, tvb, offset, -1, ENC_NA);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void proto_register_2dparityfec(void)
|
||||
|
@ -338,7 +340,7 @@ void proto_register_2dparityfec(void)
|
|||
"as FEC data corresponding to Pro-MPEG Code of Practice #3 release 2",
|
||||
&dissect_fec);
|
||||
|
||||
handle_2dparityfec = create_dissector_handle(dissect_2dparityfec,
|
||||
handle_2dparityfec = new_create_dissector_handle(dissect_2dparityfec,
|
||||
proto_2dparityfec);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@ static dissector_handle_t data_handle;
|
|||
* but with random stuff that appears neither to be XNS nor Retix
|
||||
* spanning tree.
|
||||
*/
|
||||
static void
|
||||
dissect_3com_xns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_3com_xns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_tree *subtree;
|
||||
proto_tree *ti;
|
||||
|
@ -88,6 +88,7 @@ dissect_3com_xns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
type, next_tvb, pinfo, tree))
|
||||
call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -123,7 +124,7 @@ proto_reg_handoff_3com_xns(void)
|
|||
|
||||
ethertype_subdissector_table = find_dissector_table("ethertype");
|
||||
|
||||
our_xns_handle = create_dissector_handle(dissect_3com_xns, proto_3com_xns);
|
||||
our_xns_handle = new_create_dissector_handle(dissect_3com_xns, proto_3com_xns);
|
||||
dissector_add_uint("llc.dsap", 0x80, our_xns_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -632,8 +632,8 @@ dissect_a21_ie_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, p
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_a21(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_a21(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 message_type;
|
||||
int offset = 0;
|
||||
|
@ -673,7 +673,7 @@ dissect_a21(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
dissect_a21_ie_common(tvb, pinfo, tree, a21_tree, offset, message_type);
|
||||
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void proto_register_a21(void)
|
||||
|
@ -963,7 +963,7 @@ void proto_reg_handoff_a21(void)
|
|||
|
||||
|
||||
if (!a21_prefs_initialized) {
|
||||
a21_handle = create_dissector_handle(dissect_a21, proto_a21);
|
||||
a21_handle = new_create_dissector_handle(dissect_a21, proto_a21);
|
||||
gcsna_handle = find_dissector("gcsna");
|
||||
dissector_add_uint("udp.port", a21_udp_port, a21_handle);
|
||||
a21_prefs_initialized = TRUE;
|
||||
|
|
|
@ -141,8 +141,8 @@ tvb_aarpproaddr_to_str(tvbuff_t *tvb, gint offset, int ad_len, guint16 type)
|
|||
#define AR_OP 6
|
||||
#define MIN_AARP_HEADER_SIZE 8
|
||||
|
||||
static void
|
||||
dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
||||
static int
|
||||
dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) {
|
||||
guint16 ar_hrd;
|
||||
guint16 ar_pro;
|
||||
guint8 ar_hln;
|
||||
|
@ -253,6 +253,7 @@ dissect_aarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
}
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -340,7 +341,7 @@ proto_reg_handoff_aarp(void)
|
|||
{
|
||||
dissector_handle_t aarp_handle;
|
||||
|
||||
aarp_handle = create_dissector_handle(dissect_aarp, proto_aarp);
|
||||
aarp_handle = new_create_dissector_handle(dissect_aarp, proto_aarp);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_AARP, aarp_handle);
|
||||
dissector_add_uint("chdlc.protocol", ETHERTYPE_AARP, aarp_handle);
|
||||
}
|
||||
|
|
|
@ -76,8 +76,8 @@ static gint ett_acap_reqresp = -1;
|
|||
|
||||
#define TCP_PORT_ACAP 674
|
||||
|
||||
static void
|
||||
dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
gboolean is_request;
|
||||
proto_tree *acap_tree, *reqresp_tree;
|
||||
|
@ -179,6 +179,7 @@ dissect_acap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
* state information to the packets.
|
||||
*/
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -209,7 +210,7 @@ proto_register_acap(void)
|
|||
proto_register_fields(proto_acap, hfi, array_length(hfi));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
acap_handle = create_dissector_handle(dissect_acap, proto_acap);
|
||||
acap_handle = new_create_dissector_handle(dissect_acap, proto_acap);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -63,8 +63,8 @@ static int hf_ans_team_id = -1;
|
|||
static gint ett_ans = -1;
|
||||
|
||||
/* Code to actually dissect the packets */
|
||||
static void
|
||||
dissect_ans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *ans_tree = NULL;
|
||||
|
@ -89,6 +89,7 @@ dissect_ans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(ans_tree, hf_ans_sender_id, tvb, 8, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(ans_tree, hf_ans_team_id, tvb, 10, 6, ENC_NA);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -138,7 +139,7 @@ proto_reg_handoff_ans(void)
|
|||
{
|
||||
dissector_handle_t ans_handle;
|
||||
|
||||
ans_handle = create_dissector_handle(dissect_ans, proto_ans);
|
||||
ans_handle = new_create_dissector_handle(dissect_ans, proto_ans);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_INTEL_ANS, ans_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -3317,8 +3317,8 @@ dissect_ansi_683_rev_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ansi
|
|||
(*ansi_683_rev_msg_fcn[idx])(tvb, pinfo, ansi_683_tree, tvb_reported_length(tvb) - 1, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_ansi_683(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ansi_683(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ansi_683_item;
|
||||
proto_tree *ansi_683_tree;
|
||||
|
@ -3345,6 +3345,7 @@ dissect_ansi_683(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
dissect_ansi_683_rev_message(tvb, pinfo, ansi_683_tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3573,7 +3574,7 @@ proto_reg_handoff_ansi_683(void)
|
|||
{
|
||||
dissector_handle_t ansi_683_handle;
|
||||
|
||||
ansi_683_handle = create_dissector_handle(dissect_ansi_683, proto_ansi_683);
|
||||
ansi_683_handle = new_create_dissector_handle(dissect_ansi_683, proto_ansi_683);
|
||||
|
||||
dissector_add_uint("ansi_map.ota", ANSI_683_FORWARD, ansi_683_handle);
|
||||
dissector_add_uint("ansi_map.ota", ANSI_683_REVERSE, ansi_683_handle);
|
||||
|
|
|
@ -10396,10 +10396,11 @@ dissect_bsmap_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_bsmap_common(tvb, pinfo, tree, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -10571,14 +10572,15 @@ dissect_dtap_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_dtap_common(tvb, pinfo, tree, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_sip_dtap_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_sip_dtap_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
gint linelen, offset, next_offset, begin;
|
||||
guint8 *msg_type;
|
||||
|
@ -10639,6 +10641,7 @@ dissect_sip_dtap_bsmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* TAP STAT INFO */
|
||||
|
@ -12979,9 +12982,9 @@ proto_reg_handoff_ansi_a(void)
|
|||
{
|
||||
dissector_handle_t bsmap_handle, sip_dtap_bsmap_handle;
|
||||
|
||||
bsmap_handle = create_dissector_handle(dissect_bsmap, proto_a_bsmap);
|
||||
dtap_handle = create_dissector_handle(dissect_dtap, proto_a_dtap);
|
||||
sip_dtap_bsmap_handle = create_dissector_handle(dissect_sip_dtap_bsmap, proto_a_dtap);
|
||||
bsmap_handle = new_create_dissector_handle(dissect_bsmap, proto_a_bsmap);
|
||||
dtap_handle = new_create_dissector_handle(dissect_dtap, proto_a_dtap);
|
||||
sip_dtap_bsmap_handle = new_create_dissector_handle(dissect_sip_dtap_bsmap, proto_a_dtap);
|
||||
data_handle = find_dissector("data");
|
||||
|
||||
dissector_add_uint("bsap.pdu_type", BSSAP_PDU_TYPE_BSMAP, bsmap_handle);
|
||||
|
|
|
@ -61,8 +61,8 @@ capture_ap1394(const guchar *pd, int offset, int len, packet_counts *ld)
|
|||
capture_ethertype(etype, pd, offset, len, ld);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_ap1394(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ap1394(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *fh_tree = NULL;
|
||||
|
@ -90,7 +90,10 @@ dissect_ap1394(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
next_tvb = tvb_new_subset_remaining(tvb, 18);
|
||||
if (!dissector_try_uint(ethertype_subdissector_table, etype, next_tvb,
|
||||
pinfo, tree))
|
||||
call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
{
|
||||
call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -126,7 +129,7 @@ proto_reg_handoff_ap1394(void)
|
|||
|
||||
ethertype_subdissector_table = find_dissector_table("ethertype");
|
||||
|
||||
ap1394_handle = create_dissector_handle(dissect_ap1394, proto_ap1394);
|
||||
ap1394_handle = new_create_dissector_handle(dissect_ap1394, proto_ap1394);
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_APPLE_IP_OVER_IEEE1394, ap1394_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -265,14 +265,16 @@ test_applemidi(tvbuff_t *tvb, guint16 *command_p, gboolean conversation_establis
|
|||
/* dissect_applemidi() is called when a packet is seen from a previously identified applemidi conversation */
|
||||
/* If the packet isn't a valid applemidi packet, assume it's an RTP-MIDI packet. */
|
||||
|
||||
static void
|
||||
dissect_applemidi( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
|
||||
static int
|
||||
dissect_applemidi( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ ) {
|
||||
guint16 command;
|
||||
|
||||
if ( test_applemidi( tvb, &command, TRUE ) )
|
||||
dissect_applemidi_common( tvb, pinfo, tree, command );
|
||||
else
|
||||
call_dissector( rtp_handle, tvb, pinfo, tree );
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -516,7 +518,7 @@ void
|
|||
proto_reg_handoff_applemidi( void ) {
|
||||
|
||||
|
||||
applemidi_handle = create_dissector_handle( dissect_applemidi, proto_applemidi );
|
||||
applemidi_handle = new_create_dissector_handle( dissect_applemidi, proto_applemidi );
|
||||
|
||||
/* If we cannot decode the data it will be RTP-MIDI since the Apple session protocol uses
|
||||
* two ports: the control-port and the MIDI-port. On both ports an invitation is being sent.
|
||||
|
|
|
@ -283,10 +283,11 @@ dissect_arcnet_common (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
* BSD-style ARCNET headers - they don't have the offset field from the
|
||||
* ARCNET hardware packet, but we might get an exception frame header.
|
||||
*/
|
||||
static void
|
||||
dissect_arcnet (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
||||
static int
|
||||
dissect_arcnet (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
|
||||
{
|
||||
dissect_arcnet_common (tvb, pinfo, tree, FALSE, TRUE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -294,10 +295,11 @@ dissect_arcnet (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
* ARCNET hardware packet, but we should never see an exception frame
|
||||
* header.
|
||||
*/
|
||||
static void
|
||||
dissect_arcnet_linux (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
||||
static int
|
||||
dissect_arcnet_linux (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
|
||||
{
|
||||
dissect_arcnet_common (tvb, pinfo, tree, TRUE, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static const value_string arcnet_prot_id_vals[] = {
|
||||
|
@ -394,10 +396,10 @@ proto_reg_handoff_arcnet (void)
|
|||
{
|
||||
dissector_handle_t arcnet_handle, arcnet_linux_handle;
|
||||
|
||||
arcnet_handle = create_dissector_handle (dissect_arcnet, proto_arcnet);
|
||||
arcnet_handle = new_create_dissector_handle (dissect_arcnet, proto_arcnet);
|
||||
dissector_add_uint ("wtap_encap", WTAP_ENCAP_ARCNET, arcnet_handle);
|
||||
|
||||
arcnet_linux_handle = create_dissector_handle (dissect_arcnet_linux,
|
||||
arcnet_linux_handle = new_create_dissector_handle (dissect_arcnet_linux,
|
||||
proto_arcnet);
|
||||
dissector_add_uint ("wtap_encap", WTAP_ENCAP_ARCNET_LINUX, arcnet_linux_handle);
|
||||
data_handle = find_dissector ("data");
|
||||
|
|
|
@ -828,8 +828,8 @@ check_for_storm_count(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/*
|
||||
* RFC 2225 ATMARP - it's just like ARP, except where it isn't.
|
||||
*/
|
||||
static void
|
||||
dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint16 ar_hrd;
|
||||
guint16 ar_pro;
|
||||
|
@ -1188,13 +1188,14 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tvb, tpa_offset, ar_tpln, ENC_BIG_ENDIAN);
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/*
|
||||
* AX.25 ARP - it's just like ARP, except where it isn't.
|
||||
*/
|
||||
static void
|
||||
dissect_ax25arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ax25arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
#define ARP_AX25 204
|
||||
|
||||
|
@ -1357,6 +1358,7 @@ dissect_ax25arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
check_for_storm_count(tvb, pinfo, arp_tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static const guint8 mac_allzero[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
@ -1966,8 +1968,8 @@ proto_register_arp(void)
|
|||
expert_arp = expert_register_protocol(proto_arp);
|
||||
expert_register_field_array(expert_arp, ei, array_length(ei));
|
||||
|
||||
atmarp_handle = create_dissector_handle(dissect_atmarp, proto_arp);
|
||||
ax25arp_handle = create_dissector_handle(dissect_ax25arp, proto_arp);
|
||||
atmarp_handle = new_create_dissector_handle(dissect_atmarp, proto_arp);
|
||||
ax25arp_handle = new_create_dissector_handle(dissect_ax25arp, proto_arp);
|
||||
|
||||
arp_handle = register_dissector( "arp" , dissect_arp, proto_arp );
|
||||
|
||||
|
|
|
@ -3096,8 +3096,8 @@ dissect_artnet_file_fn_reply(tvbuff_t *tvb _U_, guint offset, proto_tree *tree _
|
|||
return offset;
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
||||
static int
|
||||
dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) {
|
||||
gint offset = 0;
|
||||
guint size;
|
||||
guint16 opcode;
|
||||
|
@ -3784,13 +3784,14 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
if (tvb_reported_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_item(artnet_tree, hf_artnet_data, tvb, offset, -1, ENC_NA);
|
||||
}
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
if (tvb_reported_length_remaining(tvb, offset) > 0) {
|
||||
proto_tree_add_item(artnet_tree, hf_artnet_excess_bytes, tvb,
|
||||
offset, -1, ENC_NA);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* Heuristic dissector */
|
||||
|
@ -3809,7 +3810,7 @@ dissect_artnet_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
|
|||
return FALSE;
|
||||
|
||||
/* if the header matches, dissect it */
|
||||
dissect_artnet(tvb, pinfo, tree);
|
||||
dissect_artnet(tvb, pinfo, tree, data);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -5260,7 +5261,7 @@ void
|
|||
proto_reg_handoff_artnet(void) {
|
||||
dissector_handle_t artnet_handle;
|
||||
|
||||
artnet_handle = create_dissector_handle(dissect_artnet, proto_artnet);
|
||||
artnet_handle = new_create_dissector_handle(dissect_artnet, proto_artnet);
|
||||
dissector_add_for_decode_as("udp.port", artnet_handle);
|
||||
rdm_handle = find_dissector("rdm");
|
||||
dmx_chan_handle = find_dissector("dmx-chan");
|
||||
|
|
|
@ -50,8 +50,8 @@ static const value_string adp_type_val[] =
|
|||
{0, NULL},
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_aruba_adp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_aruba_adp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_tree *ti = NULL;
|
||||
proto_tree *aruba_adp_tree = NULL;
|
||||
|
@ -102,6 +102,7 @@ dissect_aruba_adp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -146,7 +147,7 @@ proto_reg_handoff_aruba_adp(void)
|
|||
{
|
||||
dissector_handle_t adp_handle;
|
||||
|
||||
adp_handle = create_dissector_handle(dissect_aruba_adp, proto_aruba_adp);
|
||||
adp_handle = new_create_dissector_handle(dissect_aruba_adp, proto_aruba_adp);
|
||||
dissector_add_uint("udp.port", UDP_PORT_ADP, adp_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -202,8 +202,8 @@ dissect_aruba_erm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, in
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_aruba_erm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_aruba_erm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
|
@ -219,12 +219,12 @@ dissect_aruba_erm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
}
|
||||
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_aruba_erm_type0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_aruba_erm_type0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
tvbuff_t * next_tvb;
|
||||
int offset = 0;
|
||||
|
@ -239,10 +239,11 @@ dissect_aruba_erm_type0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* No way to determine if TX or RX packet... (TX = no FCS, RX = FCS...)*/
|
||||
call_dissector(wlan_withfcs_handle, next_tvb, pinfo, tree);
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_aruba_erm_type1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_aruba_erm_type1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
|
@ -251,10 +252,11 @@ dissect_aruba_erm_type1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* Say to PEEK dissector, it is a Aruba PEEK packet */
|
||||
call_dissector_with_data(peek_handle, tvb, pinfo, tree, GUINT_TO_POINTER(IS_ARUBA));
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_aruba_erm_type2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_aruba_erm_type2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
|
@ -264,10 +266,11 @@ dissect_aruba_erm_type2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_expert(tree, pinfo, &ei_aruba_erm_airmagnet, tvb, offset, -1);
|
||||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_aruba_erm_type3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_aruba_erm_type3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
tvbuff_t * next_tvb;
|
||||
int offset = 0;
|
||||
|
@ -317,10 +320,11 @@ dissect_aruba_erm_type3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
phdr.fcs_len = 4; /* We have an FCS */
|
||||
}
|
||||
call_dissector_with_data(wlan_radio_handle, next_tvb, pinfo, tree, &phdr);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_aruba_erm_type4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_aruba_erm_type4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
|
@ -328,11 +332,12 @@ dissect_aruba_erm_type4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
call_dissector(ppi_handle, tvb, pinfo, tree);
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* Type 5 is the same of type 1 but with Peek Header version = 2, named internaly Peekremote -ng */
|
||||
static void
|
||||
dissect_aruba_erm_type5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_aruba_erm_type5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
|
@ -341,6 +346,7 @@ dissect_aruba_erm_type5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* Say to PEEK dissector, it is a Aruba PEEK packet */
|
||||
call_dissector_with_data(peek_handle, tvb, pinfo, tree, GUINT_TO_POINTER(IS_ARUBA));
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -474,13 +480,13 @@ proto_reg_handoff_aruba_erm(void)
|
|||
ppi_handle = find_dissector("ppi");
|
||||
peek_handle = find_dissector("peekremote");
|
||||
data_handle = find_dissector("data");
|
||||
aruba_erm_handle = create_dissector_handle(dissect_aruba_erm, proto_aruba_erm);
|
||||
aruba_erm_handle_type0 = create_dissector_handle(dissect_aruba_erm_type0, proto_aruba_erm_type0);
|
||||
aruba_erm_handle_type1 = create_dissector_handle(dissect_aruba_erm_type1, proto_aruba_erm_type1);
|
||||
aruba_erm_handle_type2 = create_dissector_handle(dissect_aruba_erm_type2, proto_aruba_erm_type2);
|
||||
aruba_erm_handle_type3 = create_dissector_handle(dissect_aruba_erm_type3, proto_aruba_erm_type3);
|
||||
aruba_erm_handle_type4 = create_dissector_handle(dissect_aruba_erm_type4, proto_aruba_erm_type4);
|
||||
aruba_erm_handle_type5 = create_dissector_handle(dissect_aruba_erm_type5, proto_aruba_erm_type5);
|
||||
aruba_erm_handle = new_create_dissector_handle(dissect_aruba_erm, proto_aruba_erm);
|
||||
aruba_erm_handle_type0 = new_create_dissector_handle(dissect_aruba_erm_type0, proto_aruba_erm_type0);
|
||||
aruba_erm_handle_type1 = new_create_dissector_handle(dissect_aruba_erm_type1, proto_aruba_erm_type1);
|
||||
aruba_erm_handle_type2 = new_create_dissector_handle(dissect_aruba_erm_type2, proto_aruba_erm_type2);
|
||||
aruba_erm_handle_type3 = new_create_dissector_handle(dissect_aruba_erm_type3, proto_aruba_erm_type3);
|
||||
aruba_erm_handle_type4 = new_create_dissector_handle(dissect_aruba_erm_type4, proto_aruba_erm_type4);
|
||||
aruba_erm_handle_type5 = new_create_dissector_handle(dissect_aruba_erm_type5, proto_aruba_erm_type5);
|
||||
initialized = TRUE;
|
||||
} else {
|
||||
dissector_delete_uint_range("udp.port", aruba_erm_port_range, aruba_erm_handle);
|
||||
|
|
|
@ -105,8 +105,8 @@ static void
|
|||
dissect_parameters(tvbuff_t *, proto_tree *);
|
||||
static void
|
||||
dissect_parameter(tvbuff_t *, proto_tree *);
|
||||
static void
|
||||
dissect_asap(tvbuff_t *, packet_info *, proto_tree *);
|
||||
static int
|
||||
dissect_asap(tvbuff_t *, packet_info *, proto_tree *, void *);
|
||||
|
||||
#define ADD_PADDING(x) ((((x) + 3) >> 2) << 2)
|
||||
|
||||
|
@ -187,7 +187,7 @@ dissect_error_cause(tvbuff_t *cause_tvb, proto_tree *parameter_tree)
|
|||
break;
|
||||
case UNRECONGNIZED_MESSAGE_CAUSE_CODE:
|
||||
message_tvb = tvb_new_subset_remaining(cause_tvb, CAUSE_INFO_OFFSET);
|
||||
dissect_asap(message_tvb, NULL, cause_tree);
|
||||
dissect_asap(message_tvb, NULL, cause_tree, NULL);
|
||||
break;
|
||||
case INVALID_VALUES:
|
||||
parameter_tvb = tvb_new_subset_remaining(cause_tvb, CAUSE_INFO_OFFSET);
|
||||
|
@ -829,8 +829,8 @@ dissect_asap_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *asap
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_asap(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_asap(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *asap_item;
|
||||
proto_tree *asap_tree;
|
||||
|
@ -839,17 +839,13 @@ dissect_asap(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (pinfo)
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ASAP");
|
||||
|
||||
/* In the interest of speed, if "tree" is NULL, don't do any work not
|
||||
necessary to generate protocol tree items. */
|
||||
if (tree) {
|
||||
/* create the asap protocol tree */
|
||||
asap_item = proto_tree_add_item(tree, proto_asap, message_tvb, 0, -1, ENC_NA);
|
||||
asap_tree = proto_item_add_subtree(asap_item, ett_asap);
|
||||
} else {
|
||||
asap_tree = NULL;
|
||||
};
|
||||
/* create the asap protocol tree */
|
||||
asap_item = proto_tree_add_item(tree, proto_asap, message_tvb, 0, -1, ENC_NA);
|
||||
asap_tree = proto_item_add_subtree(asap_item, ett_asap);
|
||||
|
||||
/* dissect the message */
|
||||
dissect_asap_message(message_tvb, pinfo, asap_tree);
|
||||
return tvb_captured_length(message_tvb);
|
||||
}
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
|
@ -926,7 +922,7 @@ proto_reg_handoff_asap(void)
|
|||
{
|
||||
dissector_handle_t asap_handle;
|
||||
|
||||
asap_handle = create_dissector_handle(dissect_asap, proto_asap);
|
||||
asap_handle = new_create_dissector_handle(dissect_asap, proto_asap);
|
||||
dissector_add_uint("sctp.ppi", ASAP_PAYLOAD_PROTOCOL_ID, asap_handle);
|
||||
dissector_add_uint("udp.port", ASAP_UDP_PORT, asap_handle);
|
||||
dissector_add_uint("tcp.port", ASAP_TCP_PORT, asap_handle);
|
||||
|
|
|
@ -46,8 +46,8 @@ static const value_string encaps_vals[] = {
|
|||
static dissector_handle_t eth_withoutfcs_handle;
|
||||
static dissector_handle_t ppp_hdlc_handle;
|
||||
|
||||
static void
|
||||
dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_tree *fh_tree;
|
||||
proto_item *ti, *hidden_item;
|
||||
|
@ -109,6 +109,7 @@ dissect_ascend(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -160,7 +161,7 @@ proto_reg_handoff_ascend(void)
|
|||
eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
|
||||
ppp_hdlc_handle = find_dissector("ppp_hdlc");
|
||||
|
||||
ascend_handle = create_dissector_handle(dissect_ascend, proto_ascend);
|
||||
ascend_handle = new_create_dissector_handle(dissect_ascend, proto_ascend);
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_ASCEND, ascend_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -523,8 +523,8 @@ static int dissect_pascal_string(tvbuff_t *tvb, int offset, proto_tree *tree,
|
|||
return offset;
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_rtmp_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
||||
static int
|
||||
dissect_rtmp_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) {
|
||||
proto_tree *rtmp_tree;
|
||||
proto_item *ti;
|
||||
guint8 function;
|
||||
|
@ -543,10 +543,11 @@ dissect_rtmp_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
|
||||
proto_tree_add_uint(rtmp_tree, hf_rtmp_function, tvb, 0, 1, function);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
||||
static int
|
||||
dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) {
|
||||
proto_tree *rtmp_tree;
|
||||
proto_item *ti;
|
||||
int offset = 0;
|
||||
|
@ -628,10 +629,11 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
i++;
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
||||
static int
|
||||
dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) {
|
||||
proto_tree *nbp_tree;
|
||||
proto_tree *nbp_info_tree;
|
||||
proto_item *ti, *info_item;
|
||||
|
@ -689,7 +691,7 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
}
|
||||
}
|
||||
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* -----------------------------
|
||||
|
@ -1287,8 +1289,8 @@ dissect_atp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
return tvb_reported_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_ddp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ddp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_tree *zip_tree = NULL;
|
||||
proto_item *ti;
|
||||
|
@ -1317,7 +1319,7 @@ dissect_ddp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
val_to_str_ext(fn, &zip_function_vals_ext, "Unknown ZIP function (%02x)"));
|
||||
|
||||
if (!tree)
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
|
||||
ti = proto_tree_add_item(tree, proto_zip, tvb, 0, -1, ENC_NA);
|
||||
zip_tree = proto_item_add_subtree(ti, ett_zip);
|
||||
|
@ -1409,6 +1411,7 @@ dissect_ddp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1476,8 +1479,8 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode,
|
|||
call_dissector(data_handle,new_tvb, pinfo, tree);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
e_ddp ddp;
|
||||
proto_tree *ddp_tree;
|
||||
|
@ -1549,7 +1552,10 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
new_tvb = tvb_new_subset_remaining(tvb, DDP_HEADER_SIZE);
|
||||
|
||||
if (!dissector_try_uint(ddp_dissector_table, ddp.type, new_tvb, pinfo, tree))
|
||||
{
|
||||
call_dissector(data_handle,new_tvb, pinfo, tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static const value_string llap_type_vals[] = {
|
||||
|
@ -1569,8 +1575,8 @@ capture_llap(packet_counts *ld)
|
|||
ld->other++;
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 dnode;
|
||||
guint8 snode;
|
||||
|
@ -1603,15 +1609,16 @@ dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (proto_is_protocol_enabled(find_protocol_by_id(proto_ddp))) {
|
||||
pinfo->current_proto = "DDP";
|
||||
dissect_ddp_short(new_tvb, pinfo, dnode, snode, tree);
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
break;
|
||||
case 0x02:
|
||||
if (call_dissector(ddp_handle, new_tvb, pinfo, tree))
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
break;
|
||||
}
|
||||
call_dissector(data_handle,new_tvb, pinfo, tree);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2079,14 +2086,14 @@ proto_reg_handoff_atalk(void)
|
|||
dissector_handle_t zip_ddp_handle;
|
||||
dissector_handle_t rtmp_data_handle, llap_handle;
|
||||
|
||||
ddp_handle = create_dissector_handle(dissect_ddp, proto_ddp);
|
||||
ddp_handle = new_create_dissector_handle(dissect_ddp, proto_ddp);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_ATALK, ddp_handle);
|
||||
dissector_add_uint("chdlc.protocol", ETHERTYPE_ATALK, ddp_handle);
|
||||
dissector_add_uint("ppp.protocol", PPP_AT, ddp_handle);
|
||||
dissector_add_uint("null.type", BSD_AF_APPLETALK, ddp_handle);
|
||||
dissector_add_uint("arcnet.protocol_id", ARCNET_PROTO_APPLETALK, ddp_handle);
|
||||
|
||||
nbp_handle = create_dissector_handle(dissect_nbp, proto_nbp);
|
||||
nbp_handle = new_create_dissector_handle(dissect_nbp, proto_nbp);
|
||||
dissector_add_uint("ddp.type", DDP_NBP, nbp_handle);
|
||||
dissector_add_for_decode_as("udp.port", nbp_handle);
|
||||
|
||||
|
@ -2096,17 +2103,17 @@ proto_reg_handoff_atalk(void)
|
|||
asp_handle = new_create_dissector_handle(dissect_asp, proto_asp);
|
||||
pap_handle = new_create_dissector_handle(dissect_pap, proto_pap);
|
||||
|
||||
rtmp_request_handle = create_dissector_handle(dissect_rtmp_request, proto_rtmp);
|
||||
rtmp_data_handle = create_dissector_handle(dissect_rtmp_data, proto_rtmp);
|
||||
rtmp_request_handle = new_create_dissector_handle(dissect_rtmp_request, proto_rtmp);
|
||||
rtmp_data_handle = new_create_dissector_handle(dissect_rtmp_data, proto_rtmp);
|
||||
dissector_add_uint("ddp.type", DDP_RTMPREQ, rtmp_request_handle);
|
||||
dissector_add_uint("ddp.type", DDP_RTMPDATA, rtmp_data_handle);
|
||||
|
||||
zip_ddp_handle = create_dissector_handle(dissect_ddp_zip, proto_zip);
|
||||
zip_ddp_handle = new_create_dissector_handle(dissect_ddp_zip, proto_zip);
|
||||
dissector_add_uint("ddp.type", DDP_ZIP, zip_ddp_handle);
|
||||
|
||||
zip_atp_handle = new_create_dissector_handle(dissect_atp_zip, proto_zip);
|
||||
|
||||
llap_handle = create_dissector_handle(dissect_llap, proto_llap);
|
||||
llap_handle = new_create_dissector_handle(dissect_llap, proto_llap);
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_LOCALTALK, llap_handle);
|
||||
|
||||
register_init_routine( atp_init);
|
||||
|
|
|
@ -76,10 +76,9 @@ static gint ett_ath = -1;
|
|||
static expert_field ei_ath_hlen_invalid = EI_INIT;
|
||||
static expert_field ei_ath_hmark_invalid = EI_INIT;
|
||||
|
||||
static void
|
||||
dissect_ath(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ath(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
int offset = 0;
|
||||
|
||||
/* various lengths as reported in the packet itself */
|
||||
|
@ -308,7 +307,7 @@ dissect_ath(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
} else {
|
||||
proto_tree_add_expert(tree, pinfo, &ei_ath_hmark_invalid, tvb, offset, -1);
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* set the INFO column, and we're done !
|
||||
|
@ -335,6 +334,7 @@ dissect_ath(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -440,7 +440,7 @@ proto_reg_handoff_ath(void)
|
|||
{
|
||||
static dissector_handle_t ath_handle;
|
||||
|
||||
ath_handle = create_dissector_handle(dissect_ath, proto_ath);
|
||||
ath_handle = new_create_dissector_handle(dissect_ath, proto_ath);
|
||||
dissector_add_uint("udp.port", ATH_PORT, ath_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -687,8 +687,8 @@ capture_lane(const union wtap_pseudo_header *pseudo_header, const guchar *pd,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
tvbuff_t *next_tvb;
|
||||
tvbuff_t *next_tvb_le_client;
|
||||
|
@ -729,12 +729,13 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
call_dissector(data_handle,next_tvb, pinfo, tree);
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_ilmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ilmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_snmp_pdu(tvb, 0, pinfo, tree, proto_ilmi, ett_ilmi, FALSE);
|
||||
return dissect_snmp_pdu(tvb, 0, pinfo, tree, proto_ilmi, ett_ilmi, FALSE);
|
||||
}
|
||||
|
||||
/* AAL types */
|
||||
|
@ -2035,8 +2036,8 @@ proto_reg_handoff_atm(void)
|
|||
gprs_ns_handle = find_dissector("gprs_ns");
|
||||
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_ATM_PDUS, atm_handle);
|
||||
dissector_add_uint("atm.aal5.type", TRAF_LANE, create_dissector_handle(dissect_lane, proto_atm_lane));
|
||||
dissector_add_uint("atm.aal5.type", TRAF_ILMI, create_dissector_handle(dissect_ilmi, proto_ilmi));
|
||||
dissector_add_uint("atm.aal5.type", TRAF_LANE, new_create_dissector_handle(dissect_lane, proto_atm_lane));
|
||||
dissector_add_uint("atm.aal5.type", TRAF_ILMI, new_create_dissector_handle(dissect_ilmi, proto_ilmi));
|
||||
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_ATM_PDUS_UNTRUNCATED,
|
||||
atm_untruncated_handle);
|
||||
|
|
|
@ -113,7 +113,7 @@ static const value_string auto_rp_mask_sign_vals[] = {
|
|||
|
||||
static int do_auto_rp_map(tvbuff_t *tvb, int offset, proto_tree *auto_rp_tree);
|
||||
|
||||
static void dissect_auto_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int dissect_auto_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 ver_type, rp_count;
|
||||
|
||||
|
@ -163,7 +163,7 @@ static void dissect_auto_rp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(tree, hf_auto_rp_trailing_junk, tvb, offset, -1, ENC_NA);
|
||||
}
|
||||
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -297,7 +297,7 @@ proto_reg_handoff_auto_rp(void)
|
|||
{
|
||||
dissector_handle_t auto_rp_handle;
|
||||
|
||||
auto_rp_handle = create_dissector_handle(dissect_auto_rp,
|
||||
auto_rp_handle = new_create_dissector_handle(dissect_auto_rp,
|
||||
proto_auto_rp);
|
||||
dissector_add_uint("udp.port", UDP_PORT_PIM_RP_DISC, auto_rp_handle);
|
||||
}
|
||||
|
|
|
@ -147,8 +147,8 @@ isaprs( guint8 dti )
|
|||
return b;
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_ax25_nol3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree )
|
||||
static int
|
||||
dissect_ax25_nol3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_ )
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *ax25_nol3_tree;
|
||||
|
@ -184,39 +184,37 @@ dissect_ax25_nol3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree )
|
|||
|
||||
/* Call sub-dissectors here */
|
||||
|
||||
if ( parent_tree )
|
||||
/* create display subtree for the protocol */
|
||||
ti = proto_tree_add_protocol_format( parent_tree,
|
||||
proto_ax25_nol3,
|
||||
tvb,
|
||||
0,
|
||||
-1,
|
||||
"AX.25 No Layer 3 - (%s)", info_buffer );
|
||||
ax25_nol3_tree = proto_item_add_subtree( ti, ett_ax25_nol3 );
|
||||
|
||||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
dissected = FALSE;
|
||||
if ( gPREF_APRS )
|
||||
{
|
||||
/* create display subtree for the protocol */
|
||||
ti = proto_tree_add_protocol_format( parent_tree,
|
||||
proto_ax25_nol3,
|
||||
tvb,
|
||||
0,
|
||||
-1,
|
||||
"AX.25 No Layer 3 - (%s)", info_buffer );
|
||||
ax25_nol3_tree = proto_item_add_subtree( ti, ett_ax25_nol3 );
|
||||
|
||||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
dissected = FALSE;
|
||||
if ( gPREF_APRS )
|
||||
if ( isaprs( dti ) )
|
||||
{
|
||||
if ( isaprs( dti ) )
|
||||
{
|
||||
dissected = TRUE;
|
||||
call_dissector( aprs_handle , next_tvb, pinfo, ax25_nol3_tree );
|
||||
}
|
||||
dissected = TRUE;
|
||||
call_dissector( aprs_handle , next_tvb, pinfo, ax25_nol3_tree );
|
||||
}
|
||||
if ( gPREF_DX )
|
||||
{
|
||||
if ( tvb_get_guint8( tvb, offset ) == 'D' && tvb_get_guint8( tvb, offset + 1 ) == 'X' )
|
||||
{
|
||||
dissected = TRUE;
|
||||
dissect_dx( next_tvb, pinfo, ax25_nol3_tree, NULL );
|
||||
}
|
||||
}
|
||||
if ( ! dissected )
|
||||
call_dissector( default_handle , next_tvb, pinfo, ax25_nol3_tree );
|
||||
|
||||
}
|
||||
if ( gPREF_DX )
|
||||
{
|
||||
if ( tvb_get_guint8( tvb, offset ) == 'D' && tvb_get_guint8( tvb, offset + 1 ) == 'X' )
|
||||
{
|
||||
dissected = TRUE;
|
||||
dissect_dx( next_tvb, pinfo, ax25_nol3_tree, NULL );
|
||||
}
|
||||
}
|
||||
if ( ! dissected )
|
||||
call_dissector( default_handle , next_tvb, pinfo, ax25_nol3_tree );
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -286,7 +284,7 @@ proto_register_ax25_nol3(void)
|
|||
void
|
||||
proto_reg_handoff_ax25_nol3(void)
|
||||
{
|
||||
dissector_add_uint( "ax25.pid", AX25_P_NO_L3, create_dissector_handle( dissect_ax25_nol3, proto_ax25_nol3 ) );
|
||||
dissector_add_uint( "ax25.pid", AX25_P_NO_L3, new_create_dissector_handle( dissect_ax25_nol3, proto_ax25_nol3 ) );
|
||||
|
||||
/*
|
||||
*/
|
||||
|
|
|
@ -43,8 +43,8 @@ static int hf_ax4000_crc = -1;
|
|||
static gint ett_ax4000 = -1;
|
||||
|
||||
/* Code to actually dissect the packets */
|
||||
static void
|
||||
dissect_ax4000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ax4000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *ax4000_tree;
|
||||
|
@ -91,6 +91,7 @@ dissect_ax4000(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
hf_ax4000_crc, tvb, 14, 2, tvb_get_letohs(tvb, 14));
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
|
@ -162,7 +163,7 @@ proto_reg_handoff_ax4000(void)
|
|||
{
|
||||
dissector_handle_t ax4000_handle;
|
||||
|
||||
ax4000_handle = create_dissector_handle(dissect_ax4000,
|
||||
ax4000_handle = new_create_dissector_handle(dissect_ax4000,
|
||||
proto_ax4000);
|
||||
dissector_add_uint("ip.proto", IP_PROTO_AX4000, ax4000_handle);
|
||||
dissector_add_uint("tcp.port", AX4000_TCP_PORT, ax4000_handle);
|
||||
|
|
|
@ -187,7 +187,7 @@ static guint global_bat_vis_udp_port = BAT_VIS_PORT;
|
|||
|
||||
|
||||
|
||||
static void dissect_bat_batman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int dissect_bat_batman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 version;
|
||||
int offset = 0;
|
||||
|
@ -208,6 +208,7 @@ static void dissect_bat_batman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
|
|||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void dissect_bat_gwflags(tvbuff_t *tvb, guint8 gwflags, int offset, proto_item *tgw)
|
||||
|
@ -348,7 +349,7 @@ static void dissect_bat_hna(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
|
|||
}
|
||||
|
||||
|
||||
static void dissect_bat_gw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int dissect_bat_gw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
struct gw_packet *gw_packeth;
|
||||
guint32 ip;
|
||||
|
@ -420,9 +421,10 @@ static void dissect_bat_gw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void dissect_bat_vis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int dissect_bat_vis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 version;
|
||||
|
||||
|
@ -442,6 +444,7 @@ static void dissect_bat_vis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void dissect_bat_vis_v22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
|
@ -882,9 +885,9 @@ void proto_reg_handoff_bat(void)
|
|||
bat_tap = register_tap("batman");
|
||||
bat_follow_tap = register_tap("batman_follow");
|
||||
|
||||
batman_handle = create_dissector_handle(dissect_bat_batman, proto_bat_plugin);
|
||||
gw_handle = create_dissector_handle(dissect_bat_gw, proto_bat_gw);
|
||||
vis_handle = create_dissector_handle(dissect_bat_vis, proto_bat_vis);
|
||||
batman_handle = new_create_dissector_handle(dissect_bat_batman, proto_bat_plugin);
|
||||
gw_handle = new_create_dissector_handle(dissect_bat_gw, proto_bat_gw);
|
||||
vis_handle = new_create_dissector_handle(dissect_bat_vis, proto_bat_vis);
|
||||
|
||||
ip_handle = find_dissector("ip");
|
||||
data_handle = find_dissector("data");
|
||||
|
|
|
@ -738,8 +738,8 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int offset;
|
||||
struct beep_proto_data *beep_frame_data;
|
||||
|
@ -892,6 +892,7 @@ dissect_beep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* Register all the bits needed with the filtering engine */
|
||||
|
@ -1016,7 +1017,7 @@ proto_reg_handoff_beep(void)
|
|||
|
||||
if (!beep_prefs_initialized) {
|
||||
|
||||
beep_handle = create_dissector_handle(dissect_beep, proto_beep);
|
||||
beep_handle = new_create_dissector_handle(dissect_beep, proto_beep);
|
||||
|
||||
beep_prefs_initialized = TRUE;
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ static int hf_bofl_padding = -1;
|
|||
static gint ett_bofl = -1;
|
||||
|
||||
/* Code to actually dissect the packets */
|
||||
static void
|
||||
dissect_bofl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_bofl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *bofl_tree;
|
||||
|
@ -88,6 +88,8 @@ dissect_bofl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
len = tvb_reported_length_remaining(tvb, 8);
|
||||
if (len > 0)
|
||||
proto_tree_add_item(bofl_tree, hf_bofl_padding, tvb, 8, -1, ENC_NA);
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -128,7 +130,7 @@ proto_reg_handoff_bofl(void)
|
|||
{
|
||||
dissector_handle_t bofl_handle;
|
||||
|
||||
bofl_handle = create_dissector_handle(dissect_bofl, proto_bofl);
|
||||
bofl_handle = new_create_dissector_handle(dissect_bofl, proto_bofl);
|
||||
dissector_add_uint("ethertype", ETHER_TYPE_BOFL, bofl_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -156,8 +156,8 @@ dissect_brdwlk_err(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
|||
}
|
||||
|
||||
/* Code to actually dissect the packets */
|
||||
static void
|
||||
dissect_brdwlk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_brdwlk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
/* Set up structures needed to add the protocol subtree and manage it */
|
||||
|
@ -313,6 +313,7 @@ dissect_brdwlk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
fc_data.ethertype = ETHERTYPE_BRDWALK;
|
||||
next_tvb = tvb_new_subset(tvb, 2, len, reported_len);
|
||||
call_dissector_with_data(fc_dissector_handle, next_tvb, pinfo, tree, &fc_data);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -404,7 +405,7 @@ proto_reg_handoff_brdwlk(void)
|
|||
{
|
||||
dissector_handle_t brdwlk_handle;
|
||||
|
||||
brdwlk_handle = create_dissector_handle(dissect_brdwlk, proto_brdwlk);
|
||||
brdwlk_handle = new_create_dissector_handle(dissect_brdwlk, proto_brdwlk);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_BRDWALK, brdwlk_handle);
|
||||
dissector_add_uint("ethertype", 0xABCD, brdwlk_handle);
|
||||
fc_dissector_handle = find_dissector("fc");
|
||||
|
|
|
@ -214,8 +214,8 @@ dissect_cattp_rstpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *cattp_tree,
|
|||
}
|
||||
|
||||
/* Dissection of the base header */
|
||||
static void
|
||||
dissect_cattp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_cattp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
const char *pdutype = "[Unknown PDU]";
|
||||
proto_item *ti, *cattp_tree;
|
||||
|
@ -334,6 +334,7 @@ dissect_cattp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* The heuristic dissector function checks if the UDP packet may be a cattp packet */
|
||||
|
@ -354,7 +355,7 @@ dissect_cattp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
|
|||
if ( (flags & M_PDU_SYN) == F_SYN ||
|
||||
(flags & M_PDU_RST) == F_RST ||
|
||||
(flags & M_PDU_ACK) == F_ACK ) { /* check if flag combi is valid */
|
||||
dissect_cattp(tvb, pinfo, tree);
|
||||
dissect_cattp(tvb, pinfo, tree, data);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -574,7 +575,7 @@ proto_reg_handoff_cattp(void)
|
|||
dissector_handle_t cattp_handle;
|
||||
|
||||
/* Create dissector handle */
|
||||
cattp_handle = create_dissector_handle(dissect_cattp, proto_cattp);
|
||||
cattp_handle = new_create_dissector_handle(dissect_cattp, proto_cattp);
|
||||
|
||||
/* find data handle */
|
||||
data_handle = find_dissector("data");
|
||||
|
|
|
@ -270,8 +270,8 @@ static const value_string type_nrgyz_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti, *checksum_item;
|
||||
proto_tree *cdp_tree = NULL, *checksum_tree;
|
||||
|
@ -1039,13 +1039,14 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (length > 4) {
|
||||
proto_tree_add_item(tlv_tree, hf_cdp_data, tvb, offset + 4, length - 4, ENC_NA);
|
||||
} else {
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
}
|
||||
offset += length;
|
||||
}
|
||||
}
|
||||
call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, cdp_tree);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
#define PROTO_TYPE_NLPID 1
|
||||
|
@ -1474,7 +1475,7 @@ proto_reg_handoff_cdp(void)
|
|||
dissector_handle_t cdp_handle;
|
||||
|
||||
data_handle = find_dissector("data");
|
||||
cdp_handle = create_dissector_handle(dissect_cdp, proto_cdp);
|
||||
cdp_handle = new_create_dissector_handle(dissect_cdp, proto_cdp);
|
||||
dissector_add_uint("llc.cisco_pid", 0x2000, cdp_handle);
|
||||
dissector_add_uint("chdlc.protocol", 0x2000, cdp_handle);
|
||||
dissector_add_uint("ppp.protocol", 0x0207, cdp_handle);
|
||||
|
|
|
@ -7079,9 +7079,10 @@ int dissect_ceph(tvbuff_t *tvb, packet_info *pinfo,
|
|||
* Proxies the old style dissector interface to the new style.
|
||||
*/
|
||||
static
|
||||
void dissect_ceph_old(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
int dissect_ceph_old(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_ceph(tvb, pinfo, tree, NULL);
|
||||
dissect_ceph(tvb, pinfo, tree, data);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -10513,7 +10514,7 @@ proto_register_ceph(void)
|
|||
void
|
||||
proto_reg_handoff_ceph(void)
|
||||
{
|
||||
ceph_handle = create_dissector_handle(dissect_ceph_old, proto_ceph);
|
||||
ceph_handle = new_create_dissector_handle(dissect_ceph_old, proto_ceph);
|
||||
|
||||
heur_dissector_add("tcp", dissect_ceph_heur, "Ceph over TCP", "ceph_tcp", proto_ceph, HEURISTIC_ENABLE);
|
||||
}
|
||||
|
|
|
@ -50,8 +50,8 @@ static const value_string type_vals[] = {
|
|||
{ 0, NULL },
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_cgmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_cgmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *cgmp_tree = NULL;
|
||||
|
@ -93,6 +93,7 @@ dissect_cgmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
count--;
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -138,7 +139,7 @@ proto_reg_handoff_cgmp(void)
|
|||
{
|
||||
dissector_handle_t cgmp_handle;
|
||||
|
||||
cgmp_handle = create_dissector_handle(dissect_cgmp, proto_cgmp);
|
||||
cgmp_handle = new_create_dissector_handle(dissect_cgmp, proto_cgmp);
|
||||
dissector_add_uint("llc.cisco_pid", 0x2001, cgmp_handle);
|
||||
dissector_add_uint("ethertype", 0x2001, cgmp_handle);
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@ static gint ett_chargen = -1;
|
|||
* pinfo - packet info
|
||||
* proto_tree - resolved protocol tree
|
||||
*/
|
||||
static void
|
||||
dissect_chargen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_chargen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dissector_data _U_)
|
||||
{
|
||||
proto_tree* chargen_tree;
|
||||
proto_item* ti;
|
||||
|
@ -65,6 +65,7 @@ dissect_chargen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
len, "Data", "Data (%u): %s", len, data);
|
||||
|
||||
/* proto_tree_add_item(chargen_tree, hf_chargen_data, tvb, 0, -1, ENC_ASCII|ENC_NA); */
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -91,7 +92,7 @@ proto_reg_handoff_chargen(void)
|
|||
{
|
||||
dissector_handle_t chargen_handle;
|
||||
|
||||
chargen_handle = create_dissector_handle(dissect_chargen, proto_chargen);
|
||||
chargen_handle = new_create_dissector_handle(dissect_chargen, proto_chargen);
|
||||
dissector_add_uint("udp.port", CHARGEN_PORT_UDP, chargen_handle);
|
||||
dissector_add_uint("tcp.port", CHARGEN_PORT_TCP, chargen_handle);
|
||||
}
|
||||
|
|
|
@ -278,11 +278,11 @@ static const value_string slarp_ptype_vals[] = {
|
|||
{0, NULL}
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *slarp_tree = NULL;
|
||||
proto_tree *slarp_tree;
|
||||
guint32 code;
|
||||
guint32 addr;
|
||||
guint32 mysequence;
|
||||
|
@ -294,10 +294,8 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
code = tvb_get_ntohl(tvb, 0);
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_slarp, tvb, 0, 14, ENC_NA);
|
||||
slarp_tree = proto_item_add_subtree(ti, ett_slarp);
|
||||
}
|
||||
ti = proto_tree_add_item(tree, proto_slarp, tvb, 0, 14, ENC_NA);
|
||||
slarp_tree = proto_item_add_subtree(ti, ett_slarp);
|
||||
|
||||
switch (code) {
|
||||
|
||||
|
@ -321,29 +319,28 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
"%s, outgoing sequence %u, returned sequence %u",
|
||||
val_to_str(code, slarp_ptype_vals, "Unknown (%d)"),
|
||||
mysequence, yoursequence);
|
||||
if (tree) {
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_mysequence, tvb, 4, 4,
|
||||
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_mysequence, tvb, 4, 4,
|
||||
mysequence);
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_yoursequence, tvb, 8, 4,
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_yoursequence, tvb, 8, 4,
|
||||
yoursequence);
|
||||
reliability_item = proto_tree_add_item(slarp_tree, hf_slarp_reliability, tvb,
|
||||
reliability_item = proto_tree_add_item(slarp_tree, hf_slarp_reliability, tvb,
|
||||
12, 2, ENC_BIG_ENDIAN);
|
||||
if (tvb_get_ntohs(tvb, 12) != 0xFFFF) {
|
||||
if (tvb_get_ntohs(tvb, 12) != 0xFFFF) {
|
||||
expert_add_info(pinfo, reliability_item, &ei_slarp_reliability);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown packet type 0x%08X", code);
|
||||
if (tree) {
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
|
||||
call_dissector(data_handle, tvb_new_subset_remaining(tvb, 4), pinfo,
|
||||
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
|
||||
call_dissector(data_handle, tvb_new_subset_remaining(tvb, 4), pinfo,
|
||||
slarp_tree);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -395,7 +392,7 @@ proto_reg_handoff_slarp(void)
|
|||
{
|
||||
dissector_handle_t slarp_handle;
|
||||
|
||||
slarp_handle = create_dissector_handle(dissect_slarp, proto_slarp);
|
||||
slarp_handle = new_create_dissector_handle(dissect_slarp, proto_slarp);
|
||||
dissector_add_uint("chdlc.protocol", CISCO_SLARP, slarp_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -787,8 +787,8 @@ dissect_cimd_operation(tvbuff_t *tvb, proto_tree *tree, gint etxp, guint16 check
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_cimd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_cimd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 OC; /* Operation Code */
|
||||
guint8 PN; /* Packet number */
|
||||
|
@ -800,7 +800,7 @@ dissect_cimd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint8 last1, last2, last3;
|
||||
|
||||
etxp = tvb_find_guint8(tvb, CIMD_PN_OFFSET + CIMD_PN_LENGTH, -1, CIMD_ETX);
|
||||
if (etxp == -1) return;
|
||||
if (etxp == -1) return 0;
|
||||
|
||||
OC = (guint8)strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, CIMD_OC_OFFSET, CIMD_OC_LENGTH, ENC_ASCII), NULL, 10);
|
||||
PN = (guint8)strtoul(tvb_get_string_enc(wmem_packet_scope(), tvb, CIMD_PN_OFFSET, CIMD_PN_LENGTH, ENC_ASCII), NULL, 10);
|
||||
|
@ -834,6 +834,7 @@ dissect_cimd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s - %s", val_to_str(OC, vals_hdr_OC, "Unknown (%d)"), "invalid checksum");
|
||||
|
||||
dissect_cimd_operation(tvb, tree, etxp, checksum, last1, OC, PN);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -870,7 +871,7 @@ dissect_cimd_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
|
|||
return FALSE;
|
||||
|
||||
/* Ok, looks like a valid packet, go dissect. */
|
||||
dissect_cimd(tvb, pinfo, tree);
|
||||
dissect_cimd(tvb, pinfo, tree, data);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1166,7 +1167,7 @@ proto_reg_handoff_cimd(void)
|
|||
/**
|
||||
* Also register as one that can be selected by a TCP port number.
|
||||
*/
|
||||
cimd_handle = create_dissector_handle(dissect_cimd, proto_cimd);
|
||||
cimd_handle = new_create_dissector_handle(dissect_cimd, proto_cimd);
|
||||
dissector_add_for_decode_as("tcp.port", cimd_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -120,8 +120,8 @@ erspan_fmt_timestamp(gchar *result, guint32 timeval)
|
|||
g_snprintf(result, ITEM_LABEL_LENGTH, "%.4f", (((gfloat)timeval)/10000));
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_item *ti_ver;
|
||||
|
@ -144,7 +144,7 @@ dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* Some vendor don't include ERSPAN Header...*/
|
||||
eth_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
call_dissector(ethnofcs_handle, eth_tvb, pinfo, tree);
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -154,7 +154,7 @@ dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
ENC_BIG_ENDIAN);
|
||||
if ((version != 1) && (version != 2 )) {
|
||||
expert_add_info(pinfo, ti_ver, &ei_erspan_version_unknown);
|
||||
return;
|
||||
return 2;
|
||||
}
|
||||
proto_tree_add_item(erspan_tree, hf_erspan_vlan, tvb, offset, 2,
|
||||
ENC_BIG_ENDIAN);
|
||||
|
@ -207,6 +207,7 @@ dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
eth_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
call_dissector(ethnofcs_handle, eth_tvb, pinfo, tree);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -306,7 +307,7 @@ proto_reg_handoff_erspan(void)
|
|||
|
||||
ethnofcs_handle = find_dissector("eth_withoutfcs");
|
||||
|
||||
erspan_handle = create_dissector_handle(dissect_erspan, proto_erspan);
|
||||
erspan_handle = new_create_dissector_handle(dissect_erspan, proto_erspan);
|
||||
dissector_add_uint("gre.proto", GRE_ERSPAN_88BE, erspan_handle);
|
||||
dissector_add_uint("gre.proto", GRE_ERSPAN_22EB, erspan_handle);
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ static int hf_cmd_trailer = -1;
|
|||
|
||||
static gint ett_cmd = -1;
|
||||
|
||||
static void
|
||||
dissect_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint16 encap_proto;
|
||||
ethertype_data_t ethertype_data;
|
||||
|
@ -100,6 +100,7 @@ dissect_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
ethertype_data.fcs_len = 0;
|
||||
|
||||
call_dissector_with_data(ethertype_handle, tvb, pinfo, tree, ðertype_data);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -142,7 +143,7 @@ proto_reg_handoff_cmd(void)
|
|||
|
||||
ethertype_handle = find_dissector("ethertype");
|
||||
|
||||
cmd_handle = create_dissector_handle(dissect_cmd, proto_cmd);
|
||||
cmd_handle = new_create_dissector_handle(dissect_cmd, proto_cmd);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_CMD, cmd_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,8 +70,8 @@ static expert_field ie_ieee80211_subpacket = EI_INIT;
|
|||
|
||||
static dissector_handle_t ieee80211_radio_handle;
|
||||
|
||||
static void
|
||||
dissect_cwids(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_cwids(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
tvbuff_t *wlan_tvb;
|
||||
proto_tree *ti, *cwids_tree;
|
||||
|
@ -124,6 +124,7 @@ dissect_cwids(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
offset += capturelen;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void proto_register_cwids(void);
|
||||
|
@ -195,7 +196,7 @@ proto_reg_handoff_cwids(void)
|
|||
static gboolean initialized = FALSE;
|
||||
|
||||
if (!initialized) {
|
||||
cwids_handle = create_dissector_handle(dissect_cwids, proto_cwids);
|
||||
cwids_handle = new_create_dissector_handle(dissect_cwids, proto_cwids);
|
||||
dissector_add_for_decode_as("udp.port", cwids_handle);
|
||||
ieee80211_radio_handle = find_dissector("wlan_radio");
|
||||
initialized = TRUE;
|
||||
|
|
|
@ -49,8 +49,8 @@ capture_clip( const guchar *pd, int len, packet_counts *ld ) {
|
|||
capture_ip(pd, 0, len, ld);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_clip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_clip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *fh_item;
|
||||
|
||||
|
@ -90,6 +90,7 @@ dissect_clip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
expert_add_info(pinfo, fh_item, &ei_no_link_info);
|
||||
|
||||
call_dissector(ip_handle, tvb, pinfo, tree);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -122,7 +123,7 @@ proto_reg_handoff_clip(void)
|
|||
*/
|
||||
ip_handle = find_dissector("ip");
|
||||
|
||||
clip_handle = create_dissector_handle(dissect_clip, -1);
|
||||
clip_handle = new_create_dissector_handle(dissect_clip, -1);
|
||||
/* XXX - no protocol, can't be disabled */
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_LINUX_ATM_CLIP, clip_handle);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ static expert_field ei_cnip_type_unknown = EI_INIT;
|
|||
static dissector_table_t cnip_dissector_table;
|
||||
static dissector_handle_t data_handle;
|
||||
|
||||
static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
tvbuff_t *next_tvb;
|
||||
gint offset;
|
||||
|
@ -141,7 +141,7 @@ static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
if (type == DATA_PACKET) {
|
||||
if (dissector_try_uint(cnip_dissector_table, pf_pcode, next_tvb, pinfo, tree))
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
else {
|
||||
expert_add_info_format(pinfo, cnip_tree, &ei_cnip_type_unknown,
|
||||
|
@ -149,6 +149,7 @@ static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
val_to_str_const(type, type_tuple, "Unknown"), type);
|
||||
}
|
||||
call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void proto_register_cnip(void)
|
||||
|
@ -241,7 +242,7 @@ void proto_reg_handoff_cnip(void)
|
|||
{
|
||||
dissector_handle_t cnip_handle;
|
||||
|
||||
cnip_handle = create_dissector_handle(dissect_cnip, proto_cnip);
|
||||
cnip_handle = new_create_dissector_handle(dissect_cnip, proto_cnip);
|
||||
data_handle = find_dissector("data");
|
||||
|
||||
dissector_add_uint ("udp.port", 1628, cnip_handle);
|
||||
|
|
|
@ -910,8 +910,8 @@ stats_account_string (string_counter_t **ret_list, const gchar *new_value)
|
|||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
static tap_data_t tap_data;
|
||||
|
||||
|
@ -1344,6 +1344,7 @@ dissect_collectd (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* Dispatch tap data. */
|
||||
tap_queue_packet (tap_collectd, pinfo, &tap_data);
|
||||
return tvb_captured_length(tvb);
|
||||
} /* void dissect_collectd */
|
||||
|
||||
void proto_register_collectd(void)
|
||||
|
@ -1505,7 +1506,7 @@ void proto_reg_handoff_collectd (void)
|
|||
static dissector_handle_t collectd_handle;
|
||||
|
||||
if (first_run)
|
||||
collectd_handle = create_dissector_handle (dissect_collectd,
|
||||
collectd_handle = new_create_dissector_handle (dissect_collectd,
|
||||
proto_collectd);
|
||||
|
||||
/* Change the dissector registration if the preferences have been
|
||||
|
|
|
@ -53,8 +53,8 @@ static dissector_handle_t chdlc_handle;
|
|||
static dissector_handle_t fr_handle;
|
||||
static dissector_handle_t data_handle;
|
||||
|
||||
static void
|
||||
dissect_cosine(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_cosine(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_tree *fh_tree;
|
||||
proto_item *ti;
|
||||
|
@ -139,6 +139,7 @@ dissect_cosine(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -186,7 +187,7 @@ proto_reg_handoff_cosine(void)
|
|||
fr_handle = find_dissector("fr");
|
||||
data_handle = find_dissector("data");
|
||||
|
||||
cosine_handle = create_dissector_handle(dissect_cosine, proto_cosine);
|
||||
cosine_handle = new_create_dissector_handle(dissect_cosine, proto_cosine);
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_COSINE, cosine_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -180,8 +180,8 @@ csm_to_host(guint16 fc, guint16 ct)
|
|||
|
||||
|
||||
/* Code to actually dissect the packets */
|
||||
static void
|
||||
dissect_csm_encaps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_csm_encaps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *csm_encaps_tree = NULL;
|
||||
|
@ -328,6 +328,7 @@ dissect_csm_encaps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
for (; i<length; i+=2)
|
||||
proto_tree_add_item(csm_encaps_tree, hf_csm_encaps_param, tvb, 12 + i-6, 2, ENC_LITTLE_ENDIAN);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -638,7 +639,7 @@ proto_reg_handoff_csm_encaps(void)
|
|||
{
|
||||
dissector_handle_t csm_encaps_handle;
|
||||
|
||||
csm_encaps_handle = create_dissector_handle(dissect_csm_encaps, proto_csm_encaps);
|
||||
csm_encaps_handle = new_create_dissector_handle(dissect_csm_encaps, proto_csm_encaps);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_CSM_ENCAPS, csm_encaps_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -397,8 +397,8 @@ static gint ett_daap_sub = -1;
|
|||
/* Forward declarations */
|
||||
static void dissect_daap_one_tag(proto_tree *tree, tvbuff_t *tvb);
|
||||
|
||||
static void
|
||||
dissect_daap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_daap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *daap_tree;
|
||||
|
@ -415,7 +415,7 @@ dissect_daap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
*/
|
||||
if (first_tag == daap_png) {
|
||||
call_dissector(png_handle, tvb, pinfo, tree);
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* This is done in two functions on purpose. If the tvb_get_xxx()
|
||||
|
@ -429,6 +429,7 @@ dissect_daap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
ti = proto_tree_add_item(tree, proto_daap, tvb, 0, -1, ENC_NA);
|
||||
daap_tree = proto_item_add_subtree(ti, ett_daap);
|
||||
dissect_daap_one_tag(daap_tree, tvb);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -773,7 +774,7 @@ proto_reg_handoff_daap(void)
|
|||
{
|
||||
dissector_handle_t daap_handle;
|
||||
|
||||
daap_handle = create_dissector_handle(dissect_daap, proto_daap);
|
||||
daap_handle = new_create_dissector_handle(dissect_daap, proto_daap);
|
||||
http_port_add(TCP_PORT_DAAP);
|
||||
dissector_add_string("media_type", "application/x-dmap-tagged", daap_handle);
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ static gint ett_daytime = -1;
|
|||
/* This dissector works for TCP and UDP daytime packets */
|
||||
#define DAYTIME_PORT 13
|
||||
|
||||
static void
|
||||
dissect_daytime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_daytime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_tree *daytime_tree;
|
||||
proto_item *ti;
|
||||
|
@ -74,6 +74,7 @@ dissect_daytime(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(daytime_tree, &hfi_daytime_string, tvb, 0, -1, ENC_ASCII|ENC_NA);
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -98,7 +99,7 @@ proto_register_daytime(void)
|
|||
proto_register_fields(proto_daytime, hfi, array_length(hfi));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
daytime_handle = create_dissector_handle(dissect_daytime, proto_daytime);
|
||||
daytime_handle = new_create_dissector_handle(dissect_daytime, proto_daytime);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
/* forward reference */
|
||||
void proto_register_dcp_etsi(void);
|
||||
void proto_reg_handoff_dcp_etsi(void);
|
||||
static void dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree);
|
||||
static void dissect_pft (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree);
|
||||
static void dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree);
|
||||
static int dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data);
|
||||
static int dissect_pft (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data);
|
||||
static int dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data);
|
||||
|
||||
static dissector_table_t dcp_dissector_table;
|
||||
static dissector_table_t af_dissector_table;
|
||||
|
@ -441,8 +441,8 @@ dissect_pft_fragmented(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
* \param[in,out] pinfo The packet info structure
|
||||
* \param[in,out] tree The structure containing the details which will be displayed, filtered, etc.
|
||||
*/
|
||||
static void
|
||||
dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
||||
static int
|
||||
dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
|
||||
{
|
||||
guint16 plen;
|
||||
gint offset = 0;
|
||||
|
@ -521,8 +521,9 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
next_tvb = tvb_new_subset_remaining (tvb, offset);
|
||||
}
|
||||
if(next_tvb) {
|
||||
dissect_af(next_tvb, pinfo, tree);
|
||||
dissect_af(next_tvb, pinfo, tree, data);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/** Dissect an AF Packet. Parse an AF packet, checking the CRC if the CRC valid
|
||||
|
@ -533,8 +534,8 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
* \param[in,out] pinfo The packet info structure
|
||||
* \param[in,out] tree The structure containing the details which will be displayed, filtered, etc.
|
||||
*/
|
||||
static void
|
||||
dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
||||
static int
|
||||
dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
|
||||
{
|
||||
gint offset = 0;
|
||||
proto_item *ti;
|
||||
|
@ -591,6 +592,7 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
/*offset += 2;*/
|
||||
|
||||
dissector_try_uint(af_dissector_table, pt, next_tvb, pinfo, tree);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/** Dissect the Tag Packet Layer.
|
||||
|
@ -603,8 +605,8 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
* \param[in,out] pinfo The packet info structure
|
||||
* \param[in,out] tree The structure containing the details which will be displayed, filtered, etc.
|
||||
*/
|
||||
static void
|
||||
dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
||||
static int
|
||||
dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
|
||||
{
|
||||
proto_tree *tpl_tree;
|
||||
guint offset=0;
|
||||
|
@ -644,6 +646,7 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
}
|
||||
|
||||
dissector_try_string(tpl_dissector_table, prot, tvb, pinfo, tree->parent, NULL);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -653,9 +656,9 @@ proto_reg_handoff_dcp_etsi (void)
|
|||
dissector_handle_t pft_handle;
|
||||
dissector_handle_t tpl_handle;
|
||||
|
||||
af_handle = create_dissector_handle(dissect_af, proto_af);
|
||||
pft_handle = create_dissector_handle(dissect_pft, proto_pft);
|
||||
tpl_handle = create_dissector_handle(dissect_tpl, proto_tpl);
|
||||
af_handle = new_create_dissector_handle(dissect_af, proto_af);
|
||||
pft_handle = new_create_dissector_handle(dissect_pft, proto_pft);
|
||||
tpl_handle = new_create_dissector_handle(dissect_tpl, proto_tpl);
|
||||
heur_dissector_add("udp", dissect_dcp_etsi, "DCP (ETSI) over UDP", "dcp_etsi_udp", proto_dcp_etsi, HEURISTIC_ENABLE);
|
||||
dissector_add_string("dcp-etsi.sync", "AF", af_handle);
|
||||
dissector_add_string("dcp-etsi.sync", "PF", pft_handle);
|
||||
|
|
|
@ -102,8 +102,8 @@ static const char cont_sep[] = ", ";
|
|||
sep = cont_sep; \
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 bpdu_type;
|
||||
guint8 flags;
|
||||
|
@ -181,6 +181,7 @@ dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
BPDU_FORWARD_DELAY, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -273,7 +274,7 @@ proto_reg_handoff_dec_bpdu(void)
|
|||
{
|
||||
dissector_handle_t dec_bpdu_handle;
|
||||
|
||||
dec_bpdu_handle = create_dissector_handle(dissect_dec_bpdu,
|
||||
dec_bpdu_handle = new_create_dissector_handle(dissect_dec_bpdu,
|
||||
proto_dec_bpdu);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_DEC_LB, dec_bpdu_handle);
|
||||
dissector_add_uint("chdlc.protocol", ETHERTYPE_DEC_LB, dec_bpdu_handle);
|
||||
|
|
|
@ -358,8 +358,8 @@ set_dnet_address(packet_info *pinfo, address *paddr_src, address *paddr_tgt)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 padding_length;
|
||||
guint8 forward;
|
||||
|
@ -522,7 +522,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tree, hf_dec_nsp_msgs, tvb, offset, 1, nsp_msg_type);
|
||||
if (nsp_msg_type == NOP_MSG) {
|
||||
/* Only test data in this msg */
|
||||
return;
|
||||
return offset;
|
||||
}
|
||||
nsp_msg_tree = proto_item_add_subtree(ti_local, ett_dec_rt_nsp_msg);
|
||||
/* Get past the nsp_msg_type */
|
||||
|
@ -532,7 +532,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (nsp_msg_type == CONN_ACK_MSG) {
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "NSP connect acknowledgement");
|
||||
/* Done with this msg type */
|
||||
return;
|
||||
return offset;
|
||||
}
|
||||
/* All other messages have a source node */
|
||||
proto_tree_add_item(nsp_msg_tree, hf_dec_rt_src_node, tvb, offset, 2, ENC_LITTLE_ENDIAN);
|
||||
|
@ -544,6 +544,7 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset,
|
||||
nsp_msg_type);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1479,7 +1480,7 @@ proto_reg_handoff_dec_rt(void)
|
|||
{
|
||||
dissector_handle_t dec_rt_handle;
|
||||
|
||||
dec_rt_handle = create_dissector_handle(dissect_dec_rt,
|
||||
dec_rt_handle = new_create_dissector_handle(dissect_dec_rt,
|
||||
proto_dec_rt);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_DNA_RT, dec_rt_handle);
|
||||
dissector_add_uint("chdlc.protocol", ETHERTYPE_DNA_RT, dec_rt_handle);
|
||||
|
|
|
@ -253,8 +253,8 @@ dissect_distcc_doto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int off
|
|||
|
||||
|
||||
/* Packet dissection routine called by tcp (& udp) when port 3632 detected */
|
||||
static void
|
||||
dissect_distcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
||||
static int
|
||||
dissect_distcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
|
||||
{
|
||||
int offset=0;
|
||||
proto_tree *tree=NULL;
|
||||
|
@ -281,7 +281,7 @@ dissect_distcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
|
||||
/* scan the parameter */
|
||||
if (sscanf(buf + 4, "%08x", ¶meter) != 1)
|
||||
return;
|
||||
return offset;
|
||||
|
||||
if(!strncmp(buf, "DIST", 4)){
|
||||
offset=dissect_distcc_dist(tvb, pinfo, tree, offset, parameter);
|
||||
|
@ -303,11 +303,11 @@ dissect_distcc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
offset=dissect_distcc_doto(tvb, pinfo, tree, offset, parameter);
|
||||
} else {
|
||||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* Register protocol with Wireshark. */
|
||||
|
@ -394,7 +394,7 @@ proto_reg_handoff_distcc(void)
|
|||
* We haven't registered the dissector yet; get a handle
|
||||
* for it.
|
||||
*/
|
||||
distcc_handle = create_dissector_handle(dissect_distcc,
|
||||
distcc_handle = new_create_dissector_handle(dissect_distcc,
|
||||
proto_distcc);
|
||||
data_handle = find_dissector("data");
|
||||
registered_dissector = TRUE;
|
||||
|
|
|
@ -3914,28 +3914,31 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
tap_queue_packet(dns_tap, pinfo, dns_stats);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_dns_udp_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dns_udp_sctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DNS");
|
||||
|
||||
dissect_dns_common(tvb, pinfo, tree, FALSE, FALSE, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_mdns_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_mdns_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MDNS");
|
||||
|
||||
dissect_dns_common(tvb, pinfo, tree, FALSE, TRUE, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_llmnr_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_llmnr_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LLMNR");
|
||||
|
||||
dissect_dns_common(tvb, pinfo, tree, FALSE, FALSE, TRUE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static guint
|
||||
|
@ -3977,7 +3980,7 @@ dissect_dns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
|||
if (pinfo->ptype == PT_TCP) {
|
||||
return dissect_dns_tcp(tvb, pinfo, tree, data);
|
||||
} else {
|
||||
dissect_dns_udp_sctp(tvb, pinfo, tree);
|
||||
dissect_dns_udp_sctp(tvb, pinfo, tree, data);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
}
|
||||
|
@ -4065,11 +4068,11 @@ proto_reg_handoff_dns(void)
|
|||
dissector_handle_t mdns_udp_handle;
|
||||
dissector_handle_t llmnr_udp_handle;
|
||||
|
||||
dns_udp_handle = create_dissector_handle(dissect_dns_udp_sctp, proto_dns);
|
||||
dns_udp_handle = new_create_dissector_handle(dissect_dns_udp_sctp, proto_dns);
|
||||
dns_tcp_handle = new_create_dissector_handle(dissect_dns_tcp, proto_dns);
|
||||
dns_sctp_handle = create_dissector_handle(dissect_dns_udp_sctp, proto_dns);
|
||||
mdns_udp_handle = create_dissector_handle(dissect_mdns_udp, proto_mdns);
|
||||
llmnr_udp_handle = create_dissector_handle(dissect_llmnr_udp, proto_llmnr);
|
||||
dns_sctp_handle = new_create_dissector_handle(dissect_dns_udp_sctp, proto_dns);
|
||||
mdns_udp_handle = new_create_dissector_handle(dissect_mdns_udp, proto_mdns);
|
||||
llmnr_udp_handle = new_create_dissector_handle(dissect_llmnr_udp, proto_llmnr);
|
||||
dissector_add_uint("udp.port", UDP_PORT_MDNS, mdns_udp_handle);
|
||||
dissector_add_uint("tcp.port", TCP_PORT_MDNS, dns_tcp_handle);
|
||||
dissector_add_uint("udp.port", UDP_PORT_LLMNR, llmnr_udp_handle);
|
||||
|
|
|
@ -154,8 +154,8 @@ static const value_string dtp_tat_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_dtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *dtp_tree;
|
||||
|
@ -205,6 +205,7 @@ dissect_dtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
dissect_dtp_tlv(pinfo, tvb, offset, valuelength, tlv_tree, ti, tlv_length_item, (guint8) type);
|
||||
offset += valuelength;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -365,7 +366,7 @@ proto_reg_handoff_dtp(void)
|
|||
{
|
||||
dissector_handle_t dtp_handle;
|
||||
|
||||
dtp_handle = create_dissector_handle(dissect_dtp, proto_dtp);
|
||||
dtp_handle = new_create_dissector_handle(dissect_dtp, proto_dtp);
|
||||
dissector_add_uint("llc.cisco_pid", 0x2004, dtp_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ static const value_string dvb_bat_free_ca_mode_vals[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static void
|
||||
dissect_dvb_bat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dvb_bat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
guint offset = 0, length = 0, ts_loop_end;
|
||||
|
@ -161,6 +161,7 @@ dissect_dvb_bat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_bat_tree, 0, offset);
|
||||
proto_item_set_len(ti, offset);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -259,7 +260,7 @@ void proto_reg_handoff_dvb_bat(void)
|
|||
{
|
||||
dissector_handle_t dvb_bat_handle;
|
||||
|
||||
dvb_bat_handle = create_dissector_handle(dissect_dvb_bat, proto_dvb_bat);
|
||||
dvb_bat_handle = new_create_dissector_handle(dissect_dvb_bat, proto_dvb_bat);
|
||||
|
||||
dissector_add_uint("mpeg_sect.tid", DVB_BAT_TID, dvb_bat_handle);
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ static const value_string dvb_rcs_cur_next_vals[] = {
|
|||
};
|
||||
|
||||
|
||||
static void
|
||||
dissect_dvb_data_mpe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dvb_data_mpe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
guint offset = 0, tot_len = 0;
|
||||
|
@ -130,8 +130,7 @@ dissect_dvb_data_mpe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
packet_mpeg_sect_crc(tvb, pinfo, dvb_data_mpe_tree, 0, tot_len - 1);
|
||||
return;
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -202,7 +201,7 @@ proto_reg_handoff_dvb_data_mpe(void)
|
|||
|
||||
dissector_handle_t dvb_data_mpe_handle;
|
||||
|
||||
dvb_data_mpe_handle = create_dissector_handle(dissect_dvb_data_mpe, proto_dvb_data_mpe);
|
||||
dvb_data_mpe_handle = new_create_dissector_handle(dissect_dvb_data_mpe, proto_dvb_data_mpe);
|
||||
dissector_add_uint("mpeg_sect.tid", DVB_DATA_MPE_TID, dvb_data_mpe_handle);
|
||||
|
||||
ip_handle = find_dissector("ip");
|
||||
|
|
|
@ -87,8 +87,8 @@ static const value_string dvb_eit_free_ca_mode_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_dvb_eit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dvb_eit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
guint offset = 0, length = 0;
|
||||
|
@ -139,7 +139,7 @@ dissect_dvb_eit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (offset >= length) {
|
||||
packet_mpeg_sect_crc(tvb, pinfo, dvb_eit_tree, 0, offset);
|
||||
|
||||
return;
|
||||
return offset;
|
||||
}
|
||||
|
||||
/* Parse all the events */
|
||||
|
@ -184,6 +184,7 @@ dissect_dvb_eit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_eit_tree, 0, offset);
|
||||
proto_item_set_len(ti, offset);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -292,7 +293,7 @@ void proto_reg_handoff_dvb_eit(void)
|
|||
int tid;
|
||||
dissector_handle_t dvb_eit_handle;
|
||||
|
||||
dvb_eit_handle = create_dissector_handle(dissect_dvb_eit, proto_dvb_eit);
|
||||
dvb_eit_handle = new_create_dissector_handle(dissect_dvb_eit, proto_dvb_eit);
|
||||
|
||||
for (tid = DVB_EIT_TID_MIN; tid <= DVB_EIT_TID_MAX; tid++)
|
||||
dissector_add_uint("mpeg_sect.tid", tid, dvb_eit_handle);
|
||||
|
|
|
@ -90,8 +90,8 @@ static const value_string dvb_sdt_free_ca_mode_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_dvb_sdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dvb_sdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
guint offset = 0, length = 0;
|
||||
|
@ -134,7 +134,7 @@ dissect_dvb_sdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
|
||||
if (offset >= length)
|
||||
return;
|
||||
return offset;
|
||||
|
||||
/* Parse all the services */
|
||||
while (offset < length) {
|
||||
|
@ -162,6 +162,7 @@ dissect_dvb_sdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_sdt_tree, 0, offset);
|
||||
proto_item_set_len(ti, offset);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -266,7 +267,7 @@ void proto_reg_handoff_dvb_sdt(void)
|
|||
{
|
||||
dissector_handle_t dvb_sdt_handle;
|
||||
|
||||
dvb_sdt_handle = create_dissector_handle(dissect_dvb_sdt, proto_dvb_sdt);
|
||||
dvb_sdt_handle = new_create_dissector_handle(dissect_dvb_sdt, proto_dvb_sdt);
|
||||
dissector_add_uint("mpeg_sect.tid", DVB_SDT_TID_ACTUAL, dvb_sdt_handle);
|
||||
dissector_add_uint("mpeg_sect.tid", DVB_SDT_TID_OTHER, dvb_sdt_handle);
|
||||
}
|
||||
|
|
|
@ -34,10 +34,9 @@ static int hf_dvb_tdt_utc_time = -1;
|
|||
|
||||
static gint ett_dvb_tdt = -1;
|
||||
|
||||
static void
|
||||
dissect_dvb_tdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dvb_tdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
guint offset = 0;
|
||||
|
||||
proto_item *ti;
|
||||
|
@ -60,6 +59,7 @@ dissect_dvb_tdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset += 5;
|
||||
|
||||
proto_item_set_len(ti, offset);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,7 +91,7 @@ void proto_reg_handoff_dvb_tdt(void)
|
|||
{
|
||||
dissector_handle_t dvb_tdt_handle;
|
||||
|
||||
dvb_tdt_handle = create_dissector_handle(dissect_dvb_tdt, proto_dvb_tdt);
|
||||
dvb_tdt_handle = new_create_dissector_handle(dissect_dvb_tdt, proto_dvb_tdt);
|
||||
|
||||
dissector_add_uint("mpeg_sect.tid", DVB_TDT_TID, dvb_tdt_handle);
|
||||
}
|
||||
|
|
|
@ -41,10 +41,9 @@ static gint ett_dvb_tot = -1;
|
|||
#define DVB_TOT_RESERVED_MASK 0xF000
|
||||
#define DVB_TOT_DESCRIPTORS_LOOP_LENGTH_MASK 0x0FFF
|
||||
|
||||
static void
|
||||
dissect_dvb_tot(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_dvb_tot(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
guint offset = 0;
|
||||
guint descriptor_len;
|
||||
|
||||
|
@ -77,6 +76,7 @@ dissect_dvb_tot(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
offset += packet_mpeg_sect_crc(tvb, pinfo, dvb_tot_tree, 0, offset);
|
||||
proto_item_set_len(ti, offset);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@ void proto_reg_handoff_dvb_tot(void)
|
|||
{
|
||||
dissector_handle_t dvb_tot_handle;
|
||||
|
||||
dvb_tot_handle = create_dissector_handle(dissect_dvb_tot, proto_dvb_tot);
|
||||
dvb_tot_handle = new_create_dissector_handle(dissect_dvb_tot, proto_dvb_tot);
|
||||
|
||||
dissector_add_uint("mpeg_sect.tid", DVB_TOT_TID, dvb_tot_handle);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ static int hf_echo_response = -1;
|
|||
|
||||
static gint ett_echo = -1;
|
||||
|
||||
static void dissect_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int dissect_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
int offset = 0;
|
||||
|
@ -75,6 +75,8 @@ static void dissect_echo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
|
||||
} /* dissect_echo */
|
||||
|
||||
void proto_register_echo(void)
|
||||
|
@ -110,7 +112,7 @@ void proto_reg_handoff_echo(void)
|
|||
|
||||
dissector_handle_t echo_handle;
|
||||
|
||||
echo_handle = create_dissector_handle(dissect_echo, proto_echo);
|
||||
echo_handle = new_create_dissector_handle(dissect_echo, proto_echo);
|
||||
|
||||
dissector_add_uint("udp.port", ECHO_PORT, echo_handle);
|
||||
dissector_add_uint("tcp.port", ECHO_PORT, echo_handle);
|
||||
|
|
|
@ -88,7 +88,7 @@ static int hf_egd_resv = -1;
|
|||
static gint ett_egd = -1;
|
||||
static gint ett_status_item = -1;
|
||||
|
||||
static void dissect_egd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int dissect_egd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
/* replace UDP with EGD in display */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "EGD");
|
||||
|
@ -153,6 +153,7 @@ static void dissect_egd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
call_dissector(data_handle, next_tvb, pinfo, egd_tree);
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void proto_register_egd(void)
|
||||
|
@ -240,7 +241,7 @@ void proto_reg_handoff_egd(void)
|
|||
{
|
||||
dissector_handle_t egd_handle;
|
||||
|
||||
egd_handle = create_dissector_handle(dissect_egd, proto_egd);
|
||||
egd_handle = new_create_dissector_handle(dissect_egd, proto_egd);
|
||||
dissector_add_uint("udp.port", EGD_PORT, egd_handle);
|
||||
|
||||
/* find data dissector */
|
||||
|
|
|
@ -247,8 +247,8 @@ dissect_eiss_descriptors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gu
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_eiss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_eiss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint offset = 0, packet_length, sect_len;
|
||||
proto_item *ti;
|
||||
|
@ -360,6 +360,7 @@ dissect_eiss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
packet_mpeg_sect_crc(tvb, pinfo, eiss_tree, 0, sect_len - 1);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -576,7 +577,7 @@ proto_reg_handoff_eiss(void)
|
|||
{
|
||||
dissector_handle_t eiss_handle;
|
||||
|
||||
eiss_handle = create_dissector_handle(dissect_eiss, proto_eiss);
|
||||
eiss_handle = new_create_dissector_handle(dissect_eiss, proto_eiss);
|
||||
dissector_add_uint("mpeg_sect.tid", EISS_SECTION_TID, eiss_handle);
|
||||
data_handle = find_dissector("data");
|
||||
}
|
||||
|
|
|
@ -98,8 +98,8 @@ static const value_string af_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_enc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_enc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
struct enchdr ench;
|
||||
tvbuff_t *next_tvb;
|
||||
|
@ -158,6 +158,7 @@ dissect_enc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -191,7 +192,7 @@ proto_reg_handoff_enc(void)
|
|||
ipv6_handle = find_dissector("ipv6");
|
||||
data_handle = find_dissector("data");
|
||||
|
||||
enc_handle = create_dissector_handle(dissect_enc, proto_enc);
|
||||
enc_handle = new_create_dissector_handle(dissect_enc, proto_enc);
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_ENC, enc_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -2385,8 +2385,8 @@ dissect_enip_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
}
|
||||
|
||||
/* Code to actually dissect the io packets*/
|
||||
static void
|
||||
dissect_enipio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_enipio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
/* Set up structures needed to add the protocol subtree and manage it */
|
||||
proto_item *ti;
|
||||
|
@ -2402,6 +2402,7 @@ dissect_enipio(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
dissect_cpf( NULL, 0xFFFF, tvb, pinfo, enip_tree, tree, 0, 0 );
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
} /* end of dissect_enipio() */
|
||||
|
||||
|
||||
|
@ -3760,7 +3761,7 @@ proto_reg_handoff_enip(void)
|
|||
dissector_add_uint("udp.port", ENIP_ENCAP_PORT, enip_udp_handle);
|
||||
|
||||
/* Register for EtherNet/IP IO data (UDP) */
|
||||
enipio_handle = create_dissector_handle(dissect_enipio, proto_enipio);
|
||||
enipio_handle = new_create_dissector_handle(dissect_enipio, proto_enipio);
|
||||
dissector_add_uint("udp.port", ENIP_IO_PORT, enipio_handle);
|
||||
|
||||
/* Find dissector for data packet */
|
||||
|
|
|
@ -112,8 +112,8 @@ static void
|
|||
dissect_parameters(tvbuff_t *, proto_tree *);
|
||||
static void
|
||||
dissect_parameter(tvbuff_t *, proto_tree *);
|
||||
static void
|
||||
dissect_enrp(tvbuff_t *, packet_info *, proto_tree *);
|
||||
static int
|
||||
dissect_enrp(tvbuff_t *, packet_info *, proto_tree *, void*);
|
||||
|
||||
#define ADD_PADDING(x) ((((x) + 3) >> 2) << 2)
|
||||
|
||||
|
@ -193,7 +193,7 @@ dissect_error_cause(tvbuff_t *cause_tvb, proto_tree *parameter_tree)
|
|||
break;
|
||||
case UNRECONGNIZED_MESSAGE_CAUSE_CODE:
|
||||
message_tvb = tvb_new_subset_remaining(cause_tvb, CAUSE_INFO_OFFSET);
|
||||
dissect_enrp(message_tvb, NULL, cause_tree);
|
||||
dissect_enrp(message_tvb, NULL, cause_tree, NULL);
|
||||
break;
|
||||
case INVALID_VALUES:
|
||||
parameter_tvb = tvb_new_subset_remaining(cause_tvb, CAUSE_INFO_OFFSET);
|
||||
|
@ -988,8 +988,8 @@ dissect_enrp_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *enrp
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_enrp(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_enrp(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *enrp_item;
|
||||
proto_tree *enrp_tree;
|
||||
|
@ -998,17 +998,13 @@ dissect_enrp(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if (pinfo)
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ENRP");
|
||||
|
||||
/* In the interest of speed, if "tree" is NULL, don't do any work not
|
||||
necessary to generate protocol tree items. */
|
||||
if (tree) {
|
||||
/* create the enrp protocol tree */
|
||||
enrp_item = proto_tree_add_item(tree, proto_enrp, message_tvb, 0, -1, ENC_NA);
|
||||
enrp_tree = proto_item_add_subtree(enrp_item, ett_enrp);
|
||||
} else {
|
||||
enrp_tree = NULL;
|
||||
};
|
||||
/* create the enrp protocol tree */
|
||||
enrp_item = proto_tree_add_item(tree, proto_enrp, message_tvb, 0, -1, ENC_NA);
|
||||
enrp_tree = proto_item_add_subtree(enrp_item, ett_enrp);
|
||||
|
||||
/* dissect the message */
|
||||
dissect_enrp_message(message_tvb, pinfo, enrp_tree);
|
||||
return tvb_captured_length(message_tvb);
|
||||
}
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
|
@ -1093,7 +1089,7 @@ proto_reg_handoff_enrp(void)
|
|||
{
|
||||
dissector_handle_t enrp_handle;
|
||||
|
||||
enrp_handle = create_dissector_handle(dissect_enrp, proto_enrp);
|
||||
enrp_handle = new_create_dissector_handle(dissect_enrp, proto_enrp);
|
||||
dissector_add_uint("sctp.ppi", ENRP_PAYLOAD_PROTOCOL_ID, enrp_handle);
|
||||
dissector_add_uint("sctp.port", ENRP_SCTP_PORT, enrp_handle);
|
||||
dissector_add_uint("udp.port", ENRP_UDP_PORT, enrp_handle);
|
||||
|
|
|
@ -137,8 +137,8 @@ dissect_etv_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int prot
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_etv_ddb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_etv_ddb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ETV-DDB");
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "ETV DDB");
|
||||
|
@ -147,11 +147,12 @@ dissect_etv_ddb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
hf_etv_ddb_reserved, &ei_etv_ddb_invalid_section_syntax_indicator,
|
||||
&ei_etv_ddb_invalid_reserved_bits, &ei_etv_ddb_invalid_section_length,
|
||||
&ei_etv_ddb_filter_info);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_etv_dii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_etv_dii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ETV-DII");
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "ETV DII");
|
||||
|
@ -159,6 +160,7 @@ dissect_etv_dii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
hf_etv_dii_reserved, &ei_etv_dii_invalid_section_syntax_indicator,
|
||||
&ei_etv_dii_invalid_reserved_bits, &ei_etv_dii_invalid_section_length,
|
||||
&ei_etv_dii_filter_info);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -230,8 +232,8 @@ proto_reg_handoff_etv(void)
|
|||
dissector_handle_t etv_dii_handle;
|
||||
dissector_handle_t etv_ddb_handle;
|
||||
|
||||
etv_dii_handle = create_dissector_handle(dissect_etv_dii, proto_etv_dii);
|
||||
etv_ddb_handle = create_dissector_handle(dissect_etv_ddb, proto_etv_ddb);
|
||||
etv_dii_handle = new_create_dissector_handle(dissect_etv_dii, proto_etv_dii);
|
||||
etv_ddb_handle = new_create_dissector_handle(dissect_etv_ddb, proto_etv_ddb);
|
||||
dissector_add_uint("mpeg_sect.tid", ETV_TID_DII_SECTION, etv_dii_handle);
|
||||
dissector_add_uint("mpeg_sect.tid", ETV_TID_DDB_SECTION, etv_ddb_handle);
|
||||
dsmcc_handle = find_dissector("mp2t-dsmcc");
|
||||
|
|
|
@ -404,40 +404,46 @@ dissect_evrc_aux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, evrc_varia
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_evrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_evrc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_evrc_aux(tvb, pinfo, tree, EVRC_VARIANT_EVRC);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_evrcb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_evrcb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_evrc_aux(tvb, pinfo, tree, EVRC_VARIANT_EVRC_B);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_evrcwb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_evrcwb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_evrc_aux(tvb, pinfo, tree, EVRC_VARIANT_EVRC_WB);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_evrcnw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_evrcnw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_evrc_aux(tvb, pinfo, tree, EVRC_VARIANT_EVRC_NW);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_evrcnw2k(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_evrcnw2k(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_evrc_aux(tvb, pinfo, tree, EVRC_VARIANT_EVRC_NW2k);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_evrc_legacy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_evrc_legacy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_evrc_aux(tvb, pinfo, tree, EVRC_VARIANT_EVRC_LEGACY);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -611,12 +617,12 @@ proto_reg_handoff_evrc(void)
|
|||
dissector_handle_t evrcnw_handle;
|
||||
dissector_handle_t evrcnw2k_handle;
|
||||
|
||||
evrc_handle = create_dissector_handle(dissect_evrc, proto_evrc);
|
||||
evrcb_handle = create_dissector_handle(dissect_evrcb, proto_evrc);
|
||||
evrcwb_handle = create_dissector_handle(dissect_evrcwb, proto_evrc);
|
||||
evrcnw_handle = create_dissector_handle(dissect_evrcnw, proto_evrc);
|
||||
evrcnw2k_handle = create_dissector_handle(dissect_evrcnw2k, proto_evrc);
|
||||
evrc_legacy_handle = create_dissector_handle(dissect_evrc_legacy, proto_evrc);
|
||||
evrc_handle = new_create_dissector_handle(dissect_evrc, proto_evrc);
|
||||
evrcb_handle = new_create_dissector_handle(dissect_evrcb, proto_evrc);
|
||||
evrcwb_handle = new_create_dissector_handle(dissect_evrcwb, proto_evrc);
|
||||
evrcnw_handle = new_create_dissector_handle(dissect_evrcnw, proto_evrc);
|
||||
evrcnw2k_handle = new_create_dissector_handle(dissect_evrcnw2k, proto_evrc);
|
||||
evrc_legacy_handle = new_create_dissector_handle(dissect_evrc_legacy, proto_evrc);
|
||||
|
||||
/* header-full mime types */
|
||||
dissector_add_string("rtp_dyn_payload_type", "EVRC", evrc_handle);
|
||||
|
|
|
@ -94,8 +94,8 @@ typedef struct {
|
|||
} exec_hash_entry_t;
|
||||
|
||||
|
||||
static void
|
||||
dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
/* Set up structures needed to add the protocol subtree and manage it */
|
||||
proto_item *ti;
|
||||
|
@ -339,6 +339,7 @@ dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
if(hash_info->state < WAIT_FOR_DATA){
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "Session Establishment");
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -406,7 +407,7 @@ proto_reg_handoff_exec(void)
|
|||
{
|
||||
dissector_handle_t exec_handle;
|
||||
|
||||
exec_handle = create_dissector_handle(dissect_exec, proto_exec);
|
||||
exec_handle = new_create_dissector_handle(dissect_exec, proto_exec);
|
||||
dissector_add_uint("tcp.port", EXEC_PORT, exec_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -948,8 +948,8 @@ dissect_unknown_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, p
|
|||
ENC_NA);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_edp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_edp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *edp_tree;
|
||||
|
@ -1092,6 +1092,7 @@ dissect_edp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset += tlv_length;
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1483,7 +1484,7 @@ proto_reg_handoff_edp(void)
|
|||
{
|
||||
dissector_handle_t edp_handle;
|
||||
|
||||
edp_handle = create_dissector_handle(dissect_edp, proto_edp);
|
||||
edp_handle = new_create_dissector_handle(dissect_edp, proto_edp);
|
||||
dissector_add_uint("llc.extreme_pid", 0x00bb, edp_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -517,10 +517,11 @@ dissect_fcip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
In this case we will not check the port number for sanity and just
|
||||
do as the user said.
|
||||
*/
|
||||
static void
|
||||
dissect_fcip_handle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_fcip_handle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_fcip (tvb, pinfo, tree, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -650,7 +651,7 @@ proto_reg_handoff_fcip (void)
|
|||
|
||||
heur_dissector_add("tcp", dissect_fcip_heur, "FCIP over TCP", "fcip_tcp", proto_fcip, HEURISTIC_ENABLE);
|
||||
|
||||
fcip_handle = create_dissector_handle(dissect_fcip_handle, proto_fcip);
|
||||
fcip_handle = new_create_dissector_handle(dissect_fcip_handle, proto_fcip);
|
||||
dissector_add_for_decode_as("tcp.port", fcip_handle);
|
||||
|
||||
data_handle = find_dissector("data");
|
||||
|
|
|
@ -106,8 +106,8 @@ static expert_field ei_fcoe_crc = EI_INIT;
|
|||
static dissector_handle_t data_handle;
|
||||
static dissector_handle_t fc_handle;
|
||||
|
||||
static void
|
||||
dissect_fcoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_fcoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
gint crc_offset;
|
||||
gint eof_offset;
|
||||
|
@ -272,6 +272,7 @@ dissect_fcoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
} else if (data_handle) {
|
||||
call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -333,7 +334,7 @@ proto_reg_handoff_fcoe(void)
|
|||
{
|
||||
dissector_handle_t fcoe_handle;
|
||||
|
||||
fcoe_handle = create_dissector_handle(dissect_fcoe, proto_fcoe);
|
||||
fcoe_handle = new_create_dissector_handle(dissect_fcoe, proto_fcoe);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_FCOE, fcoe_handle);
|
||||
data_handle = find_dissector("data");
|
||||
fc_handle = find_dissector("fc");
|
||||
|
|
|
@ -662,8 +662,8 @@ static void dissect_fc_sbccs_dib_link_hdr (tvbuff_t *tvb, packet_info *pinfo,
|
|||
}
|
||||
}
|
||||
|
||||
static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo,
|
||||
proto_tree *tree)
|
||||
static int dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo,
|
||||
proto_tree *tree, void* data _U_)
|
||||
{
|
||||
guint8 type;
|
||||
guint16 ch_cu_id, dev_addr, ccw;
|
||||
|
@ -753,6 +753,7 @@ static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo,
|
|||
next_tvb = tvb_new_subset_remaining (tvb, offset+FC_SBCCS_DIB_LRC_HDR_SIZE);
|
||||
call_dissector (data_handle, next_tvb, pinfo, tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
|
@ -1139,7 +1140,7 @@ proto_reg_handoff_fcsbccs (void)
|
|||
{
|
||||
dissector_handle_t fc_sbccs_handle;
|
||||
|
||||
fc_sbccs_handle = create_dissector_handle (dissect_fc_sbccs,
|
||||
fc_sbccs_handle = new_create_dissector_handle (dissect_fc_sbccs,
|
||||
proto_fc_sbccs);
|
||||
|
||||
dissector_add_uint("fc.ftype", FC_FTYPE_SBCCS, fc_sbccs_handle);
|
||||
|
|
|
@ -86,8 +86,8 @@ static const value_string opcode_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *fefd_tree = NULL;
|
||||
|
@ -211,13 +211,14 @@ dissect_fefd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(tlv_tree, hf_fefd_data, tvb, offset + 4,
|
||||
length - 4, ENC_NA);
|
||||
} else {
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
offset += length;
|
||||
}
|
||||
}
|
||||
|
||||
call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, fefd_tree);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -286,7 +287,7 @@ proto_reg_handoff_fefd(void)
|
|||
dissector_handle_t fefd_handle;
|
||||
|
||||
data_handle = find_dissector("data");
|
||||
fefd_handle = create_dissector_handle(dissect_fefd, proto_fefd);
|
||||
fefd_handle = new_create_dissector_handle(dissect_fefd, proto_fefd);
|
||||
dissector_add_uint("llc.force10_pid", 0x0111, fefd_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ static int hf_flexnet_ctl = -1;
|
|||
static gint ett_flexnet = -1;
|
||||
static gint ett_flexnet_ctl = -1;
|
||||
|
||||
static void
|
||||
dissect_flexnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
||||
static int
|
||||
dissect_flexnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
|
||||
{
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
|
@ -92,6 +92,7 @@ dissect_flexnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
|
||||
next_tvb = tvb_new_subset_remaining(tvb, FLEXNET_HDRLEN);
|
||||
call_dissector( default_handle , next_tvb, pinfo, parent_tree );
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -133,7 +134,7 @@ proto_register_flexnet(void)
|
|||
void
|
||||
proto_reg_handoff_flexnet(void)
|
||||
{
|
||||
dissector_add_uint( "ax25.pid", AX25_P_FLEXNET, create_dissector_handle( dissect_flexnet, proto_flexnet ) );
|
||||
dissector_add_uint( "ax25.pid", AX25_P_FLEXNET, new_create_dissector_handle( dissect_flexnet, proto_flexnet ) );
|
||||
|
||||
/*
|
||||
*/
|
||||
|
|
|
@ -602,17 +602,19 @@ dissect_forces(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offs
|
|||
}
|
||||
|
||||
/* Code to actually dissect the TCP packets */
|
||||
static void
|
||||
dissect_forces_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_forces_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_forces(tvb, pinfo, tree, TCP_UDP_TML_FOCES_MESSAGE_OFFSET_TCP);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* Code to actually dissect the ForCES protocol layer packets,like UDP,SCTP and others */
|
||||
static void
|
||||
dissect_forces_not_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_forces_not_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_forces(tvb, pinfo, tree, 0);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -868,8 +870,8 @@ proto_reg_handoff_forces(void)
|
|||
static dissector_handle_t forces_handle_tcp, forces_handle;
|
||||
|
||||
if (!inited) {
|
||||
forces_handle_tcp = create_dissector_handle(dissect_forces_tcp, proto_forces);
|
||||
forces_handle = create_dissector_handle(dissect_forces_not_tcp, proto_forces);
|
||||
forces_handle_tcp = new_create_dissector_handle(dissect_forces_tcp, proto_forces);
|
||||
forces_handle = new_create_dissector_handle(dissect_forces_not_tcp, proto_forces);
|
||||
ip_handle = find_dissector("ip");
|
||||
inited = TRUE;
|
||||
}
|
||||
|
|
|
@ -263,8 +263,8 @@ dissect_unknown_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, int length, p
|
|||
proto_tree_add_item(unknown_tree, hf_fdp_unknown_data, tvb, offset, length, ENC_NA);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_fdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_fdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *fdp_tree = NULL;
|
||||
|
@ -333,6 +333,7 @@ dissect_fdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -457,7 +458,7 @@ proto_reg_handoff_fdp(void)
|
|||
{
|
||||
dissector_handle_t fdp_handle;
|
||||
|
||||
fdp_handle = create_dissector_handle(dissect_fdp, proto_fdp);
|
||||
fdp_handle = new_create_dissector_handle(dissect_fdp, proto_fdp);
|
||||
dissector_add_uint("llc.foundry_pid", 0x2000, fdp_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@ static const value_string g723_frame_size_and_codec_type_value[] = {
|
|||
|
||||
|
||||
/* Dissection */
|
||||
static void
|
||||
dissect_g723(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_g723(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
int offset = 0;
|
||||
guint octet;
|
||||
|
@ -80,9 +80,10 @@ dissect_g723(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(g723_tree, hf_g723_lpc_B5_B0, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
if ((octet & 0x1) == 1 ) /* Low rate */
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}/* if tree */
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -90,7 +91,7 @@ proto_reg_handoff_g723(void)
|
|||
{
|
||||
dissector_handle_t g723_handle;
|
||||
|
||||
g723_handle = create_dissector_handle(dissect_g723, proto_g723);
|
||||
g723_handle = new_create_dissector_handle(dissect_g723, proto_g723);
|
||||
|
||||
dissector_add_uint("rtp.pt", PT_G723, g723_handle);
|
||||
|
||||
|
|
|
@ -159,8 +159,8 @@ dissect_gdb_packet(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_gdb_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_gdb_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
gint offset=0, offset_start;
|
||||
gint pos;
|
||||
|
@ -189,9 +189,10 @@ dissect_gdb_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
else {
|
||||
pinfo->desegment_offset = offset;
|
||||
pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
|
||||
return;
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -238,7 +239,7 @@ proto_reg_handoff_gdb(void)
|
|||
static dissector_handle_t gdb_handle;
|
||||
|
||||
if (!initialized) {
|
||||
gdb_handle = create_dissector_handle(dissect_gdb_tcp, proto_gdb);
|
||||
gdb_handle = new_create_dissector_handle(dissect_gdb_tcp, proto_gdb);
|
||||
initialized = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -220,8 +220,8 @@ dissect_geneve_options(tvbuff_t *tvb, packet_info *pinfo,
|
|||
};
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_geneve(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_geneve(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti, *flag_item, *rsvd_item;
|
||||
proto_tree *geneve_tree, *flag_tree;
|
||||
|
@ -312,6 +312,8 @@ dissect_geneve(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
if (!dissector_try_uint(ethertype_dissector_table, proto_type, next_tvb, pinfo, tree))
|
||||
call_dissector(data_handle, next_tvb, pinfo, tree);
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
/* Register Geneve with Wireshark */
|
||||
|
@ -444,7 +446,7 @@ proto_reg_handoff_geneve(void)
|
|||
{
|
||||
dissector_handle_t geneve_handle;
|
||||
|
||||
geneve_handle = create_dissector_handle(dissect_geneve, proto_geneve);
|
||||
geneve_handle = new_create_dissector_handle(dissect_geneve, proto_geneve);
|
||||
dissector_add_uint("udp.port", UDP_PORT_GENEVE, geneve_handle);
|
||||
dissector_add_for_decode_as("udp.port", geneve_handle);
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ static int hf_gift_request_arg = -1;
|
|||
static gint ett_gift = -1;
|
||||
static gint ett_gift_cmd = -1;
|
||||
|
||||
static void
|
||||
dissect_gift(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_gift(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_item *ti, *hidden_item;
|
||||
proto_tree *gift_tree, *cmd_tree;
|
||||
|
@ -113,6 +113,7 @@ dissect_gift(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
}
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -156,7 +157,7 @@ proto_reg_handoff_gift(void)
|
|||
{
|
||||
dissector_handle_t gift_handle;
|
||||
|
||||
gift_handle = create_dissector_handle(dissect_gift, proto_gift);
|
||||
gift_handle = new_create_dissector_handle(dissect_gift, proto_gift);
|
||||
dissector_add_uint("tcp.port", TCP_PORT_GIFT, gift_handle);
|
||||
}
|
||||
|
||||
|
|
|
@ -216,8 +216,8 @@ dissect_gmtlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gmhdr_tree, gui
|
|||
|
||||
|
||||
|
||||
static void
|
||||
dissect_gmhdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_gmhdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_tree *ti;
|
||||
gint16 length;
|
||||
|
@ -274,6 +274,7 @@ dissect_gmhdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
call_dissector_with_data(ethertype_handle, tvb, pinfo, tree, ðertype_data);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -520,7 +521,7 @@ proto_reg_handoff_gmhdr(void)
|
|||
|
||||
ethertype_handle = find_dissector("ethertype");
|
||||
|
||||
gmhdr_handle = create_dissector_handle(dissect_gmhdr, proto_gmhdr);
|
||||
gmhdr_handle = new_create_dissector_handle(dissect_gmhdr, proto_gmhdr);
|
||||
dissector_add_uint("ethertype", ETHERTYPE_GIGAMON, gmhdr_handle);
|
||||
heur_dissector_add("eth.trailer", dissect_gmtrailer, "Gigamon Ethernet header", "gmhdr_eth", proto_gmhdr, HEURISTIC_ENABLE);
|
||||
|
||||
|
|
|
@ -310,8 +310,8 @@ dissect_gre_wccp2_redirect_header(tvbuff_t *tvb, int offset, proto_tree *tree)
|
|||
proto_tree_add_item(rh_tree, hf_gre_wccp_primary_bucket, tvb, offset +3, 1, ENC_BIG_ENDIAN);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
|
||||
int offset = 0;
|
||||
|
@ -500,13 +500,14 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
S bit doesn't necessarily mean there's no payload. */
|
||||
if (!(flags_and_ver & GRE_SEQUENCE)) {
|
||||
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
||||
return; /* no payload */
|
||||
return offset; /* no payload */
|
||||
}
|
||||
next_tvb = tvb_new_subset_remaining(tvb, offset);
|
||||
pinfo->flags.in_gre_pkt = TRUE;
|
||||
if (!dissector_try_uint(gre_dissector_table, type, next_tvb, pinfo, tree))
|
||||
call_dissector(data_handle,next_tvb, pinfo, gre_tree);
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
|
@ -744,7 +745,7 @@ proto_reg_handoff_gre(void)
|
|||
{
|
||||
dissector_handle_t gre_handle;
|
||||
|
||||
gre_handle = create_dissector_handle(dissect_gre, proto_gre);
|
||||
gre_handle = new_create_dissector_handle(dissect_gre, proto_gre);
|
||||
dissector_add_uint("ip.proto", IP_PROTO_GRE, gre_handle);
|
||||
data_handle = find_dissector("data");
|
||||
}
|
||||
|
|
|
@ -370,16 +370,18 @@ dissect_ipa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_udp
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_ipa_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ipa_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_ipa(tvb, pinfo, tree, FALSE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_ipa_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_ipa_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
dissect_ipa(tvb, pinfo, tree, TRUE);
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void proto_register_ipa(void)
|
||||
|
@ -492,8 +494,8 @@ void proto_reg_handoff_gsm_ipa(void)
|
|||
sub_handles[SUB_MGCP] = find_dissector("mgcp");
|
||||
sub_handles[SUB_DATA] = find_dissector("data");
|
||||
|
||||
ipa_tcp_handle = create_dissector_handle(dissect_ipa_tcp, proto_ipa);
|
||||
ipa_udp_handle = create_dissector_handle(dissect_ipa_udp, proto_ipa);
|
||||
ipa_tcp_handle = new_create_dissector_handle(dissect_ipa_tcp, proto_ipa);
|
||||
ipa_udp_handle = new_create_dissector_handle(dissect_ipa_udp, proto_ipa);
|
||||
ipa_initialized = TRUE;
|
||||
} else {
|
||||
dissector_delete_uint_range("tcp.port", ipa_tcp_ports, ipa_tcp_handle);
|
||||
|
|
|
@ -110,8 +110,8 @@ decode_arfcn(guint16 arfcn, const char **band, guint *uplink, guint *downlink)
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_gsm_um(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
static int
|
||||
dissect_gsm_um(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
||||
{
|
||||
proto_tree *gsm_um_tree = NULL;
|
||||
proto_item *ti;
|
||||
|
@ -227,6 +227,7 @@ dissect_gsm_um(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
break;
|
||||
}
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -300,7 +301,7 @@ proto_reg_handoff_gsm_um(void)
|
|||
dtap_handle = find_dissector("gsm_a_dtap");
|
||||
data_handle = find_dissector("data");
|
||||
|
||||
gsm_um_handle = create_dissector_handle(dissect_gsm_um, proto_gsm_um);
|
||||
gsm_um_handle = new_create_dissector_handle(dissect_gsm_um, proto_gsm_um);
|
||||
|
||||
dissector_add_uint("wtap_encap", WTAP_ENCAP_GSM_UM, gsm_um_handle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue