/* packet-clnp.c
* Routines for ISO/OSI network and transport protocol packet disassembly
*
- * $Id: packet-clnp.c,v 1.2 2000/04/16 09:10:53 deniel Exp $
+ * $Id: packet-clnp.c,v 1.3 2000/04/17 01:36:29 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* CLNP part / main entry point
*/
-void dissect_clnp(const u_char *pd, int offset, frame_data *fd,
+static void dissect_clnp(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
/* proto_register_field_array(proto_cotp, hf, array_length(hf));*/
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_clnp(void)
+{
+ dissector_add("osinl", NLPID_ISO8473_CLNP, dissect_clnp);
+ dissector_add("osinl", NLPID_NULL, dissect_clnp); /* Inactive subset */
+}
/* packet-clnp.h
* Defines and such for CLNP (and COTP) protocol decode.
*
- * $Id: packet-clnp.h,v 1.1 2000/04/15 22:11:08 guy Exp $
+ * $Id: packet-clnp.h,v 1.2 2000/04/17 01:36:30 guy Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
* published API functions
*/
-extern
-void dissect_clnp( const u_char *, int, frame_data *, proto_tree * );
extern
void dissect_cotp(const u_char *, int, frame_data *, proto_tree *);
* Routines for ISO/OSI End System to Intermediate System
* Routeing Exchange Protocol ISO 9542.
*
- * $Id: packet-esis.c,v 1.1 2000/04/15 22:11:08 guy Exp $
+ * $Id: packet-esis.c,v 1.2 2000/04/17 01:36:30 guy Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
* Output:
* void, but we will add to the proto_tree if it is not NULL.
*/
-void
+static void
dissect_esis(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
char *pdu_type_string = NULL;
char *pdu_type_format_string = "PDU Type : %s (R:%s%s%s)";
proto_register_field_array(proto_esis, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
};
+
+void
+proto_reg_handoff_esis(void)
+{
+ dissector_add("osinl", NLPID_ISO9542_ESIS, dissect_esis);
+}
/* packet-esis.h
* Defines and such for ESIS protocol decode.
*
- * $Id: packet-esis.h,v 1.1 2000/04/15 22:11:09 guy Exp $
+ * $Id: packet-esis.h,v 1.2 2000/04/17 01:36:30 guy Exp $
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
* Ethereal - Network traffic analyzer
/*
* published API functions
*/
-extern void dissect_esis(const u_char *pd, int offset, frame_data *fd,
- proto_tree *tree);
-extern void proto_register_esis(void);
extern void esis_dissect_unknown(int offset,guint length, proto_tree *tree,
frame_data *fd, char *fmat, ...);
* Routines for ISO/OSI network and transport protocol packet disassembly, core
* bits.
*
- * $Id: packet-isis.c,v 1.7 2000/04/15 22:11:11 guy Exp $
+ * $Id: packet-isis.c,v 1.8 2000/04/17 01:36:31 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
* Output:
* void, but we will add to the proto_tree if it is not NULL.
*/
-void
+static void
dissect_isis(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree) {
isis_hdr_t *ihdr;
proto_register_field_array(proto_isis, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}
+
+void
+proto_reg_handoff_isis(void)
+{
+ dissector_add("osinl", NLPID_ISO10589_ISIS, dissect_isis);
+}
/* packet-isis.h
* Defines and such for core isis protcol decode.
*
- * $Id: packet-isis.h,v 1.3 2000/04/15 22:11:11 guy Exp $
+ * $Id: packet-isis.h,v 1.4 2000/04/17 01:36:31 guy Exp $
* Stuart Stanley <stuarts@mxmail.net>
*
* Ethereal - Network traffic analyzer
*/
extern char *isis_address_to_string ( const u_char *pd, int offset, int len );
-extern void dissect_isis( const u_char *pd, int offset, frame_data *fd,
- proto_tree *tree);
-extern void proto_register_isis(void);
extern void isis_dissect_unknown( int offset, guint length, proto_tree *tree,
frame_data *fd, char *fmat, ...);
* Routines for ISO/OSI network and transport protocol packet disassembly
* Main entrance point and common functions
*
- * $Id: packet-osi.c,v 1.32 2000/04/17 00:32:41 guy Exp $
+ * $Id: packet-osi.c,v 1.33 2000/04/17 01:36:31 guy Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
{ 0, NULL },
};
+static dissector_table_t subdissector_table;
+
void dissect_osi(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree)
{
+ /* do lookup with the subdissector table */
+ if (dissector_try_port(subdissector_table, pd[offset], pd, offset, fd, tree))
+ return;
+
switch (pd[offset]) {
/* ESIS (X.25) is not currently decoded */
- case NLPID_ISO8473_CLNP:
- case NLPID_NULL: /* "Inactive Subset" of ISO 8473 CLNP */
- dissect_clnp(pd, offset, fd, tree);
- break;
- case NLPID_ISO9542_ESIS:
- dissect_esis(pd, offset, fd, tree);
- break;
case NLPID_ISO9542X25_ESIS:
if (check_col(fd, COL_PROTOCOL)) {
col_add_str(fd, COL_PROTOCOL, "ESIS (X.25)");
}
dissect_data(pd, offset, fd, tree);
break;
- case NLPID_ISO10589_ISIS:
- dissect_isis(pd, offset, fd, tree);
- break;
case NLPID_ISO10747_IDRP:
if (check_col(fd, COL_PROTOCOL)) {
col_add_str(fd, COL_PROTOCOL, "IDRP");
}
} /* dissect_osi */
+void
+proto_register_osi(void)
+{
+ /* There's no "OSI" protocol *per se*, but we do register a
+ dissector table so various protocols running at the
+ network layer can register themselves. */
+ subdissector_table = register_dissector_table("osinl");
+}
+
void
proto_reg_handoff_osi(void)
{