diff options
author | AndersBroman <anders.broman@ericsson.com> | 2016-06-03 12:50:33 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-06-03 12:41:26 +0000 |
commit | 798360422b596e4d39cfef9ca26cea8b8ef1de3d (patch) | |
tree | 8f723274026f02c637674862059ec9a4101a0d92 /epan/dissectors/packet-ieee1722.c | |
parent | ae4f7e4b5bd782394635e3dcfed72d90fed7f099 (diff) |
[IEEE1722] Add a range_string for the subtypes we know about.
Ping-bug: 12490
Change-Id: I27ce4a0b870d81bfdea188f00ff8101897ad969d
Reviewed-on: https://code.wireshark.org/review/15710
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ieee1722.c')
-rw-r--r-- | epan/dissectors/packet-ieee1722.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ieee1722.c b/epan/dissectors/packet-ieee1722.c index 48eb0ed78c..ed79f36f0b 100644 --- a/epan/dissectors/packet-ieee1722.c +++ b/epan/dissectors/packet-ieee1722.c @@ -122,6 +122,24 @@ static expert_field ei_1722_incorrect_dbs = EI_INIT; static dissector_table_t avb_dissector_table; +static const true_false_string tfs_ieee1722_control_data = { "Control", "Data" }; + + +static const range_string ieee1722_subtype_range_vals[] = { + { 0,0, "IEC 61883/IIDC over AVTP" }, + { 1,1, "MMA payload over AVTP" }, + { 2,2, "Simple Audio Format" }, + { 3,3, "Simple Video Format" }, + { 5,5, "CRF" }, + { 6,0x7a, "Reserved for future protocols " }, + { 0x7a,0x7a, "AVDECC Discovery Protocol" }, + { 0x7b,0x7b, "AVDECC Enumeration and Control Protocol" }, + { 0x7c,0x7c, "AVDECC Connection Management Protocol" }, + { 0x7d,0x7d, "MAAP" }, + { 0x7f,0x7f, "Experimental" }, + { 0,0, NULL } +}; + static int dissect_1722(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { @@ -265,11 +283,11 @@ void proto_register_1722(void) static hf_register_info hf[] = { { &hf_1722_cdfield, { "Control/Data Indicator", "ieee1722.cdfield", - FT_BOOLEAN, 8, NULL, IEEE_1722_CD_MASK, NULL, HFILL } + FT_BOOLEAN, 8, TFS(&tfs_ieee1722_control_data), IEEE_1722_CD_MASK, NULL, HFILL } }, { &hf_1722_subtype, { "AVBTP Subtype", "ieee1722.subtype", - FT_UINT8, BASE_HEX, NULL, IEEE_1722_SUBTYPE_MASK, NULL, HFILL } + FT_UINT8, BASE_HEX | BASE_RANGE_STRING, RVALS(ieee1722_subtype_range_vals), IEEE_1722_SUBTYPE_MASK, NULL, HFILL } }, { &hf_1722_svfield, { "AVBTP Stream ID Valid", "ieee1722.svfield", |