diff options
author | marmonier_c <cmarmonier@ifotec.com> | 2024-02-16 14:55:54 +0100 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2024-02-22 04:52:56 +0000 |
commit | 25487eceef4f9070253cdb94c449c383b008a501 (patch) | |
tree | a7a5c356c093400b0e691772fc7ac60648543aa3 /epan/dissectors/packet-lldp.c | |
parent | 1703eea6531d708f893a8c2d4ad8021c17afb0b3 (diff) |
feat(#19647): decode Datum enum and Ver field
Use RFC 6225 (obsoletes RFC 3825)
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r-- | epan/dissectors/packet-lldp.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index 36efbadcc8..30ae8d979f 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -354,6 +354,8 @@ static int hf_media_loc_long; static int hf_media_loc_alt_type; static int hf_media_loc_alt_resolution; static int hf_media_loc_alt; +static int hf_media_loc_ver; +static int hf_media_loc_reserved; static int hf_media_loc_datum; static int hf_media_civic_lci_length; static int hf_media_civic_what; @@ -977,6 +979,14 @@ static const value_string altitude_type[] = { { 0, NULL } }; +/* Datum Type */ +static const value_string datum_type_values[] = { + { 1, "WGS84" }, + { 2, "NAD83 (Latitude, Longitude) + NAVD88" }, + { 3, "NAD83 (Latitude, Longitude) + MLLW" }, + { 0, NULL } +}; + /* Civic Address LCI - What field */ static const value_string civic_address_what_values[] = { { 0, "Location of the DHCP server" }, @@ -3433,7 +3443,7 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case 1: /* Coordinate-based LCI */ { /* - * See RFC 3825. + * See RFC 6225 (obsoletes RFC 3825). * XXX - should this be handled by the BOOTP * dissector, and exported to us? */ @@ -3472,6 +3482,12 @@ dissect_media_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 4; + /* Get Ver */ + proto_tree_add_item(tree, hf_media_loc_ver, tvb, offset, 1, ENC_BIG_ENDIAN); + + /* Get reserved */ + proto_tree_add_item(tree, hf_media_loc_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); + /* Get datum */ proto_tree_add_item(tree, hf_media_loc_datum, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -6068,9 +6084,17 @@ proto_register_lldp(void) { "Altitude", "lldp.media.loc.altitude", FT_UINT32, BASE_CUSTOM, CF_FUNC(altitude_base), 0x0, NULL, HFILL } }, + { &hf_media_loc_ver, + { "Ver", "lldp.media.loc.ver", FT_UINT8, BASE_DEC, + NULL, 0xC0, NULL, HFILL } + }, + { &hf_media_loc_reserved, + { "Reserved", "lldp.media.loc.reserved", FT_UINT8, BASE_DEC, + NULL, 0x38, NULL, HFILL } + }, { &hf_media_loc_datum, { "Datum", "lldp.media.loc.datum", FT_UINT8, BASE_DEC, - NULL, 0x0, NULL, HFILL } + VALS(datum_type_values), 0x07, NULL, HFILL } }, { &hf_media_civic_lci_length, { "LCI Length", "lldp.media.civic.length", FT_UINT8, BASE_DEC, |