forked from osmocom/wireshark
SOME/IP: Adding string fields for easier filtering
This commit is contained in:
parent
4fa373400f
commit
0f5025eae4
|
@ -109,11 +109,13 @@ static int hf_someip_sd_entry_numopt1 = -1;
|
|||
static int hf_someip_sd_entry_numopt2 = -1;
|
||||
static int hf_someip_sd_entry_opts_referenced = -1;
|
||||
static int hf_someip_sd_entry_serviceid = -1;
|
||||
static int hf_someip_sd_entry_servicename = -1;
|
||||
static int hf_someip_sd_entry_instanceid = -1;
|
||||
static int hf_someip_sd_entry_majorver = -1;
|
||||
static int hf_someip_sd_entry_ttl = -1;
|
||||
static int hf_someip_sd_entry_minorver = -1;
|
||||
static int hf_someip_sd_entry_eventgroupid = -1;
|
||||
static int hf_someip_sd_entry_eventgroupname = -1;
|
||||
static int hf_someip_sd_entry_reserved = -1;
|
||||
static int hf_someip_sd_entry_counter = -1;
|
||||
static int hf_someip_sd_entry_intial_event_flag = -1;
|
||||
|
@ -582,6 +584,9 @@ dissect_someip_sd_pdu_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
description = someip_lookup_service_name((guint16)serviceid);
|
||||
if (description != NULL) {
|
||||
proto_item_append_text(ti, " (%s)", description);
|
||||
ti = proto_tree_add_string(tree, hf_someip_sd_entry_servicename, tvb, offset, 2, description);
|
||||
proto_item_set_generated(ti);
|
||||
proto_item_set_hidden(ti);
|
||||
}
|
||||
offset += 2;
|
||||
|
||||
|
@ -613,6 +618,9 @@ dissect_someip_sd_pdu_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
description = someip_lookup_eventgroup_name((guint16)serviceid, (guint16)eventgroupid);
|
||||
if (description != NULL) {
|
||||
proto_item_append_text(ti, " (%s)", description);
|
||||
ti = proto_tree_add_string(tree, hf_someip_sd_entry_eventgroupname, tvb, offset, 2, description);
|
||||
proto_item_set_generated(ti);
|
||||
proto_item_set_hidden(ti);
|
||||
}
|
||||
|
||||
proto_item_append_text(ti_top, " (Service ID 0x%04x, Instance ID 0x%04x, Eventgroup ID 0x%04x, Version %u)", serviceid, instanceid, eventgroupid, majorver);
|
||||
|
@ -1030,6 +1038,9 @@ proto_register_someip_sd(void) {
|
|||
{ &hf_someip_sd_entry_serviceid,
|
||||
{ "Service ID", "someipsd.entry.serviceid",
|
||||
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_sd_entry_servicename,
|
||||
{ "Service Name", "someipsd.entry.servicename",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_sd_entry_instanceid,
|
||||
{ "Instance ID", "someipsd.entry.instanceid",
|
||||
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||
|
@ -1045,6 +1056,9 @@ proto_register_someip_sd(void) {
|
|||
{ &hf_someip_sd_entry_eventgroupid,
|
||||
{ "Eventgroup ID", "someipsd.entry.eventgroupid",
|
||||
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_sd_entry_eventgroupname,
|
||||
{ "Eventgroup Name", "someipsd.entry.eventgroupname",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_sd_entry_reserved,
|
||||
{ "Reserved", "someipsd.entry.reserved",
|
||||
FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
|
||||
|
|
|
@ -132,9 +132,12 @@ static dissector_handle_t someip_handle_tcp = NULL;
|
|||
/* header field */
|
||||
static int hf_someip_messageid = -1;
|
||||
static int hf_someip_serviceid = -1;
|
||||
static int hf_someip_servicename = -1;
|
||||
static int hf_someip_methodid = -1;
|
||||
static int hf_someip_methodname = -1;
|
||||
static int hf_someip_length = -1;
|
||||
static int hf_someip_clientid = -1;
|
||||
static int hf_someip_clientname = -1;
|
||||
static int hf_someip_sessionid = -1;
|
||||
static int hf_someip_protover = -1;
|
||||
static int hf_someip_interface_ver = -1;
|
||||
|
@ -3482,6 +3485,9 @@ dissect_someip_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
|
|||
service_description = someip_lookup_service_name(someip_serviceid);
|
||||
if (service_description != NULL) {
|
||||
proto_item_append_text(ti, " (%s)", service_description);
|
||||
ti = proto_tree_add_string(someip_tree, hf_someip_servicename, tvb, offset, 2, service_description);
|
||||
proto_item_set_generated(ti);
|
||||
proto_item_set_hidden(ti);
|
||||
}
|
||||
offset += 2;
|
||||
|
||||
|
@ -3490,6 +3496,9 @@ dissect_someip_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
|
|||
method_description = someip_lookup_method_name(someip_serviceid, someip_methodid);
|
||||
if (method_description != NULL) {
|
||||
proto_item_append_text(ti, " (%s)", method_description);
|
||||
ti = proto_tree_add_string(someip_tree, hf_someip_methodname , tvb, offset, 2, method_description);
|
||||
proto_item_set_generated(ti);
|
||||
proto_item_set_hidden(ti);
|
||||
}
|
||||
offset += 2;
|
||||
|
||||
|
@ -3527,6 +3536,9 @@ dissect_someip_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
|
|||
client_description = someip_lookup_client_name(someip_serviceid, someip_clientid);
|
||||
if (client_description != NULL) {
|
||||
proto_item_append_text(ti, " (%s)", client_description);
|
||||
ti = proto_tree_add_string(someip_tree, hf_someip_clientname, tvb, offset, 2, client_description);
|
||||
proto_item_set_generated(ti);
|
||||
proto_item_set_hidden(ti);
|
||||
}
|
||||
offset += 2;
|
||||
|
||||
|
@ -3711,9 +3723,15 @@ proto_register_someip(void) {
|
|||
{ &hf_someip_serviceid,
|
||||
{ "Service ID", "someip.serviceid",
|
||||
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_servicename,
|
||||
{ "Service Name", "someip.servicename",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_methodid,
|
||||
{ "Method ID", "someip.methodid",
|
||||
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_methodname,
|
||||
{ "Method Name", "someip.methodname",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_messageid,
|
||||
{ "Message ID", "someip.messageid",
|
||||
FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||
|
@ -3723,6 +3741,9 @@ proto_register_someip(void) {
|
|||
{ &hf_someip_clientid,
|
||||
{ "Client ID", "someip.clientid",
|
||||
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_clientname,
|
||||
{ "Client Name", "someip.clientname",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||
{ &hf_someip_sessionid,
|
||||
{ "Session ID", "someip.sessionid",
|
||||
FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||
|
|
Loading…
Reference in New Issue