diff options
Diffstat (limited to 'epan/dissectors/packet-ldap.c')
-rw-r--r-- | epan/dissectors/packet-ldap.c | 73 |
1 files changed, 37 insertions, 36 deletions
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index 93282caa92..ac94ebe292 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -106,6 +106,7 @@ #include <epan/dissectors/packet-dcerpc.h> #include <epan/asn1.h> +#include "packet-frame.h" #include "packet-ldap.h" #include "packet-ntlmssp.h" #include "packet-ssl.h" @@ -935,7 +936,7 @@ dissect_ldap_INTEGER_1_127(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_ldap_LDAPString(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 322 "ldap.cnf" +#line 321 "ldap.cnf" tvbuff_t *parameter_tvb = NULL; char *ldapstring = NULL; gchar *sc = NULL; /* semi-colon pointer */ @@ -1046,7 +1047,7 @@ dissect_ldap_LDAPDN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ static int dissect_ldap_Simple(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 165 "ldap.cnf" +#line 164 "ldap.cnf" ldap_conv_info_t *ldap_info; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, @@ -1067,7 +1068,7 @@ ldap_conv_info_t *ldap_info; static int dissect_ldap_Mechanism(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 175 "ldap.cnf" +#line 174 "ldap.cnf" ldap_conv_info_t *ldap_info; tvbuff_t *parameter_tvb; @@ -1115,7 +1116,7 @@ char *mechanism = NULL; static int dissect_ldap_Credentials(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 212 "ldap.cnf" +#line 211 "ldap.cnf" tvbuff_t *parameter_tvb; ldap_conv_info_t *ldap_info; @@ -1181,7 +1182,7 @@ dissect_ldap_SaslCredentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o 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 691 "ldap.cnf" +#line 690 "ldap.cnf" /* make sure the protocol op comes first */ ldap_do_protocolop(actx->pinfo); @@ -1197,7 +1198,7 @@ dissect_ldap_T_ntlmsspNegotiate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in 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 698 "ldap.cnf" +#line 697 "ldap.cnf" /* make sure the protocol op comes first */ ldap_do_protocolop(actx->pinfo); @@ -1228,7 +1229,7 @@ static const ber_choice_t AuthenticationChoice_choice[] = { 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 497 "ldap.cnf" +#line 496 "ldap.cnf" gint branch = -1; gint auth = -1; const gchar *valstr; @@ -1335,7 +1336,7 @@ static const value_string ldap_BindResponse_resultCode_vals[] = { static int dissect_ldap_BindResponse_resultCode(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 447 "ldap.cnf" +#line 446 "ldap.cnf" const gchar *valstr; @@ -1363,7 +1364,7 @@ dissect_ldap_BindResponse_resultCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U 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 705 "ldap.cnf" +#line 704 "ldap.cnf" tvbuff_t *new_tvb=NULL; offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb); @@ -1424,7 +1425,7 @@ dissect_ldap_Referral(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ static int dissect_ldap_ServerSaslCreds(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 252 "ldap.cnf" +#line 251 "ldap.cnf" tvbuff_t *parameter_tvb; ldap_conv_info_t *ldap_info; @@ -1542,7 +1543,7 @@ dissect_ldap_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, 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 519 "ldap.cnf" +#line 518 "ldap.cnf" implicit_tag = TRUE; /* correct problem with asn2wrs */ @@ -1572,7 +1573,7 @@ static const value_string ldap_T_scope_vals[] = { static int dissect_ldap_T_scope(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 413 "ldap.cnf" +#line 412 "ldap.cnf" gint scope; const gchar *valstr; @@ -1639,7 +1640,7 @@ static int 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 561 "ldap.cnf" +#line 560 "ldap.cnf" if(and_filter_string){ and_filter_string=ep_strdup_printf("(&%s%s)",and_filter_string,Filter_string); } else { @@ -1657,7 +1658,7 @@ static const ber_sequence_t T_and_set_of[1] = { 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 568 "ldap.cnf" +#line 567 "ldap.cnf" proto_tree *tr=NULL; proto_item *it=NULL; char *old_and_filter_string=and_filter_string; @@ -1690,7 +1691,7 @@ static int 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 588 "ldap.cnf" +#line 587 "ldap.cnf" if(or_filter_string){ or_filter_string=ep_strdup_printf("(|%s%s)",or_filter_string,Filter_string); } else { @@ -1709,7 +1710,7 @@ static const ber_sequence_t T_or_set_of[1] = { 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 596 "ldap.cnf" +#line 595 "ldap.cnf" proto_tree *tr=NULL; proto_item *it=NULL; char *old_or_filter_string=or_filter_string; @@ -1740,7 +1741,7 @@ static int 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 617 "ldap.cnf" +#line 616 "ldap.cnf" Filter_string=ep_strdup_printf("(!%s)",string_or_null(Filter_string)); @@ -1778,7 +1779,7 @@ static int 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 538 "ldap.cnf" +#line 537 "ldap.cnf" Filter_string=ep_strdup_printf("(%s=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); @@ -1809,7 +1810,7 @@ dissect_ldap_T_substringFilter_substrings_item(gboolean implicit_tag _U_, tvbuff T_substringFilter_substrings_item_choice, hf_index, ett_ldap_T_substringFilter_substrings_item, NULL); -#line 643 "ldap.cnf" +#line 642 "ldap.cnf" if (substring_item_final) { substring_value=ep_strdup_printf("%s%s", (substring_value?substring_value:"*"), @@ -1849,7 +1850,7 @@ static const ber_sequence_t SubstringFilter_sequence[] = { 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 657 "ldap.cnf" +#line 656 "ldap.cnf" proto_tree *tr=NULL; proto_item *it=NULL; char *old_substring_value=substring_value; @@ -1883,7 +1884,7 @@ static int 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 544 "ldap.cnf" +#line 543 "ldap.cnf" Filter_string=ep_strdup_printf("(%s>=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); @@ -1899,7 +1900,7 @@ static int 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 550 "ldap.cnf" +#line 549 "ldap.cnf" Filter_string=ep_strdup_printf("(%s<=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); @@ -1915,7 +1916,7 @@ static int 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 614 "ldap.cnf" +#line 613 "ldap.cnf" Filter_string=ep_strdup_printf("(%s=*)",string_or_null(Filter_string)); @@ -1928,7 +1929,7 @@ static int 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 556 "ldap.cnf" +#line 555 "ldap.cnf" Filter_string=ep_strdup_printf("(%s~=%s)", string_or_null(attributedesc_string), string_or_null(ldapvalue_string)); @@ -1950,7 +1951,7 @@ dissect_ldap_MatchingRuleId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of 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 620 "ldap.cnf" +#line 619 "ldap.cnf" gboolean val; offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &val); @@ -1985,7 +1986,7 @@ dissect_ldap_MatchingRuleAssertion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, 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 629 "ldap.cnf" +#line 628 "ldap.cnf" attr_type=NULL; matching_rule_string=NULL; ldapvalue_string=NULL; @@ -1994,7 +1995,7 @@ dissect_ldap_T_extensibleMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset = dissect_ldap_MatchingRuleAssertion(implicit_tag, tvb, offset, actx, tree, hf_index); -#line 635 "ldap.cnf" +#line 634 "ldap.cnf" Filter_string=ep_strdup_printf("(%s:%s%s%s=%s)", (attr_type?attr_type:""), (matching_rule_dnattr?"dn:":""), @@ -2037,7 +2038,7 @@ static const ber_choice_t Filter_choice[] = { 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 678 "ldap.cnf" +#line 677 "ldap.cnf" proto_tree *tr=NULL; proto_item *it=NULL; @@ -2062,13 +2063,13 @@ dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_ 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 531 "ldap.cnf" +#line 530 "ldap.cnf" Filter_string=NULL; offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index); -#line 534 "ldap.cnf" +#line 533 "ldap.cnf" Filter_string=NULL; and_filter_string=NULL; @@ -2124,7 +2125,7 @@ dissect_ldap_SearchRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_ldap_AttributeValue(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 464 "ldap.cnf" +#line 463 "ldap.cnf" tvbuff_t *next_tvb; gchar *string; @@ -2281,7 +2282,7 @@ static const value_string ldap_T_resultCode_vals[] = { static int dissect_ldap_T_resultCode(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 430 "ldap.cnf" +#line 429 "ldap.cnf" const gchar *valstr; @@ -2349,7 +2350,7 @@ dissect_ldap_SEQUENCE_OF_LDAPURL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i 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 748 "ldap.cnf" +#line 747 "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); @@ -2626,7 +2627,7 @@ dissect_ldap_CompareResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o 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 755 "ldap.cnf" +#line 754 "ldap.cnf" offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset, hf_index, BER_CLASS_APP, 16, TRUE, dissect_ldap_MessageID); @@ -2700,7 +2701,7 @@ dissect_ldap_LDAPOID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U 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 740 "ldap.cnf" +#line 739 "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); @@ -2980,7 +2981,7 @@ dissect_ldap_ControlType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse 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 721 "ldap.cnf" +#line 720 "ldap.cnf" gint8 class; gboolean pc, ind; gint32 tag; |