aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packet-gssapi.c8
-rw-r--r--packet-gssapi.h6
-rw-r--r--packet-kerberos.c5
-rw-r--r--packet-ntlmssp.c11
-rw-r--r--packet-spnego.c12
5 files changed, 24 insertions, 18 deletions
diff --git a/packet-gssapi.c b/packet-gssapi.c
index 2f8dae4fcd..f6f2ec4f9d 100644
--- a/packet-gssapi.c
+++ b/packet-gssapi.c
@@ -2,7 +2,7 @@
* Dissector for GSS-API tokens as described in rfc2078, section 3.1
* Copyright 2002, Tim Potter <tpot@samba.org>
*
- * $Id: packet-gssapi.c,v 1.13 2002/08/31 20:50:08 sharpe Exp $
+ * $Id: packet-gssapi.c,v 1.14 2002/08/31 22:22:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -73,14 +73,14 @@ gssapi_oid_hash(gconstpointer k)
}
void
-gssapi_init_oid(char *oid, int proto, int ett, char *name)
+gssapi_init_oid(char *oid, int proto, int ett, dissector_handle_t handle)
{
char *key = g_strdup(oid);
gssapi_oid_value *value = g_malloc(sizeof(*value));
value->proto = proto;
value->ett = ett;
- value->name = g_strdup(name);
+ value->handle = handle;
g_hash_table_insert(gssapi_oids, key, value);
}
@@ -259,7 +259,7 @@ dissect_gssapi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
oid_subtree = proto_item_add_subtree(sub_item, value->ett);
*/
- handle = find_dissector(value->name);
+ handle = value->handle;
if (handle) {
tvbuff_t *oid_tvb;
diff --git a/packet-gssapi.h b/packet-gssapi.h
index b37aa58b28..602aea9bb8 100644
--- a/packet-gssapi.h
+++ b/packet-gssapi.h
@@ -2,7 +2,7 @@
* Dissector for GSS-API tokens as described in rfc2078, section 3.1
* Copyright 2002, Tim Potter <tpot@samba.org>
*
- * $Id: packet-gssapi.h,v 1.4 2002/08/29 05:26:45 sharpe Exp $
+ * $Id: packet-gssapi.h,v 1.5 2002/08/31 22:22:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -31,7 +31,7 @@
typedef struct _gssapi_oid_value {
int proto;
int ett;
- gchar *name;
+ dissector_handle_t handle;
gchar *comment; /* For the comment */
} gssapi_oid_value;
@@ -42,6 +42,6 @@ extern GHashTable *gssapi_oids;
/* Function prototypes */
void
-gssapi_init_oid(char *oid, int proto, int ett, char *name);
+gssapi_init_oid(char *oid, int proto, int ett, dissector_handle_t handle);
#endif /* __PACKET_GSSAPI_H */
diff --git a/packet-kerberos.c b/packet-kerberos.c
index ab7092e07b..c2e72a7a6a 100644
--- a/packet-kerberos.c
+++ b/packet-kerberos.c
@@ -3,7 +3,7 @@
* Wes Hardaker (c) 2000
* wjhardaker@ucdavis.edu
*
- * $Id: packet-kerberos.c,v 1.27 2002/08/30 10:05:26 guy Exp $
+ * $Id: packet-kerberos.c,v 1.28 2002/08/31 22:22:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1380,7 +1380,8 @@ proto_reg_handoff_kerberos(void)
dissector_add("udp.port", UDP_PORT_KERBEROS, kerberos_handle);
dissector_add("tcp.port", TCP_PORT_KERBEROS, kerberos_handle);
- gssapi_init_oid("1.2.840.48018.1.2.2", proto_kerberos, ett_kerberos, "kerberos5");
+ gssapi_init_oid("1.2.840.48018.1.2.2", proto_kerberos, ett_kerberos,
+ kerberos_handle);
}
/*
diff --git a/packet-ntlmssp.c b/packet-ntlmssp.c
index bb7a1e6e2e..be7ab20cd4 100644
--- a/packet-ntlmssp.c
+++ b/packet-ntlmssp.c
@@ -2,7 +2,7 @@
* Routines for NTLM Secure Service Provider
* Devin Heitmueller <dheitmueller@netilla.com>
*
- * $Id: packet-ntlmssp.c,v 1.12 2002/08/31 20:25:43 guy Exp $
+ * $Id: packet-ntlmssp.c,v 1.13 2002/08/31 22:22:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -808,8 +808,11 @@ proto_register_ntlmssp(void)
void
proto_reg_handoff_ntlmssp(void)
{
- /* Register protocol with the GSS-API module */
+ dissector_handle_t ntlmssp_handle;
- gssapi_init_oid("1.3.6.1.4.1.311.2.2.10", proto_ntlmssp, ett_ntlmssp,
- "ntlmssp");
+ /* Register protocol with the GSS-API module */
+
+ ntlmssp_handle = find_dissector("ntlmssp");
+ gssapi_init_oid("1.3.6.1.4.1.311.2.2.10", proto_ntlmssp, ett_ntlmssp,
+ ntlmssp_handle);
}
diff --git a/packet-spnego.c b/packet-spnego.c
index dc1e096f5b..7d1af673eb 100644
--- a/packet-spnego.c
+++ b/packet-spnego.c
@@ -4,7 +4,7 @@
* Copyright 2002, Tim Potter <tpot@samba.org>
* Copyright 2002, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: packet-spnego.c,v 1.21 2002/08/31 20:50:08 sharpe Exp $
+ * $Id: packet-spnego.c,v 1.22 2002/08/31 22:22:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -522,7 +522,7 @@ dissect_spnego_supportedMech(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
next_level_dissector = NULL; /* FIXME: Is this right? */
- if (value) next_level_dissector = find_dissector(value->name);
+ if (value) next_level_dissector = value->handle;
/*
* Now, we need to save this in per proto info in the
@@ -872,14 +872,16 @@ proto_register_spnego(void)
proto_register_field_array(proto_spnego, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
-
- register_dissector("spnego", dissect_spnego, proto_spnego);
}
void
proto_reg_handoff_spnego(void)
{
+ dissector_handle_t spnego_handle;
+
/* Register protocol with GSS-API module */
- gssapi_init_oid("1.3.6.1.5.5.2", proto_spnego, ett_spnego, "spnego");
+ spnego_handle = create_dissector_handle(dissect_spnego, proto_spnego);
+ gssapi_init_oid("1.3.6.1.5.5.2", proto_spnego, ett_spnego,
+ spnego_handle);
}