Add new function: call_dissector_with_data
svn path=/trunk/; revision=44873
This commit is contained in:
parent
9f92dc93c5
commit
27fb6880c4
|
@ -43,6 +43,7 @@ bytes_to_str_punct
|
||||||
bytestring_to_str
|
bytestring_to_str
|
||||||
call_ber_oid_callback
|
call_ber_oid_callback
|
||||||
call_dissector
|
call_dissector
|
||||||
|
call_dissector_with_data
|
||||||
call_dissector_only
|
call_dissector_only
|
||||||
camel_opr_code_strings DATA
|
camel_opr_code_strings DATA
|
||||||
camelSRTtype_naming DATA
|
camelSRTtype_naming DATA
|
||||||
|
|
|
@ -2028,12 +2028,12 @@ call_dissector_only(dissector_handle_t handle, tvbuff_t *tvb,
|
||||||
* dissector.
|
* dissector.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
|
call_dissector_with_data(dissector_handle_t handle, tvbuff_t *tvb,
|
||||||
packet_info *pinfo, proto_tree *tree)
|
packet_info *pinfo, proto_tree *tree, void *data)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = call_dissector_only(handle, tvb, pinfo, tree, NULL);
|
ret = call_dissector_only(handle, tvb, pinfo, tree, data);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
/*
|
/*
|
||||||
* The protocol was disabled, or the dissector rejected
|
* The protocol was disabled, or the dissector rejected
|
||||||
|
@ -2047,6 +2047,13 @@ call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
|
||||||
|
packet_info *pinfo, proto_tree *tree)
|
||||||
|
{
|
||||||
|
return call_dissector_with_data(handle, tvb, pinfo, tree, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dumps the "layer type"/"decode as" associations to stdout, similar
|
* Dumps the "layer type"/"decode as" associations to stdout, similar
|
||||||
* to the proto_registrar_dump_*() routines.
|
* to the proto_registrar_dump_*() routines.
|
||||||
|
|
|
@ -362,11 +362,14 @@ extern dissector_handle_t new_create_dissector_handle(new_dissector_t dissector,
|
||||||
* @param tvb The buffer to dissect.
|
* @param tvb The buffer to dissect.
|
||||||
* @param pinfo Packet Info.
|
* @param pinfo Packet Info.
|
||||||
* @param tree The protocol tree.
|
* @param tree The protocol tree.
|
||||||
|
* @param data parameter to pass to dissector
|
||||||
* @return If the protocol for that handle isn't enabled call the data
|
* @return If the protocol for that handle isn't enabled call the data
|
||||||
* dissector. Otherwise, if the handle refers to a new-style
|
* dissector. Otherwise, if the handle refers to a new-style
|
||||||
* dissector, call the dissector and return its return value, otherwise call
|
* dissector, call the dissector and return its return value, otherwise call
|
||||||
* it and return the length of the tvbuff pointed to by the argument.
|
* it and return the length of the tvbuff pointed to by the argument.
|
||||||
*/
|
*/
|
||||||
|
extern int call_dissector_with_data(dissector_handle_t handle, tvbuff_t *tvb,
|
||||||
|
packet_info *pinfo, proto_tree *tree, void *data);
|
||||||
extern int call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
|
extern int call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
|
||||||
packet_info *pinfo, proto_tree *tree);
|
packet_info *pinfo, proto_tree *tree);
|
||||||
|
|
||||||
|
@ -377,6 +380,7 @@ extern int call_dissector(dissector_handle_t handle, tvbuff_t *tvb,
|
||||||
* @param tvb The buffer to dissect.
|
* @param tvb The buffer to dissect.
|
||||||
* @param pinfo Packet Info.
|
* @param pinfo Packet Info.
|
||||||
* @param tree The protocol tree.
|
* @param tree The protocol tree.
|
||||||
|
* @param data parameter to pass to dissector
|
||||||
* @return If the protocol for that handle isn't enabled, return 0 without
|
* @return If the protocol for that handle isn't enabled, return 0 without
|
||||||
* calling the dissector. Otherwise, if the handle refers to a new-style
|
* calling the dissector. Otherwise, if the handle refers to a new-style
|
||||||
* dissector, call the dissector and return its return value, otherwise call
|
* dissector, call the dissector and return its return value, otherwise call
|
||||||
|
|
Loading…
Reference in New Issue