proto_esis = proto_register_protocol( PROTO_STRING_ESIS, "ESIS", "esis");
proto_register_field_array(proto_esis, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
+ register_dissector("esis", dissect_esis, proto_esis);
}
void
{
dissector_handle_t esis_handle;
- esis_handle = create_dissector_handle(dissect_esis, proto_esis);
- register_dissector("esis", dissect_esis, proto_esis);
+ esis_handle = find_dissector("esis");
dissector_add("osinl", NLPID_ISO9542_ESIS, esis_handle);
}
register_dissector("ftp-data", dissect_ftpdata, proto_ftp_data);
proto_register_field_array(proto_ftp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
-
- ftpdata_handle = create_dissector_handle(dissect_ftpdata, proto_ftp_data);
}
void
proto_reg_handoff_ftp(void)
{
- dissector_handle_t ftpdata_handle, ftp_handle;
+ dissector_handle_t ftp_handle;
- ftpdata_handle = create_dissector_handle(dissect_ftpdata, proto_ftp_data);
+ ftpdata_handle = find_dissector("ftp-data");
dissector_add("tcp.port", TCP_PORT_FTPDATA, ftpdata_handle);
- ftp_handle = create_dissector_handle(dissect_ftp, proto_ftp);
+ ftp_handle = find_dissector("ftp");
dissector_add("tcp.port", TCP_PORT_FTP, ftp_handle);
}
* Subdissectors
*/
-static dissector_handle_t ntlmssp_handle = NULL;
+static dissector_handle_t ntlmssp_handle;
static GHashTable *gssapi_oids;
DCE_C_RPC_AUTHN_PROTOCOL_SPNEGO,
&gssapi_auth_fns);
- gssapi_handle = create_dissector_handle(dissect_gssapi, proto_gssapi);
+ gssapi_handle = find_dissector("gssapi");
dissector_add_string("dns.tsig.mac", "gss.microsoft.com", gssapi_handle);
}
/* Subtrees */
static gint ett_l1_events = -1;
-/* Dissector handles */
-static dissector_handle_t l1_events_handle;
-
static void
dissect_l1_events(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
"Layer 1 Event Messages", /* Long name */
"Layer 1 Events", /* Short name */
"data-l1-events"); /* Filter name */
- register_dissector("data-l1-events", dissect_l1_events,
- proto_l1_events);
+ register_dissector("data-l1-events", dissect_l1_events, proto_l1_events);
}
void
proto_reg_handoff_l1_events(void)
{
- l1_events_handle = create_dissector_handle(
- dissect_l1_events, proto_l1_events);
+ dissector_handle_t l1_events_handle;
+ l1_events_handle = find_dissector("data-l1-events");
dissector_add("wtap_encap", WTAP_ENCAP_LAYER1_EVENT, l1_events_handle); /* for text msgs from trace files */
}
static int smb_tap = -1;
-static dissector_handle_t gssapi_handle = NULL;
-static dissector_handle_t ntlmssp_handle = NULL;
+static dissector_handle_t gssapi_handle;
+static dissector_handle_t ntlmssp_handle;
static const fragment_items smb_frag_items = {
&ett_smb_segment,
heur_dissector_add("netbios", dissect_smb_heur, proto_smb);
heur_dissector_add("cotp", dissect_smb_heur, proto_smb);
heur_dissector_add("vines_spp", dissect_smb_heur, proto_smb);
- smb_handle = create_dissector_handle(dissect_smb, proto_smb);
+
+ smb_handle = find_dissector("smb");
dissector_add("ipx.socket", IPX_SOCKET_NWLINK_SMB_SERVER, smb_handle);
dissector_add("ipx.socket", IPX_SOCKET_NWLINK_SMB_REDIR, smb_handle);
- dissector_add("ipx.socket", IPX_SOCKET_NWLINK_SMB_MESSENGER,
- smb_handle);
+ dissector_add("ipx.socket", IPX_SOCKET_NWLINK_SMB_MESSENGER, smb_handle);
dissector_add("spp.socket", IDP_SOCKET_SMB, smb_handle);
}
/* Subtrees */
static gint ett_text_lines = -1;
-/* Dissector handles */
-static dissector_handle_t text_lines_handle;
-
static void
dissect_text_lines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
void
proto_reg_handoff_text_lines(void)
{
- text_lines_handle = create_dissector_handle(
- dissect_text_lines, proto_text_lines);
+ dissector_handle_t text_lines_handle;
+
+ text_lines_handle = find_dissector("data-text-lines");
dissector_add_string("media_type", "text/plain", text_lines_handle); /* RFC 2046 */
dissector_add_string("media_type", "text/richtext", text_lines_handle); /* RFC 1341 */