aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS3
-rw-r--r--epan/osi-utils.c9
-rw-r--r--nlpid.h3
-rw-r--r--packet-isis-clv.c53
-rw-r--r--packet-isis-clv.h4
-rw-r--r--packet-isis-hello.c8
-rw-r--r--packet-isis-lsp.c62
-rw-r--r--packet-isis-lsp.h4
-rw-r--r--packet-osi.c3
-rw-r--r--packet-ppp.c4
-rw-r--r--ppptypes.h5
11 files changed, 134 insertions, 24 deletions
diff --git a/AUTHORS b/AUTHORS
index 9dd802989b..0b56338539 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -564,8 +564,7 @@ Michal Melerowicz <Michal.Melerowicz@nokia.com> {
Hannes Gredler <hannes@juniper.net> {
OSI network layer over PPP support
- Fix to P2P ISIS processing
- ISIS hostname TLV support
+ Many ISIS enhancements
}
Alain Magloire <alainm@rcsm.ece.mcgill.ca> was kind enough to
diff --git a/epan/osi-utils.c b/epan/osi-utils.c
index 887265df7d..5c916ac9ad 100644
--- a/epan/osi-utils.c
+++ b/epan/osi-utils.c
@@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly
* Main entrance point and common functions
*
- * $Id: osi-utils.c,v 1.2 2001/04/02 10:41:19 guy Exp $
+ * $Id: osi-utils.c,v 1.3 2001/04/16 10:04:33 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@@ -86,7 +86,7 @@ gchar *print_system_id( const guint8 *buffer, int length ) {
cur = str;
if ( ( 6 == length ) || ( 7 == length ) ) { /* Special case, print as MAC */
- cur += sprintf(str, "[%02x:%02x:%02x_%02x:%02x:%02x]", buffer[0], buffer[1],
+ cur += sprintf(str, "%02x%02x.%02x%02x.%02x%02x", buffer[0], buffer[1],
buffer[2], buffer[3], buffer[4], buffer[5] );
if ( 7 == length ) {
sprintf( cur, "-%02x", buffer[6] );
@@ -152,6 +152,11 @@ gchar *print_area(const guint8 *buffer, int length)
return str;
}
else { /* print standard format */
+ if ( length == RFC1237_AREA_LEN ) {
+ sprintf( str, "%02x.%02x%02x", buffer[0], buffer[1],
+ buffer[2] );
+ return( str );
+ }
if ( 4 < length ) {
while ( tmp < length / 4 ) { /* 16/4==4 four Octets left to print */
cur += sprintf( str, "%02x%02x%02x%02x.", buffer[tmp++], buffer[tmp++],
diff --git a/nlpid.h b/nlpid.h
index 4b06ed2ee6..80f5271874 100644
--- a/nlpid.h
+++ b/nlpid.h
@@ -2,7 +2,7 @@
* Definitions of OSI NLPIDs (Network Layer Protocol IDs)
* Laurent Deniel <deniel@worldnet.fr>
*
- * $Id: nlpid.h,v 1.8 2001/03/30 10:51:49 guy Exp $
+ * $Id: nlpid.h,v 1.9 2001/04/16 10:04:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -43,6 +43,7 @@
#define NLPID_ISO9542X25_ESIS 0x8a
#define NLPID_ISO10030 0x8c
#define NLPID_ISO11577 0x8d /* X.273 */
+#define NLPID_IP6 0x8e
#define NLPID_COMPRESSED 0xb0 /* "Data compression protocol" */
#define NLPID_IP 0xcc
#define NLPID_PPP 0xcf
diff --git a/packet-isis-clv.c b/packet-isis-clv.c
index 5c55d4d967..71ce3153d5 100644
--- a/packet-isis-clv.c
+++ b/packet-isis-clv.c
@@ -1,7 +1,7 @@
/* packet-isis-clv.c
* Common CLV decode routines.
*
- * $Id: packet-isis-clv.c,v 1.9 2001/04/08 19:32:03 guy Exp $
+ * $Id: packet-isis-clv.c,v 1.10 2001/04/16 10:04:30 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -46,6 +46,7 @@
#include "packet-osi.h"
#include "packet-isis.h"
#include "packet-isis-clv.h"
+#include "nlpid.h"
/*
@@ -262,6 +263,45 @@ isis_dissect_ip_int_clv(const u_char *pd, int offset,
}
}
+
+/*
+ * Name: isis_dissect_te_router_id_clv()
+ *
+ * Description:
+ * Display the Traffic Engineering Router ID TLV #134.
+ * This TLV is like the IP Interface TLV, except that
+ * only _one_ IP address is present
+ *
+ * Input:
+ * u_char * : packet data
+ * int : offset into packet data where we are.
+ * guint : length of clv we are decoding
+ * frame_data * : frame data (complete frame)
+ * proto_tree * : protocol display tree to fill out. May be NULL
+ * gint : tree id to use for proto tree.
+ *
+ * Output:
+ * void, but we will add to proto tree if !NULL.
+ */
+void
+isis_dissect_te_router_id_clv(const u_char *pd, int offset,
+ guint length, frame_data *fd, proto_tree *tree, gint tree_id ) {
+ guint32 addr;
+ if ( length <= 0 ) {
+ return;
+ }
+
+ if ( length != 4 ) {
+ isis_dissect_unknown(offset, length, tree, fd,
+ "malformed Traffic Engineering Router ID (%d vs 4)",length );
+ return;
+ }
+ memcpy(&addr, &pd[offset], sizeof(addr));
+ if ( tree ) {
+ proto_tree_add_ipv4(tree, tree_id, NullTVB, offset, 4, addr);
+ }
+}
+
/*
* Name: isis_dissect_nlpid_clv()
*
@@ -293,16 +333,19 @@ isis_dissect_nlpid_clv(const u_char *pd, int offset,
while ( length-- > 0 ) {
if (s != sbuf ) {
- s += sprintf ( s, ", " );
- }
- s += sprintf ( s, "0x%02x", pd[offset++] );
+ s += sprintf ( s, ", " );
+ }
+ s += sprintf ( s, "%s (0x%02x)",
+ val_to_str(pd[offset], nlpid_vals, "Unknown"), pd[offset]);
+ offset++;
}
+
if ( hlen == 0 ) {
sprintf ( sbuf, "--none--" );
}
proto_tree_add_text ( tree, NullTVB, old_offset, hlen,
- "NLPID: %s", sbuf );
+ "NLPID(s): %s", sbuf );
}
/*
diff --git a/packet-isis-clv.h b/packet-isis-clv.h
index c6d7b757ca..e9f1a6adc1 100644
--- a/packet-isis-clv.h
+++ b/packet-isis-clv.h
@@ -1,7 +1,7 @@
/* packet-isis-clv.h
* Declares for common clv decoding functions.
*
- * $Id: packet-isis-clv.h,v 1.3 2001/04/08 19:32:03 guy Exp $
+ * $Id: packet-isis-clv.h,v 1.4 2001/04/16 10:04:30 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -58,4 +58,6 @@ extern void isis_dissect_nlpid_clv(const u_char *pd, int offset,
guint length, frame_data *fd, proto_tree *tree );
extern void isis_dissect_hostname_clv(const u_char *pd, int offset,
guint length, frame_data *fd, proto_tree *tree );
+extern void isis_dissect_te_router_id_clv(const u_char *pd, int offset,
+ guint length, frame_data *fd, proto_tree *tree, gint tree_id );
#endif /* _PACKET_ISIS_CLV_H */
diff --git a/packet-isis-hello.c b/packet-isis-hello.c
index d5f664f134..bad5793564 100644
--- a/packet-isis-hello.c
+++ b/packet-isis-hello.c
@@ -1,7 +1,7 @@
/* packet-isis-hello.c
* Routines for decoding isis hello packets and their CLVs
*
- * $Id: packet-isis-hello.c,v 1.12 2001/04/08 19:32:03 guy Exp $
+ * $Id: packet-isis-hello.c,v 1.13 2001/04/16 10:04:30 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -107,7 +107,7 @@ static const isis_clv_handle_t clv_l1_hello_opts[] = {
},
{
ISIS_CLV_L1H_NLPID,
- "NLPID",
+ "Protocols Supported",
&ett_isis_hello_clv_nlpid,
dissect_hello_nlpid_clv
},
@@ -158,7 +158,7 @@ static const isis_clv_handle_t clv_l2_hello_opts[] = {
},
{
ISIS_CLV_L2H_NLPID,
- "NLPID",
+ "Protocols Supported",
&ett_isis_hello_clv_nlpid,
dissect_hello_nlpid_clv
},
@@ -203,7 +203,7 @@ static const isis_clv_handle_t clv_ptp_hello_opts[] = {
},
{
ISIS_CLV_PTP_NLPID,
- "NLPID",
+ "Protocols Supported",
&ett_isis_hello_clv_nlpid,
dissect_hello_nlpid_clv
},
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,
};
diff --git a/packet-isis-lsp.h b/packet-isis-lsp.h
index dd4c16ef96..343ed86ade 100644
--- a/packet-isis-lsp.h
+++ b/packet-isis-lsp.h
@@ -1,7 +1,7 @@
/* packet-isis-lsp.h
* Defines and such for LSP and their CLV decodes
*
- * $Id: packet-isis-lsp.h,v 1.3 2001/04/08 19:32:03 guy Exp $
+ * $Id: packet-isis-lsp.h,v 1.4 2001/04/16 10:04:30 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
@@ -62,6 +62,7 @@
#define ISIS_CLV_L1_LSP_IP_INT_REACHABLE 128
#define ISIS_CLV_L1_LSP_NLPID 129
#define ISIS_CLV_L1_LSP_IP_INTERFACE_ADDR 132
+#define ISIS_CLV_L1_LSP_TE_ROUTER_ID 134
#define ISIS_CLV_L1_LSP_HOSTNAME 137
/*
* Note, the spec say 133, but everyone seems to use 10. Any clue on why
@@ -82,6 +83,7 @@
#define ISIS_CLV_L2_LSP_IP_EXT_REACHABLE 130
#define ISIS_CLV_L2_LSP_IDRP_INFO 131
#define ISIS_CLV_L2_LSP_IP_INTERFACE_ADDR 132
+#define ISIS_CLV_L2_LSP_TE_ROUTER_ID 134
#define ISIS_CLV_L2_LSP_HOSTNAME 137
/*
* Note, the spec say 133, but everyone seems to use 10. Any clue on why
diff --git a/packet-osi.c b/packet-osi.c
index a615772e21..b165677243 100644
--- a/packet-osi.c
+++ b/packet-osi.c
@@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly
* Main entrance point and common functions
*
- * $Id: packet-osi.c,v 1.43 2001/04/08 19:32:03 guy Exp $
+ * $Id: packet-osi.c,v 1.44 2001/04/16 10:04:30 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@@ -94,6 +94,7 @@ const value_string nlpid_vals[] = {
{ NLPID_ISO11577, "ISO 11577" },
{ NLPID_COMPRESSED, "Data compression protocol" },
{ NLPID_IP, "IP" },
+ { NLPID_IP6, "IPv6" },
{ NLPID_PPP, "PPP" },
{ 0, NULL },
};
diff --git a/packet-ppp.c b/packet-ppp.c
index b9b36982e6..6120f86e2a 100644
--- a/packet-ppp.c
+++ b/packet-ppp.c
@@ -1,7 +1,7 @@
/* packet-ppp.c
* Routines for ppp packet disassembly
*
- * $Id: packet-ppp.c,v 1.61 2001/03/31 10:35:54 guy Exp $
+ * $Id: packet-ppp.c,v 1.62 2001/04/16 10:04:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -93,6 +93,7 @@ static gint ppp_fcs_decode = 0; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */
static const value_string ppp_vals[] = {
{PPP_IP, "IP" },
+ {PPP_OSI, "OSI" },
{PPP_AT, "Appletalk" },
{PPP_IPX, "Netware IPX/SPX"},
{PPP_VJC_COMP, "VJ compressed TCP"},
@@ -106,6 +107,7 @@ static const value_string ppp_vals[] = {
{PPP_MPLS_UNI, "MPLS Unicast"},
{PPP_MPLS_MULTI, "MPLS Multicast"},
{PPP_IPCP, "IP Control Protocol" },
+ {PPP_OSICP, "OSI Control Protocol" },
{PPP_ATCP, "AppleTalk Control Protocol" },
{PPP_IPXCP, "IPX Control Protocol" },
{PPP_CCP, "Compression Control Protocol" },
diff --git a/ppptypes.h b/ppptypes.h
index 6fa5345f67..01a13866a1 100644
--- a/ppptypes.h
+++ b/ppptypes.h
@@ -1,7 +1,7 @@
/* ppptypes.h
* Defines PPP packet types.
*
- * $Id: ppptypes.h,v 1.7 2001/04/08 19:32:03 guy Exp $
+ * $Id: ppptypes.h,v 1.8 2001/04/16 10:04:30 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -32,7 +32,7 @@
*/
#define PPP_IP 0x21 /* Internet Protocol */
-#define PPP_OSI 0x23
+#define PPP_OSI 0x23 /* OSI Protocol */
#define PPP_AT 0x29 /* AppleTalk Protocol */
#define PPP_IPX 0x2b /* IPX protocol */
#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
@@ -46,6 +46,7 @@
#define PPP_MPLS_UNI 0x0281 /* MPLS Unicast */
#define PPP_MPLS_MULTI 0x0283 /* MPLS Multicast */
#define PPP_IPCP 0x8021 /* IP Control Protocol */
+#define PPP_OSICP 0x8023 /* OSI Control Protocol */
#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
#define PPP_IPXCP 0x802b /* IPX Control Protocol */
#define PPP_CCP 0x80fd /* Compression Control Protocol */