aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ospf.c
diff options
context:
space:
mode:
authorUli Heilmeier <uh@heilmeier.eu>2019-03-10 22:50:00 +0100
committerAnders Broman <a.broman58@gmail.com>2019-03-11 09:42:07 +0000
commitcdb5924c4026e26298961e9686c91d64ea96acb5 (patch)
treee290a6900f7feb931da37b3d193530d6448344d3 /epan/dissectors/packet-ospf.c
parent0c12cd57c763911a3b683888f846761328973749 (diff)
OSPF: Add RFC8510
Adding LLS type Local Interface ID as defined in RFC8510 Ping-Bug: 15459 Change-Id: Ib9d99f56caf22e71b95aabb9e4f6ac16c15ae1c4 Reviewed-on: https://code.wireshark.org/review/32386 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ospf.c')
-rw-r--r--epan/dissectors/packet-ospf.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c
index c009b37927..b7d0cfcb64 100644
--- a/epan/dissectors/packet-ospf.c
+++ b/epan/dissectors/packet-ospf.c
@@ -365,9 +365,15 @@ static const value_string ospf_v3_lsa_link_id_vals[] = {
{0, NULL},
};
+/* OSPFv3 LLS TLV Types */
+#define LLS_V2_EXT_OPT 1
+#define LLS_V2_CRYPTO_OPT 2
+#define LLS_V2_LI_ID_OPT 18
+
static const value_string lls_tlv_type_vals[] = {
- {1, "Extended options TLV" },
- {2, "Crypto Authentication TLV" },
+ {LLS_V2_EXT_OPT, "Extended options TLV" },
+ {LLS_V2_CRYPTO_OPT, "Crypto Authentication TLV" },
+ {LLS_V2_LI_ID_OPT, "Local Interface ID" },
{0, NULL }
};
@@ -904,6 +910,7 @@ static int hf_ospf_mpls_interface_mtu = -1;
static int hf_ospf_v3_lsa_neighbor_interface_id = -1;
static int hf_ospf_lsa_number_of_links = -1;
static int hf_ospf_v2_lls_auth_data = -1;
+static int hf_ospf_v2_lls_li_id = -1;
static int hf_ospf_oif_switching_cap = -1;
static int hf_ospf_ls_number_of_lsas = -1;
static int hf_ospf_v3_lls_neighbor = -1;
@@ -1461,13 +1468,15 @@ dissect_ospfv2_lls_tlv(tvbuff_t *tvb, int offset, proto_tree *tree)
proto_tree_add_item(ospf_lls_tlv_tree, hf_ospf_tlv_length, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
switch(type) {
- case 1:
+ case LLS_V2_EXT_OPT:
proto_tree_add_bitmask(ospf_lls_tlv_tree, tvb, offset + 4, hf_ospf_lls_ext_options, ett_ospf_lls_ext_options, bf_lls_ext_options, ENC_BIG_ENDIAN);
break;
- case 2:
+ case LLS_V2_CRYPTO_OPT:
proto_tree_add_item(ospf_lls_tlv_tree, hf_ospf_v2_lls_sequence_number, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(ospf_lls_tlv_tree, hf_ospf_v2_lls_auth_data, tvb, offset + 8, length - 4, ENC_NA);
break;
+ case LLS_V2_LI_ID_OPT:
+ proto_tree_add_item(ospf_lls_tlv_tree, hf_ospf_v2_lls_li_id, tvb, offset + 4, 4, ENC_NA);
}
return offset + length + 4;
@@ -4471,6 +4480,9 @@ proto_register_ospf(void)
{&hf_ospf_v3_lls_fsf_tlv,
{ "Full State For TLV", "ospf.v3.lls.fsf.tlv", FT_NONE, BASE_NONE,
NULL, 0x0, NULL, HFILL }},
+ {&hf_ospf_v2_lls_li_id,
+ { "Local Interface ID", "ospf.v3.lls.ll_id", FT_BYTES, BASE_NONE,
+ NULL, 0x0, NULL, HFILL }},
/* Generated from convert_proto_tree_add_text.pl */
{ &hf_ospf_v2_lls_sequence_number, { "Sequence number", "ospf.v2.lls.sequence_number", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
{ &hf_ospf_v2_lls_auth_data, { "Auth Data", "ospf.v2.lls.auth_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},