Remove the LDAP wrapping for registering dissectors and just use dissector_add_string directly.
Change-Id: I307ee31562a5a84bc62691f367e3b8df3cb3f244 Reviewed-on: https://code.wireshark.org/review/12097 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
8a999d7bb8
commit
8df0bac6cf
|
@ -1913,31 +1913,6 @@ ldap_cleanup(void)
|
|||
ldap_info_items = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
register_ldap_name_dissector_handle(const char *attr_type_p, dissector_handle_t dissector)
|
||||
{
|
||||
dissector_add_string("ldap.name", attr_type_p, dissector);
|
||||
}
|
||||
|
||||
void
|
||||
register_ldap_name_dissector(const char *attr_type_p, dissector_t dissector, int proto)
|
||||
{
|
||||
dissector_handle_t dissector_handle;
|
||||
|
||||
dissector_handle=create_dissector_handle(dissector, proto);
|
||||
register_ldap_name_dissector_handle(attr_type_p, dissector_handle);
|
||||
}
|
||||
|
||||
void
|
||||
new_register_ldap_name_dissector(const char *attr_type_p, new_dissector_t dissector, int proto)
|
||||
{
|
||||
dissector_handle_t dissector_handle;
|
||||
|
||||
dissector_handle=new_create_dissector_handle(dissector, proto);
|
||||
register_ldap_name_dissector_handle(attr_type_p, dissector_handle);
|
||||
}
|
||||
|
||||
|
||||
/*--- proto_register_ldap -------------------------------------------*/
|
||||
void proto_register_ldap(void) {
|
||||
|
||||
|
@ -2369,12 +2344,12 @@ proto_reg_handoff_ldap(void)
|
|||
oid_add_from_string("LDAP_SERVER_SHUTDOWN_NOTIFY_OID","1.2.840.113556.1.4.1907");
|
||||
oid_add_from_string("LDAP_SERVER_RANGE_RETRIEVAL_NOERR_OID","1.2.840.113556.1.4.1948");
|
||||
|
||||
register_ldap_name_dissector("netlogon", dissect_NetLogon_PDU, proto_cldap);
|
||||
register_ldap_name_dissector("objectGUID", dissect_ldap_guid, proto_ldap);
|
||||
register_ldap_name_dissector("supportedControl", dissect_ldap_oid, proto_ldap);
|
||||
register_ldap_name_dissector("supportedCapabilities", dissect_ldap_oid, proto_ldap);
|
||||
register_ldap_name_dissector("objectSid", dissect_ldap_sid, proto_ldap);
|
||||
register_ldap_name_dissector("nTSecurityDescriptor", dissect_ldap_nt_sec_desc, proto_ldap);
|
||||
dissector_add_string("ldap.name", "netlogon", create_dissector_handle(dissect_NetLogon_PDU, proto_cldap));
|
||||
dissector_add_string("ldap.name", "objectGUID", create_dissector_handle(dissect_ldap_guid, proto_ldap));
|
||||
dissector_add_string("ldap.name", "supportedControl", create_dissector_handle(dissect_ldap_oid, proto_ldap));
|
||||
dissector_add_string("ldap.name", "supportedCapabilities", create_dissector_handle(dissect_ldap_oid, proto_ldap));
|
||||
dissector_add_string("ldap.name", "objectSid", create_dissector_handle(dissect_ldap_sid, proto_ldap));
|
||||
dissector_add_string("ldap.name", "nTSecurityDescriptor", create_dissector_handle(dissect_ldap_nt_sec_desc, proto_ldap));
|
||||
|
||||
#include "packet-ldap-dis-tab.c"
|
||||
|
||||
|
|
|
@ -99,10 +99,6 @@ typedef struct ldap_call_response {
|
|||
guint protocolOpTag;
|
||||
} ldap_call_response_t;
|
||||
|
||||
void register_ldap_name_dissector_handle(const char *attr_type, dissector_handle_t dissector);
|
||||
void register_ldap_name_dissector(const char *attr_type, dissector_t dissector, int proto);
|
||||
void new_register_ldap_name_dissector(const char *attr_type, new_dissector_t dissector, int proto);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
int dissect_mscldap_string(tvbuff_t *tvb, int offset, char *str, int max_len, gboolean prepend_dot _U_);
|
||||
|
||||
|
|
|
@ -177,15 +177,15 @@ void proto_reg_handoff_x509af(void) {
|
|||
|
||||
/* these will generally be encoded as ";binary" in LDAP */
|
||||
|
||||
new_register_ldap_name_dissector("cACertificate", dissect_x509af_Certificate_PDU, proto_x509af);
|
||||
new_register_ldap_name_dissector("userCertificate", dissect_x509af_Certificate_PDU, proto_x509af);
|
||||
dissector_add_string("ldap.name", "cACertificate", new_create_dissector_handle(dissect_x509af_Certificate_PDU, proto_x509af));
|
||||
dissector_add_string("ldap.name", "userCertificate", new_create_dissector_handle(dissect_x509af_Certificate_PDU, proto_x509af));
|
||||
|
||||
new_register_ldap_name_dissector("certificateRevocationList", dissect_CertificateList_PDU, proto_x509af);
|
||||
new_register_ldap_name_dissector("crl", dissect_CertificateList_PDU, proto_x509af);
|
||||
dissector_add_string("ldap.name", "certificateRevocationList", new_create_dissector_handle(dissect_CertificateList_PDU, proto_x509af));
|
||||
dissector_add_string("ldap.name", "crl", new_create_dissector_handle(dissect_CertificateList_PDU, proto_x509af));
|
||||
|
||||
new_register_ldap_name_dissector("authorityRevocationList", dissect_CertificateList_PDU, proto_x509af);
|
||||
new_register_ldap_name_dissector("arl", dissect_CertificateList_PDU, proto_x509af);
|
||||
dissector_add_string("ldap.name", "authorityRevocationList", new_create_dissector_handle(dissect_CertificateList_PDU, proto_x509af));
|
||||
dissector_add_string("ldap.name", "arl", new_create_dissector_handle(dissect_CertificateList_PDU, proto_x509af));
|
||||
|
||||
new_register_ldap_name_dissector("crossCertificatePair", dissect_CertificatePair_PDU, proto_x509af);
|
||||
dissector_add_string("ldap.name", "crossCertificatePair", new_create_dissector_handle(dissect_CertificatePair_PDU, proto_x509af));
|
||||
}
|
||||
|
||||
|
|
|
@ -4832,31 +4832,6 @@ ldap_cleanup(void)
|
|||
ldap_info_items = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
register_ldap_name_dissector_handle(const char *attr_type_p, dissector_handle_t dissector)
|
||||
{
|
||||
dissector_add_string("ldap.name", attr_type_p, dissector);
|
||||
}
|
||||
|
||||
void
|
||||
register_ldap_name_dissector(const char *attr_type_p, dissector_t dissector, int proto)
|
||||
{
|
||||
dissector_handle_t dissector_handle;
|
||||
|
||||
dissector_handle=create_dissector_handle(dissector, proto);
|
||||
register_ldap_name_dissector_handle(attr_type_p, dissector_handle);
|
||||
}
|
||||
|
||||
void
|
||||
new_register_ldap_name_dissector(const char *attr_type_p, new_dissector_t dissector, int proto)
|
||||
{
|
||||
dissector_handle_t dissector_handle;
|
||||
|
||||
dissector_handle=new_create_dissector_handle(dissector, proto);
|
||||
register_ldap_name_dissector_handle(attr_type_p, dissector_handle);
|
||||
}
|
||||
|
||||
|
||||
/*--- proto_register_ldap -------------------------------------------*/
|
||||
void proto_register_ldap(void) {
|
||||
|
||||
|
@ -5700,7 +5675,7 @@ void proto_register_ldap(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-ldap-hfarr.c ---*/
|
||||
#line 2216 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2191 "../../asn1/ldap/packet-ldap-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -5774,7 +5749,7 @@ void proto_register_ldap(void) {
|
|||
&ett_ldap_T_warning,
|
||||
|
||||
/*--- End of included file: packet-ldap-ettarr.c ---*/
|
||||
#line 2230 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2205 "../../asn1/ldap/packet-ldap-template.c"
|
||||
};
|
||||
/* UAT for header fields */
|
||||
static uat_field_t custom_attribute_types_uat_fields[] = {
|
||||
|
@ -5917,12 +5892,12 @@ proto_reg_handoff_ldap(void)
|
|||
oid_add_from_string("LDAP_SERVER_SHUTDOWN_NOTIFY_OID","1.2.840.113556.1.4.1907");
|
||||
oid_add_from_string("LDAP_SERVER_RANGE_RETRIEVAL_NOERR_OID","1.2.840.113556.1.4.1948");
|
||||
|
||||
register_ldap_name_dissector("netlogon", dissect_NetLogon_PDU, proto_cldap);
|
||||
register_ldap_name_dissector("objectGUID", dissect_ldap_guid, proto_ldap);
|
||||
register_ldap_name_dissector("supportedControl", dissect_ldap_oid, proto_ldap);
|
||||
register_ldap_name_dissector("supportedCapabilities", dissect_ldap_oid, proto_ldap);
|
||||
register_ldap_name_dissector("objectSid", dissect_ldap_sid, proto_ldap);
|
||||
register_ldap_name_dissector("nTSecurityDescriptor", dissect_ldap_nt_sec_desc, proto_ldap);
|
||||
dissector_add_string("ldap.name", "netlogon", create_dissector_handle(dissect_NetLogon_PDU, proto_cldap));
|
||||
dissector_add_string("ldap.name", "objectGUID", create_dissector_handle(dissect_ldap_guid, proto_ldap));
|
||||
dissector_add_string("ldap.name", "supportedControl", create_dissector_handle(dissect_ldap_oid, proto_ldap));
|
||||
dissector_add_string("ldap.name", "supportedCapabilities", create_dissector_handle(dissect_ldap_oid, proto_ldap));
|
||||
dissector_add_string("ldap.name", "objectSid", create_dissector_handle(dissect_ldap_sid, proto_ldap));
|
||||
dissector_add_string("ldap.name", "nTSecurityDescriptor", create_dissector_handle(dissect_ldap_nt_sec_desc, proto_ldap));
|
||||
|
||||
|
||||
/*--- Included file: packet-ldap-dis-tab.c ---*/
|
||||
|
@ -5941,7 +5916,7 @@ proto_reg_handoff_ldap(void)
|
|||
|
||||
|
||||
/*--- End of included file: packet-ldap-dis-tab.c ---*/
|
||||
#line 2380 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2355 "../../asn1/ldap/packet-ldap-template.c"
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -107,10 +107,6 @@ typedef struct ldap_call_response {
|
|||
guint protocolOpTag;
|
||||
} ldap_call_response_t;
|
||||
|
||||
void register_ldap_name_dissector_handle(const char *attr_type, dissector_handle_t dissector);
|
||||
void register_ldap_name_dissector(const char *attr_type, dissector_t dissector, int proto);
|
||||
void new_register_ldap_name_dissector(const char *attr_type, new_dissector_t dissector, int proto);
|
||||
|
||||
WS_DLL_PUBLIC
|
||||
int dissect_mscldap_string(tvbuff_t *tvb, int offset, char *str, int max_len, gboolean prepend_dot _U_);
|
||||
|
||||
|
|
|
@ -1406,15 +1406,15 @@ void proto_reg_handoff_x509af(void) {
|
|||
|
||||
/* these will generally be encoded as ";binary" in LDAP */
|
||||
|
||||
new_register_ldap_name_dissector("cACertificate", dissect_x509af_Certificate_PDU, proto_x509af);
|
||||
new_register_ldap_name_dissector("userCertificate", dissect_x509af_Certificate_PDU, proto_x509af);
|
||||
dissector_add_string("ldap.name", "cACertificate", new_create_dissector_handle(dissect_x509af_Certificate_PDU, proto_x509af));
|
||||
dissector_add_string("ldap.name", "userCertificate", new_create_dissector_handle(dissect_x509af_Certificate_PDU, proto_x509af));
|
||||
|
||||
new_register_ldap_name_dissector("certificateRevocationList", dissect_CertificateList_PDU, proto_x509af);
|
||||
new_register_ldap_name_dissector("crl", dissect_CertificateList_PDU, proto_x509af);
|
||||
dissector_add_string("ldap.name", "certificateRevocationList", new_create_dissector_handle(dissect_CertificateList_PDU, proto_x509af));
|
||||
dissector_add_string("ldap.name", "crl", new_create_dissector_handle(dissect_CertificateList_PDU, proto_x509af));
|
||||
|
||||
new_register_ldap_name_dissector("authorityRevocationList", dissect_CertificateList_PDU, proto_x509af);
|
||||
new_register_ldap_name_dissector("arl", dissect_CertificateList_PDU, proto_x509af);
|
||||
dissector_add_string("ldap.name", "authorityRevocationList", new_create_dissector_handle(dissect_CertificateList_PDU, proto_x509af));
|
||||
dissector_add_string("ldap.name", "arl", new_create_dissector_handle(dissect_CertificateList_PDU, proto_x509af));
|
||||
|
||||
new_register_ldap_name_dissector("crossCertificatePair", dissect_CertificatePair_PDU, proto_x509af);
|
||||
dissector_add_string("ldap.name", "crossCertificatePair", new_create_dissector_handle(dissect_CertificatePair_PDU, proto_x509af));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue