forked from osmocom/wireshark
Allow "circuit dissectors" to pass data between dissectors. Not sure if this is immediately useful (ie remove need for packet_info (private_)data), but opens the possibility.
svn path=/trunk/; revision=52893
This commit is contained in:
parent
469fc864e6
commit
394f67c1b7
|
@ -293,7 +293,7 @@ circuit_get_dissector(circuit_t *circuit)
|
|||
*/
|
||||
gboolean
|
||||
try_circuit_dissector(circuit_type ctype, guint32 circuit_id, guint32 frame,
|
||||
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
||||
{
|
||||
circuit_t *circuit;
|
||||
|
||||
|
@ -302,8 +302,8 @@ try_circuit_dissector(circuit_type ctype, guint32 circuit_id, guint32 frame,
|
|||
if (circuit != NULL) {
|
||||
if (circuit->dissector_handle == NULL)
|
||||
return FALSE;
|
||||
call_dissector(circuit->dissector_handle, tvb, pinfo,
|
||||
tree);
|
||||
call_dissector_with_data(circuit->dissector_handle, tvb, pinfo,
|
||||
tree, data);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
@ -99,7 +99,7 @@ extern dissector_handle_t circuit_get_dissector(circuit_t *circuit);
|
|||
*/
|
||||
extern gboolean
|
||||
try_circuit_dissector(circuit_type ctype, guint32 circuit_id, guint32 frame,
|
||||
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
||||
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ dissect_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
if (!try_circuit_dissector(pinfo->ctype, pinfo->circuit_id,
|
||||
pinfo->fd->num, tvb, pinfo, tree))
|
||||
pinfo->fd->num, tvb, pinfo, tree, NULL))
|
||||
call_dissector(data_handle, tvb, pinfo, tree);
|
||||
}
|
||||
|
||||
|
|
|
@ -2025,7 +2025,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
/* See if there's already a dissector for this circuit. */
|
||||
if (try_circuit_dissector(CT_X25, vc, pinfo->fd->num, next_tvb, pinfo,
|
||||
tree)) {
|
||||
tree, NULL)) {
|
||||
pinfo->private_data = saved_private_data;
|
||||
return; /* found it and dissected it */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue