* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: GPL-2.0-or-later
*/
/*
#include "packet-ldap.h"
#include "packet-ntlmssp.h"
-#include "packet-ssl.h"
-#include "packet-ssl-utils.h"
+#include "packet-tls.h"
+#include "packet-tls-utils.h"
#include "packet-smb-common.h"
#include "packet-gssapi.h"
static int hf_ldap_error = -1; /* T_error */
/*--- End of included file: packet-ldap-hf.c ---*/
-#line 195 "./asn1/ldap/packet-ldap-template.c"
+#line 183 "./asn1/ldap/packet-ldap-template.c"
/* Initialize the subtree pointers */
static gint ett_ldap = -1;
static gint ett_ldap_T_warning = -1;
/*--- End of included file: packet-ldap-ett.c ---*/
-#line 207 "./asn1/ldap/packet-ldap-template.c"
+#line 195 "./asn1/ldap/packet-ldap-template.c"
static expert_field ei_ldap_exceeded_filter_length = EI_INIT;
static expert_field ei_ldap_too_many_filter_elements = EI_INIT;
static dissector_handle_t gssapi_wrap_handle;
static dissector_handle_t ntlmssp_handle;
static dissector_handle_t spnego_handle;
-static dissector_handle_t ssl_handle;
+static dissector_handle_t tls_handle;
static dissector_handle_t ldap_handle ;
static void prefs_register_ldap(void); /* forward declaration for use in preferences registration */
#define LDAP_NUM_PROCEDURES 24
static void
-ldapstat_init(struct register_srt* srt _U_, GArray* srt_array, srt_gui_init_cb gui_callback, void* gui_data)
+ldapstat_init(struct register_srt* srt _U_, GArray* srt_array)
{
srt_stat_table *ldap_srt_table;
guint32 i;
- ldap_srt_table = init_srt_table("LDAP Commands", NULL, srt_array, LDAP_NUM_PROCEDURES, NULL, "ldap.protocolOp", gui_callback, gui_data, NULL);
+ ldap_srt_table = init_srt_table("LDAP Commands", NULL, srt_array, LDAP_NUM_PROCEDURES, NULL, "ldap.protocolOp", NULL);
for (i = 0; i < LDAP_NUM_PROCEDURES; i++)
{
init_srt_table_row(ldap_srt_table, i, val_to_str_const(i, ldap_procedure_names, "<unknown>"));
gchar* attribute_desc;
} attribute_type_t;
-static attribute_type_t* attribute_types = NULL;
-static guint num_attribute_types = 0;
+static attribute_type_t* attribute_types;
+static guint num_attribute_types;
-static GHashTable* attribute_types_hash = NULL;
+static GHashTable* attribute_types_hash;
+static hf_register_info* dynamic_hf;
+static guint dynamic_hf_size;
static gboolean
attribute_types_update_cb(void *r, char **err)
*
*/
static void
-attribute_types_initialize_cb(void)
+deregister_attribute_types(void)
{
- static hf_register_info* hf;
- gint* hf_id;
- guint i;
- gchar* attribute_type;
-
- if (attribute_types_hash && hf) {
- guint hf_size = g_hash_table_size (attribute_types_hash);
+ if (dynamic_hf) {
/* Deregister all fields */
- for (i = 0; i < hf_size; i++) {
- proto_deregister_field (proto_ldap, *(hf[i].p_id));
- g_free (hf[i].p_id);
+ for (guint i = 0; i < dynamic_hf_size; i++) {
+ proto_deregister_field (proto_ldap, *(dynamic_hf[i].p_id));
+ g_free (dynamic_hf[i].p_id);
}
+
+ proto_add_deregistered_data (dynamic_hf);
+ dynamic_hf = NULL;
+ dynamic_hf_size = 0;
+ }
+
+ if (attribute_types_hash) {
g_hash_table_destroy (attribute_types_hash);
- proto_add_deregistered_data (hf);
attribute_types_hash = NULL;
}
+}
+
+static void
+attribute_types_post_update_cb(void)
+{
+ gint* hf_id;
+ gchar* attribute_type;
+
+ deregister_attribute_types();
if (num_attribute_types) {
attribute_types_hash = g_hash_table_new(g_str_hash, g_str_equal);
- hf = g_new0(hf_register_info,num_attribute_types);
+ dynamic_hf = g_new0(hf_register_info,num_attribute_types);
+ dynamic_hf_size = num_attribute_types;
- for (i = 0; i < num_attribute_types; i++) {
+ for (guint i = 0; i < dynamic_hf_size; i++) {
hf_id = g_new(gint,1);
*hf_id = -1;
attribute_type = g_strdup(attribute_types[i].attribute_type);
- hf[i].p_id = hf_id;
- hf[i].hfinfo.name = attribute_type;
- hf[i].hfinfo.abbrev = g_strdup_printf("ldap.AttributeValue.%s", attribute_type);
- hf[i].hfinfo.type = FT_STRING;
- hf[i].hfinfo.display = BASE_NONE;
- hf[i].hfinfo.strings = NULL;
- hf[i].hfinfo.bitmask = 0;
- hf[i].hfinfo.blurb = g_strdup(attribute_types[i].attribute_desc);
- HFILL_INIT(hf[i]);
+ dynamic_hf[i].p_id = hf_id;
+ dynamic_hf[i].hfinfo.name = attribute_type;
+ dynamic_hf[i].hfinfo.abbrev = g_strdup_printf("ldap.AttributeValue.%s", attribute_type);
+ dynamic_hf[i].hfinfo.type = FT_STRING;
+ dynamic_hf[i].hfinfo.display = BASE_NONE;
+ dynamic_hf[i].hfinfo.strings = NULL;
+ dynamic_hf[i].hfinfo.bitmask = 0;
+ dynamic_hf[i].hfinfo.blurb = g_strdup(attribute_types[i].attribute_desc);
+ HFILL_INIT(dynamic_hf[i]);
g_hash_table_insert(attribute_types_hash, attribute_type, hf_id);
}
- proto_register_field_array(proto_ldap, hf, num_attribute_types);
+ proto_register_field_array(proto_ldap, dynamic_hf, dynamic_hf_size);
}
}
+static void
+attribute_types_reset_cb(void)
+{
+ deregister_attribute_types();
+}
+
/* MS-ADTS specification, section 7.3.1.1, NETLOGON_NT_VERSION Options Bits */
static int dissect_mscldap_ntver_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
{
gint8 ber_class;
gboolean pc, ind, is_ascii;
gint32 tag;
- guint32 len, i;
- const guchar *str;
+ guint32 len;
if(!implicit_tag){
offset=get_ber_identifier(tvb, offset, &ber_class, &pc, &tag);
* -- I don't think there are full schemas available that describe the
* interesting cases i.e. AD -- ronnie
*/
- str=tvb_get_ptr(tvb, offset, len);
- is_ascii=TRUE;
- for(i=0;i<len;i++){
- if(!g_ascii_isprint(str[i])){
- is_ascii=FALSE;
- break;
- }
- }
+ is_ascii=tvb_ascii_isprint(tvb, offset, len);
/* convert the string into a printable string */
if(is_ascii){
- ldapvalue_string=wmem_strndup(wmem_packet_scope(), str, len);
+ ldapvalue_string= tvb_get_string_enc(wmem_packet_scope(), tvb, offset, len, ENC_ASCII);
} else {
- ldapvalue_string=(char*)wmem_alloc(wmem_packet_scope(), 3*len);
- for(i=0;i<len;i++){
- g_snprintf(ldapvalue_string+i*3,3,"%02x",str[i]&0xff);
- ldapvalue_string[3*i+2]=':';
- }
- ldapvalue_string[3*len-1]=0;
+ ldapvalue_string= tvb_bytes_to_str_punct(wmem_packet_scope(), tvb, offset, len, ':');
}
proto_tree_add_string(tree, hf_index, tvb, offset, len, ldapvalue_string);
if(!ldapstring || !*ldapstring)
ldapstring = "<ROOT>";
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%s\" ", ldapstring);
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%s\" ", format_text(wmem_packet_scope(), ldapstring, strlen(ldapstring)));
if(ldm_tree)
proto_item_append_text(ldm_tree, " \"%s\"", ldapstring);
}
} else if ((hf_index == hf_ldap_errorMessage) && ldapstring && *ldapstring) { /* only show message if not success */
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%s) ", ldapstring);
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%s) ", format_text(wmem_packet_scope(), ldapstring, strlen(ldapstring)));
if(ldm_tree)
proto_item_append_text(ldm_tree, " (%s)", ldapstring);
if(!ldapstring || !*ldapstring)
ldapstring = "<ROOT>";
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%s\" ", ldapstring);
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%s\" ", format_text(wmem_packet_scope(), ldapstring, strlen(ldapstring)));
if(ldm_tree)
proto_item_append_text(ldm_tree, " \"%s\"", ldapstring);
static int
dissect_ldap_T_ntlmsspNegotiate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 689 "./asn1/ldap/ldap.cnf"
+#line 682 "./asn1/ldap/ldap.cnf"
/* make sure the protocol op comes first */
ldap_do_protocolop(actx->pinfo);
static int
dissect_ldap_T_ntlmsspAuth(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 696 "./asn1/ldap/ldap.cnf"
+#line 689 "./asn1/ldap/ldap.cnf"
/* make sure the protocol op comes first */
ldap_do_protocolop(actx->pinfo);
static int
dissect_ldap_AuthenticationChoice(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 486 "./asn1/ldap/ldap.cnf"
+#line 479 "./asn1/ldap/ldap.cnf"
gint branch = -1;
gint auth = -1;
const gchar *valstr;
static int
dissect_ldap_T_bindResponse_matchedDN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 703 "./asn1/ldap/ldap.cnf"
+#line 696 "./asn1/ldap/ldap.cnf"
tvbuff_t *new_tvb=NULL;
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb);
static int
dissect_ldap_UnbindRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 508 "./asn1/ldap/ldap.cnf"
+#line 501 "./asn1/ldap/ldap.cnf"
implicit_tag = TRUE; /* correct problem with asn2wrs */
dissect_ldap_T_and_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 554 "./asn1/ldap/ldap.cnf"
+#line 547 "./asn1/ldap/ldap.cnf"
if(and_filter_string){
and_filter_string=wmem_strdup_printf(wmem_packet_scope(), "(&%s%s)",and_filter_string,Filter_string);
} else {
static int
dissect_ldap_T_and(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 561 "./asn1/ldap/ldap.cnf"
+#line 554 "./asn1/ldap/ldap.cnf"
proto_tree *tr=NULL;
proto_item *it=NULL;
const char *old_and_filter_string=and_filter_string;
dissect_ldap_T_or_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 579 "./asn1/ldap/ldap.cnf"
+#line 572 "./asn1/ldap/ldap.cnf"
if(or_filter_string){
or_filter_string=wmem_strdup_printf(wmem_packet_scope(), "(|%s%s)",or_filter_string,Filter_string);
} else {
static int
dissect_ldap_T_or(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 587 "./asn1/ldap/ldap.cnf"
+#line 580 "./asn1/ldap/ldap.cnf"
proto_tree *tr;
proto_item *it;
const char *old_or_filter_string=or_filter_string;
dissect_ldap_T_not(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 606 "./asn1/ldap/ldap.cnf"
+#line 599 "./asn1/ldap/ldap.cnf"
Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(!%s)",string_or_null(Filter_string));
dissect_ldap_T_equalityMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 531 "./asn1/ldap/ldap.cnf"
+#line 524 "./asn1/ldap/ldap.cnf"
Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=%s)",
string_or_null(attributedesc_string),
string_or_null(ldapvalue_string));
T_substringFilter_substrings_item_choice, hf_index, ett_ldap_T_substringFilter_substrings_item,
NULL);
-#line 632 "./asn1/ldap/ldap.cnf"
+#line 625 "./asn1/ldap/ldap.cnf"
if (substring_item_final) {
substring_value=wmem_strdup_printf(wmem_packet_scope(), "%s%s",
(substring_value?substring_value:"*"),
static int
dissect_ldap_SubstringFilter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 646 "./asn1/ldap/ldap.cnf"
+#line 639 "./asn1/ldap/ldap.cnf"
proto_tree *tr;
proto_item *it;
const char *old_substring_value=substring_value;
dissect_ldap_T_greaterOrEqual(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 537 "./asn1/ldap/ldap.cnf"
+#line 530 "./asn1/ldap/ldap.cnf"
Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s>=%s)",
string_or_null(attributedesc_string),
string_or_null(ldapvalue_string));
dissect_ldap_T_lessOrEqual(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 543 "./asn1/ldap/ldap.cnf"
+#line 536 "./asn1/ldap/ldap.cnf"
Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s<=%s)",
string_or_null(attributedesc_string),
string_or_null(ldapvalue_string));
dissect_ldap_T_present(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeDescription(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 603 "./asn1/ldap/ldap.cnf"
+#line 596 "./asn1/ldap/ldap.cnf"
Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s=*)",string_or_null(Filter_string));
dissect_ldap_T_approxMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 549 "./asn1/ldap/ldap.cnf"
+#line 542 "./asn1/ldap/ldap.cnf"
Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s~=%s)",
string_or_null(attributedesc_string),
string_or_null(ldapvalue_string));
static int
dissect_ldap_T_dnAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 609 "./asn1/ldap/ldap.cnf"
+#line 602 "./asn1/ldap/ldap.cnf"
gboolean val;
offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &val);
static int
dissect_ldap_T_extensibleMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 618 "./asn1/ldap/ldap.cnf"
+#line 611 "./asn1/ldap/ldap.cnf"
attr_type=NULL;
matching_rule_string=NULL;
ldapvalue_string=NULL;
offset = dissect_ldap_MatchingRuleAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 624 "./asn1/ldap/ldap.cnf"
+#line 617 "./asn1/ldap/ldap.cnf"
Filter_string=wmem_strdup_printf(wmem_packet_scope(), "(%s:%s%s%s=%s)",
(attr_type?attr_type:""),
(matching_rule_dnattr?"dn:":""),
static int
dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 667 "./asn1/ldap/ldap.cnf"
+#line 660 "./asn1/ldap/ldap.cnf"
proto_tree *tr;
proto_item *it;
attributedesc_string=NULL;
static int
dissect_ldap_T_filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 520 "./asn1/ldap/ldap.cnf"
+#line 513 "./asn1/ldap/ldap.cnf"
Filter_string=NULL;
Filter_elements = 0;
Filter_length = 0;
offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
-#line 525 "./asn1/ldap/ldap.cnf"
+#line 518 "./asn1/ldap/ldap.cnf"
Filter_string=NULL;
and_filter_string=NULL;
Filter_elements = 0;
tvbuff_t *next_tvb = NULL;
gchar *string;
- guint32 i, len;
int old_offset = offset;
gint *hf_id;
proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_reported_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA);
/* if we have an attribute type that isn't binary see if there is a better dissector */
- else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree, NULL)) {
+ else if(!attr_type || !next_tvb || !dissector_try_string_new(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree, FALSE, NULL)) {
offset = old_offset;
/* do the default thing */
NULL);
- len = tvb_reported_length_remaining(next_tvb, 0);
-
- for(i = 0; i < len; i++)
- if(!g_ascii_isprint(tvb_get_guint8(next_tvb, i)))
- break;
-
- if(i == len) {
+ if(tvb_ascii_isprint(next_tvb, 0, tvb_reported_length(next_tvb))) {
string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_reported_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA);
proto_item_set_text(actx->created_item, "AttributeValue: %s", string);
}
static int
dissect_ldap_SearchResultReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 795 "./asn1/ldap/ldap.cnf"
+#line 788 "./asn1/ldap/ldap.cnf"
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 19, TRUE, dissect_ldap_SEQUENCE_OF_LDAPURL);
static int
dissect_ldap_AbandonRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 802 "./asn1/ldap/ldap.cnf"
+#line 795 "./asn1/ldap/ldap.cnf"
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 16, TRUE, dissect_ldap_MessageID);
static int
dissect_ldap_T_requestValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 737 "./asn1/ldap/ldap.cnf"
+#line 730 "./asn1/ldap/ldap.cnf"
if((object_identifier_id != NULL) && oid_has_dissector(object_identifier_id)) {
offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree, NULL);
if (ldap_info && ldap_info->start_tls_pending &&
hf_index == hf_ldap_extendedResponse_resultCode && resultCode == 0) {
/* The conversation will continue using SSL */
- ssl_starttls_ack(find_dissector("ssl"), actx->pinfo, ldap_handle);
+ ssl_starttls_ack(find_dissector("tls"), actx->pinfo, ldap_handle);
ldap_info->start_tls_pending = FALSE;
}
static int
dissect_ldap_T_intermediateResponse_responseValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 745 "./asn1/ldap/ldap.cnf"
+#line 738 "./asn1/ldap/ldap.cnf"
const gchar *name;
-#line 749 "./asn1/ldap/ldap.cnf"
+#line 742 "./asn1/ldap/ldap.cnf"
if(ldm_tree && object_identifier_id) {
proto_item_set_text(ldm_tree, "%s %s", "IntermediateResponse", object_identifier_id);
name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id);
static int
dissect_ldap_T_controlValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 718 "./asn1/ldap/ldap.cnf"
+#line 711 "./asn1/ldap/ldap.cnf"
gint8 ber_class;
gboolean pc, ind;
gint32 tag;
static int
dissect_ldap_DirSyncFlags(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 762 "./asn1/ldap/ldap.cnf"
+#line 755 "./asn1/ldap/ldap.cnf"
gint8 ber_class;
gboolean pc;
gint32 tag;
/*--- End of included file: packet-ldap-fn.c ---*/
-#line 913 "./asn1/ldap/packet-ldap-template.c"
+#line 906 "./asn1/ldap/packet-ldap-template.c"
static int dissect_LDAPMessage_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ldap_conv_info_t *ldap_info) {
int offset = 0;
/* NT Token */
proto_tree_add_item(tree, hf_mscldap_netlogon_nt_token, tvb, offset, 2, ENC_LITTLE_ENDIAN);
- offset += 2;
return tvb_captured_length(tvb);
}
TFS(&tfs_ads_rodc), 0x00000800, "Is this an read only dc?", HFILL }},
{ &hf_mscldap_netlogon_flags_wdc,
- { "WDC", "mscldap.netlogon.flags.writabledc.", FT_BOOLEAN, 32,
+ { "WDC", "mscldap.netlogon.flags.writabledc", FT_BOOLEAN, 32,
TFS(&tfs_ads_wdc), 0x00001000, "Is this an writable dc (Windows 2008)?", HFILL }},
{ &hf_mscldap_netlogon_flags_dns,
NULL, HFILL }},
/*--- End of included file: packet-ldap-hfarr.c ---*/
-#line 2155 "./asn1/ldap/packet-ldap-template.c"
+#line 2147 "./asn1/ldap/packet-ldap-template.c"
};
/* List of subtrees */
&ett_ldap_T_warning,
/*--- End of included file: packet-ldap-ettarr.c ---*/
-#line 2169 "./asn1/ldap/packet-ldap-template.c"
+#line 2161 "./asn1/ldap/packet-ldap-template.c"
};
/* UAT for header fields */
static uat_field_t custom_attribute_types_uat_fields[] = {
" To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
&ldap_desegment);
- prefs_register_uint_preference(ldap_module, "ssl.port", "LDAPS TCP Port",
- "Set the port for LDAP operations over SSL",
+ prefs_register_uint_preference(ldap_module, "tls.port", "LDAPS TCP Port",
+ "Set the port for LDAP operations over TLS",
10, &global_ldaps_tcp_port);
+ prefs_register_obsolete_preference(ldap_module, "ssl.port");
/* UAT */
attributes_uat = uat_new("Custom LDAP AttributeValue types",
sizeof(attribute_type_t),
attribute_types_copy_cb,
attribute_types_update_cb,
attribute_types_free_cb,
- attribute_types_initialize_cb,
- NULL,
+ attribute_types_post_update_cb,
+ attribute_types_reset_cb,
custom_attribute_types_uat_fields);
prefs_register_uat_preference(ldap_module, "custom_ldap_attribute_types",
ntlmssp_handle = find_dissector_add_dependency("ntlmssp", proto_ldap);
- ssl_handle = find_dissector_add_dependency("ssl", proto_ldap);
+ tls_handle = find_dissector_add_dependency("tls", proto_ldap);
prefs_register_ldap();
/*--- End of included file: packet-ldap-dis-tab.c ---*/
-#line 2340 "./asn1/ldap/packet-ldap-template.c"
+#line 2333 "./asn1/ldap/packet-ldap-template.c"
dissector_add_uint_range_with_preference("tcp.port", TCP_PORT_RANGE_LDAP, ldap_handle);
}