IS-IS (LSP) Add Shared Risk Link Group (SRLG) clv (138)

Bug:11246
Change-Id: I303de72cda8e667dcd3ccd1af3f2989123718544
Reviewed-on: https://code.wireshark.org/review/8743
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Alexis La Goutte 2015-06-03 08:55:37 +02:00 committed by Michael Mann
parent 4490d5eb49
commit ee5166185e
2 changed files with 96 additions and 1 deletions

View File

@ -59,7 +59,7 @@
#define ISIS_CLV_TE_ROUTER_ID 134 /* draft-ietf-isis-traffic-05 */
#define ISIS_CLV_EXTD_IP_REACH 135 /* draft-ietf-isis-traffic-05 */
#define ISIS_CLV_HOSTNAME 137 /* rfc2763 */
#define ISIS_CLV_SHARED_RISK_GROUP 138 /* draft-ietf-isis-gmpls-extensions */
#define ISIS_CLV_SHARED_RISK_GROUP 138 /* rfc5307 */
#define ISIS_GRP_ADDR 142 /* rfc7176 */
#define ISIS_CLV_MT_PORT_CAP 143 /* rfc6165, rfc7176 */
#define ISIS_CLV_MT_CAP 144 /* rfc6329, rfc7176 */

View File

@ -149,6 +149,12 @@ static int hf_isis_lsp_remaining_life = -1;
static int hf_isis_lsp_sequence_number = -1;
static int hf_isis_lsp_lsp_id = -1;
static int hf_isis_lsp_hostname = -1;
static int hf_isis_lsp_srlg_system_id = -1;
static int hf_isis_lsp_srlg_pseudo_num = -1;
static int hf_isis_lsp_srlg_flags_numbered = -1;
static int hf_isis_lsp_srlg_ipv4_local = -1;
static int hf_isis_lsp_srlg_ipv4_remote = -1;
static int hf_isis_lsp_srlg_value = -1;
static int hf_isis_lsp_checksum = -1;
static int hf_isis_lsp_checksum_bad = -1;
static int hf_isis_lsp_checksum_good = -1;
@ -377,6 +383,7 @@ static gint ett_isis_lsp_clv_partition_dis = -1;
static gint ett_isis_lsp_clv_prefix_neighbors = -1;
static gint ett_isis_lsp_clv_nlpid = -1;
static gint ett_isis_lsp_clv_hostname = -1;
static gint ett_isis_lsp_clv_srlg = -1;
static gint ett_isis_lsp_clv_te_router_id = -1;
static gint ett_isis_lsp_clv_authentication = -1;
static gint ett_isis_lsp_clv_ip_authentication = -1;
@ -1526,6 +1533,51 @@ dissect_lsp_hostname_clv(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree
hf_isis_lsp_hostname);
}
/*
* Name: dissect_lsp_srlg_clv()
*
* Description:
* Decode for a lsp packets Shared Risk Link Group (SRLG) clv (138). Calls into the
* clv common one.
*
* Input:
* tvbuff_t * : tvbuffer for packet data
* proto_tree * : proto tree to build on (may be null)
* int : current offset into packet data
* int : length of IDs in packet.
* int : length of this clv
*
* Output:
* void, will modify proto_tree if not null.
*/
static void
dissect_lsp_srlg_clv(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree, int offset,
int id_length _U_, int length)
{
proto_tree_add_item(tree, hf_isis_lsp_srlg_system_id, tvb, offset, 6, ENC_BIG_ENDIAN);
offset += 6;
proto_tree_add_item(tree, hf_isis_lsp_srlg_pseudo_num, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(tree, hf_isis_lsp_srlg_flags_numbered, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(tree, hf_isis_lsp_srlg_ipv4_local, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(tree, hf_isis_lsp_srlg_ipv4_remote, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
length -= 16;
while(length){
proto_tree_add_item(tree, hf_isis_lsp_srlg_value, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
length -= 4;
}
}
/*
* Name: dissect_lsp_te_router_id_clv()
@ -3233,6 +3285,12 @@ static const isis_clv_handle_t clv_l2_lsp_opts[] = {
&ett_isis_lsp_clv_hostname,
dissect_lsp_hostname_clv
},
{
ISIS_CLV_SHARED_RISK_GROUP,
"Shared Risk Link Group",
&ett_isis_lsp_clv_srlg,
dissect_lsp_srlg_clv
},
{
ISIS_CLV_TE_ROUTER_ID,
"Traffic Engineering Router ID",
@ -3504,6 +3562,42 @@ proto_register_isis_lsp(void)
NULL, HFILL }
},
{ &hf_isis_lsp_srlg_system_id,
{ "System ID", "isis.lsp.srlg.system_id",
FT_SYSTEM_ID, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_srlg_pseudo_num,
{ "Pseudonode num", "isis.lsp.srlg.pseudo_num",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_srlg_flags_numbered,
{ "Numbered", "isis.lsp.srlg.flags_numbered",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
NULL, HFILL }
},
{ &hf_isis_lsp_srlg_ipv4_local,
{ "IPv4 interface address/Link Local Identifier", "isis.lsp.srlg.ipv4_local",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_srlg_ipv4_remote,
{ "IPv4 neighbor address/Link remote Identifier", "isis.lsp.srlg.ipv4_remote",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_srlg_value,
{ "Shared Risk Link Group Value", "isis.lsp.srlg.value",
FT_UINT32, BASE_DEC_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_isis_lsp_sequence_number,
{ "Sequence number", "isis.lsp.sequence_number",
FT_UINT32, BASE_HEX, NULL, 0x0,
@ -4595,6 +4689,7 @@ proto_register_isis_lsp(void)
&ett_isis_lsp_clv_ip_authentication,
&ett_isis_lsp_clv_nlpid,
&ett_isis_lsp_clv_hostname,
&ett_isis_lsp_clv_srlg,
&ett_isis_lsp_clv_ipv4_int_addr,
&ett_isis_lsp_clv_ipv6_int_addr, /* CLV 232 */
&ett_isis_lsp_clv_mt_cap,