diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-01-13 00:41:11 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-01-13 00:41:11 +0000 |
commit | 35a0a0ada4a936cad6a74ff26ca11389f6051ad2 (patch) | |
tree | cc1bb826c89caf2ba5598a80ed3d09b32a752f27 /packet-osi.c | |
parent | cd15d6c0f85ed5ef5948d3a796c1e0ca44668458 (diff) | |
download | wireshark-35a0a0ada4a936cad6a74ff26ca11389f6051ad2.tar.gz wireshark-35a0a0ada4a936cad6a74ff26ca11389f6051ad2.tar.bz2 wireshark-35a0a0ada4a936cad6a74ff26ca11389f6051ad2.zip |
Export the list of OSI NLPIDs in "nlpid.h", for use by the CDP
dissector.
Add a "value_string" table for NLPIDs to the OSI dissector, and export
it for use by the CDP dissector.
Fix the CDP dissector as per the documentation in
http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm
and as per some traces we have with CDP data in them.
svn path=/trunk/; revision=1455
Diffstat (limited to 'packet-osi.c')
-rw-r--r-- | packet-osi.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/packet-osi.c b/packet-osi.c index b79e781ab0..aca7d058a1 100644 --- a/packet-osi.c +++ b/packet-osi.c @@ -1,7 +1,7 @@ /* packet-osi.c * Routines for ISO/OSI network and transport protocol packet disassembly * - * $Id: packet-osi.c,v 1.13 1999/12/15 04:34:19 guy Exp $ + * $Id: packet-osi.c,v 1.14 2000/01/13 00:41:11 guy Exp $ * Laurent Deniel <deniel@worldnet.fr> * * Ethereal - Network traffic analyzer @@ -44,6 +44,7 @@ #include <string.h> #include <glib.h> #include "packet.h" +#include "nlpid.h" /* protocols and fields */ @@ -67,13 +68,6 @@ static int proto_cotp = -1; static gint ett_cotp = -1; -/* Network layer protocol identifiers */ - -#define ISO8473_CLNP 0x81 -#define ISO9542_ESIS 0x82 -#define ISO10589_ISIS 0x83 -#define ISO9542X25_ESIS 0x8a - /* * ISO8473 OSI CLNP definition (see RFC994) * @@ -1588,33 +1582,44 @@ void dissect_clnp(const u_char *pd, int offset, frame_data *fd, /* main entry point */ +const value_string nlpid_vals[] = { + { NLPID_NULL, "NULL" }, + { NLPID_SNAP, "SNAP" }, + { NLPID_ISO8473_CLNP, "CLNP" }, + { NLPID_ISO9542_ESIS, "ESIS" }, + { NLPID_ISO10589_ISIS, "ISIS" }, + { NLPID_ISO9542X25_ESIS, "ESIS (X.25)" }, + { NLPID_IP, "IP" }, + { 0, NULL }, +}; + void dissect_osi(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { switch (pd[offset]) { - /* only CLNP is currently decoded */ + /* ESIS is not currently decoded */ - case ISO8473_CLNP: + case NLPID_ISO8473_CLNP: if (check_col(fd, COL_PROTOCOL)) { col_add_str(fd, COL_PROTOCOL, "CLNP"); } dissect_clnp(pd, offset, fd, tree); break; - case ISO9542_ESIS: + case NLPID_ISO9542_ESIS: if (check_col(fd, COL_PROTOCOL)) { col_add_str(fd, COL_PROTOCOL, "ESIS"); } dissect_data(pd, offset, fd, tree); break; - case ISO9542X25_ESIS: + case NLPID_ISO9542X25_ESIS: if (check_col(fd, COL_PROTOCOL)) { - col_add_str(fd, COL_PROTOCOL, "ESIS(X25)"); + col_add_str(fd, COL_PROTOCOL, "ESIS (X.25)"); } dissect_data(pd, offset, fd, tree); break; - case ISO10589_ISIS: + case NLPID_ISO10589_ISIS: if (check_col(fd, COL_PROTOCOL)) { col_add_str(fd, COL_PROTOCOL, "ISIS"); } |