aboutsummaryrefslogtreecommitdiffstats
path: root/packet-isis-lsp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-04-16 10:04:33 +0000
committerGuy Harris <guy@alum.mit.edu>2001-04-16 10:04:33 +0000
commit77789be82e07e04c592b3d92bf057b1858e99f6c (patch)
treebb3bfeb289d92e59456cbdce615a387fd01f1f61 /packet-isis-lsp.c
parent846213236a59fc082c038e9d5e13efb4bfd81c36 (diff)
Assorted ISIS enhancements from Hannes Gredler.
When dissecting the ISIS NLPID CLV, use the "nlpid_vals" array to convert NLPID values to protocol names. svn path=/trunk/; revision=3308
Diffstat (limited to 'packet-isis-lsp.c')
-rw-r--r--packet-isis-lsp.c62
1 files changed, 58 insertions, 4 deletions
diff --git a/packet-isis-lsp.c b/packet-isis-lsp.c
index bcda7c844a..2cabd5979a 100644
--- a/packet-isis-lsp.c
+++ b/packet-isis-lsp.c
@@ -1,7 +1,7 @@
/* packet-isis-lsp.c
* Routines for decoding isis lsp packets and their CLVs
*
- * $Id: packet-isis-lsp.c,v 1.11 2001/04/08 19:32:03 guy Exp $
+ * $Id: packet-isis-lsp.c,v 1.12 2001/04/16 10:04:30 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -56,6 +56,7 @@ static int hf_isis_lsp_remaining_life = -1;
static int hf_isis_lsp_sequence_number = -1;
static int hf_isis_lsp_checksum = -1;
static int hf_isis_lsp_clv_ipv4_int_addr = -1;
+static int hf_isis_lsp_clv_te_router_id = -1;
static gint ett_isis_lsp = -1;
static gint ett_isis_lsp_clv_area_addr = -1;
@@ -65,6 +66,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_te_router_id = -1;
static gint ett_isis_lsp_clv_auth = -1;
static gint ett_isis_lsp_clv_ipv4_int_addr = -1;
static gint ett_isis_lsp_clv_ip_reachability = -1;
@@ -100,6 +102,8 @@ static void dissect_lsp_nlpid_clv(const u_char *pd, int offset,
guint length, int id_length, frame_data *fd, proto_tree *tree);
static void dissect_lsp_hostname_clv(const u_char *pd, int offset,
guint length, int id_length, frame_data *fd, proto_tree *tree);
+static void dissect_lsp_te_router_id_clv(const u_char *pd, int offset,
+ guint length, int id_length, frame_data *fd, proto_tree *tree);
static void dissect_lsp_ip_int_addr_clv(const u_char *pd, int offset,
guint length, int id_length, frame_data *fd, proto_tree *tree);
static void dissect_lsp_l1_auth_clv(const u_char *pd, int offset,
@@ -134,7 +138,7 @@ static const isis_clv_handle_t clv_l1_lsp_opts[] = {
},
{
ISIS_CLV_L1_LSP_NLPID,
- "NLPID",
+ "Protocols supported",
&ett_isis_lsp_clv_nlpid,
dissect_lsp_nlpid_clv
},
@@ -144,6 +148,12 @@ static const isis_clv_handle_t clv_l1_lsp_opts[] = {
&ett_isis_lsp_clv_hostname,
dissect_lsp_hostname_clv
},
+ {
+ ISIS_CLV_L1_LSP_TE_ROUTER_ID,
+ "Traffic Engineering Router ID",
+ &ett_isis_lsp_clv_te_router_id,
+ dissect_lsp_te_router_id_clv
+ },
{
ISIS_CLV_L1_LSP_IP_INTERFACE_ADDR,
"IP Interface address(es)",
@@ -203,7 +213,7 @@ static const isis_clv_handle_t clv_l2_lsp_opts[] = {
},
{
ISIS_CLV_L2_LSP_NLPID,
- "NLPID",
+ "Protocols supported",
&ett_isis_lsp_clv_nlpid,
dissect_lsp_nlpid_clv
},
@@ -213,6 +223,12 @@ static const isis_clv_handle_t clv_l2_lsp_opts[] = {
&ett_isis_lsp_clv_hostname,
dissect_lsp_hostname_clv
},
+ {
+ ISIS_CLV_L2_LSP_TE_ROUTER_ID,
+ "Traffic Engineering Router ID",
+ &ett_isis_lsp_clv_te_router_id,
+ dissect_lsp_te_router_id_clv
+ },
{
ISIS_CLV_L2_LSP_IP_EXT_REACHABLE,
"IP external reachability",
@@ -396,6 +412,36 @@ dissect_lsp_hostname_clv(const u_char *pd, int offset,
guint length, int id_length, frame_data *fd, proto_tree *tree) {
isis_dissect_hostname_clv(pd, offset, length, fd, tree );
}
+
+
+/*
+ * Name: dissect_lsp_te_router_id_clv()
+ *
+ * Description:
+ * Decode for a lsp packets Traffic Engineering ID clv. Calls into the
+ * clv common one.
+ *
+ * Input:
+ * u_char * : packet data
+ * int : current offset into packet data
+ * guint : length of this clv
+ * int : length of IDs in packet.
+ * frame_data * : frame data
+ * proto_tree * : proto tree to build on (may be null)
+ *
+ * Output:
+ * void, will modify proto_tree if not null.
+ */
+static void
+dissect_lsp_te_router_id_clv(const u_char *pd, int offset,
+ guint length, int id_length, frame_data *fd, proto_tree *tree) {
+ isis_dissect_te_router_id_clv(pd, offset, length, fd, tree,
+ hf_isis_lsp_clv_te_router_id );
+}
+
+
+
+
/*
* Name: dissect_lsp_ip_int_addr_clv()
*
@@ -576,9 +622,12 @@ dissect_lsp_eis_neighbors_clv_inner(const u_char *pd, int offset,
"Expense",FALSE );
dissect_metric ( ntree, offset + 3, pd[offset+3],
"Error", FALSE );
- proto_tree_add_text ( ntree, NullTVB, offset + 4, id_length,
+
+/* this is redundant information
+ Proto_tree_add_text ( ntree, NullTVB, offset + 4, id_length,
"Neighbour ID: %s",
print_system_id( pd + offset + 4, id_length ) );
+*/
}
offset += tlen;
length -= tlen;
@@ -974,6 +1023,10 @@ proto_register_isis_lsp(void) {
{ &hf_isis_lsp_clv_ipv4_int_addr,
{ "IPv4 interface address: ", "isis_lsp.clv_ipv4_int_addr", FT_IPv4,
BASE_NONE, NULL, 0x0, "" }},
+
+ { &hf_isis_lsp_clv_te_router_id,
+ { "Traffic Engineering Router ID: ", "isis_lsp.clv_te_router_id", FT_IPv4,
+ BASE_NONE, NULL, 0x0, "" }},
};
static gint *ett[] = {
&ett_isis_lsp,
@@ -986,6 +1039,7 @@ proto_register_isis_lsp(void) {
&ett_isis_lsp_clv_nlpid,
&ett_isis_lsp_clv_hostname,
&ett_isis_lsp_clv_ipv4_int_addr,
+ &ett_isis_lsp_clv_te_router_id,
&ett_isis_lsp_clv_ip_reachability,
};