diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-05-29 19:08:26 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-05-29 19:08:26 +0000 |
commit | 4b2284cc35d719eea3dd15121159fe5eadda6c18 (patch) | |
tree | 3257c5679df08c6462e636b50d6a365e036876d7 /asn1 | |
parent | 2c1e75d51911c02cbf142602c19405c9ba6050a8 (diff) |
Clean up the .cnf file a bit.
svn path=/trunk/; revision=21992
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/ldap/Makefile | 5 | ||||
-rw-r--r-- | asn1/ldap/Makefile.nmake | 5 | ||||
-rw-r--r-- | asn1/ldap/ldap.cnf | 66 |
3 files changed, 28 insertions, 48 deletions
diff --git a/asn1/ldap/Makefile b/asn1/ldap/Makefile index f27ed5d399..2441e70b1a 100644 --- a/asn1/ldap/Makefile +++ b/asn1/ldap/Makefile @@ -1,13 +1,14 @@ # $Id$ DISSECTOR_FILES=packet-ldap.c packet-ldap.h +ASN_FILE_LIST=Lightweight-Directory-Access-Protocol-V3.asn all: generate_dissector generate_dissector: $(DISSECTOR_FILES) -$(DISSECTOR_FILES): ../../tools/asn2wrs.py Lightweight-Directory-Access-Protocol-V3.asn packet-ldap-template.c packet-ldap-template.h ldap.cnf $(ASN_EXPORTS) - python ../../tools/asn2wrs.py -b -e -p ldap -c ldap.cnf -s packet-ldap-template Lightweight-Directory-Access-Protocol-V3.asn +$(DISSECTOR_FILES): ../../tools/asn2wrs.py $(ASN_FILE_LIST) packet-ldap-template.c packet-ldap-template.h ldap.cnf $(ASN_EXPORTS) + python ../../tools/asn2wrs.py -b -e -p ldap -c ldap.cnf -s packet-ldap-template $(ASN_FILE_LIST) clean: rm -f parsetab.py $(DISSECTOR_FILES) diff --git a/asn1/ldap/Makefile.nmake b/asn1/ldap/Makefile.nmake index 3f64472080..69be41f506 100644 --- a/asn1/ldap/Makefile.nmake +++ b/asn1/ldap/Makefile.nmake @@ -8,14 +8,15 @@ UNIX2DOS=$(PERL) ../../tools/unix2dos.pl PROTOCOL_NAME=ldap DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h +ASN_FILE_LIST=Lightweight-Directory-Access-Protocol-V3.asn all: generate_dissector generate_dissector: $(DISSECTOR_FILES) -$(DISSECTOR_FILES): ../../tools/asn2wrs.py Lightweight-Directory-Access-Protocol-V3.asn packet-ldap-template.c packet-ldap-template.h ldap.cnf +$(DISSECTOR_FILES): ../../tools/asn2wrs.py $(ASN_FILE_LIST) packet-ldap-template.c packet-ldap-template.h ldap.cnf !IFDEF PYTHON - $(PYTHON) "../../tools/asn2wrs.py" -b -e -p $(PROTOCOL_NAME) -c ldap.cnf -s packet-ldap-template Lightweight-Directory-Access-Protocol-V3.asn + $(PYTHON) "../../tools/asn2wrs.py" -b -e -p $(PROTOCOL_NAME) -c ldap.cnf -s packet-ldap-template $(ASN_FILE_LIST) !ELSE @echo Error: You need Python to use asn2wrs.py @exit 1 diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index 3ebf1343d9..cb7e142d90 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -30,20 +30,21 @@ AssertionValue TYPE = FT_STRING DISPLAY = BASE_NONE STRINGS = NULL #.REGISTER SearchControlValue B "1.2.840.113556.1.4.319" "pagedResultsControl" -SortKeyList B "1.2.840.113556.1.4.473" "sortKeyList" -SortResult B "1.2.840.113556.1.4.474" "sortResult" +SortKeyList B "1.2.840.113556.1.4.473" "sortKeyList" +SortResult B "1.2.840.113556.1.4.474" "sortResult" ReplControlValue B "1.2.840.113556.1.4.841" "replControlValue" #.FN_FTR LDAPURL PROTO_ITEM_SET_URL(get_ber_last_created_item()); -#.FN_PARS LDAPOID VAL_PTR = ¶meter_tvb #.FN_HDR LDAPOID tvbuff_t *parameter_tvb; const gchar *name; proto_item *item = NULL; +#.FN_PARS LDAPOID VAL_PTR = ¶meter_tvb + #.FN_FTR LDAPOID object_identifier_id = NULL; @@ -62,9 +63,7 @@ ReplControlValue B "1.2.840.113556.1.4.841" "replControlValue" } -#.FN_PARS MessageID VAL_PTR = &MessageID - -#.FN_BODY MessageID +#.FN_BODY MessageID VAL_PTR = &MessageID %(DEFAULT_BODY)s @@ -124,8 +123,7 @@ ldap_conv_info_t *ldap_info; actx->pinfo->private_data = ldap_info; -#.FN_PARS Mechanism VAL_PTR = ¶meter_tvb -#.FN_BODY Mechanism +#.FN_BODY Mechanism VAL_PTR = ¶meter_tvb ldap_conv_info_t *ldap_info; tvbuff_t *parameter_tvb; @@ -163,8 +161,7 @@ char *mechanism = NULL; } actx->pinfo->private_data = ldap_info; -#.FN_PARS Credentials VAL_PTR = ¶meter_tvb -#.FN_BODY Credentials +#.FN_BODY Credentials VAL_PTR = ¶meter_tvb tvbuff_t *parameter_tvb; ldap_conv_info_t *ldap_info; @@ -189,8 +186,7 @@ ldap_conv_info_t *ldap_info; } actx->pinfo->private_data = ldap_info; -#.FN_PARS ServerSaslCreds VAL_PTR = ¶meter_tvb -#.FN_BODY ServerSaslCreds +#.FN_BODY ServerSaslCreds VAL_PTR = ¶meter_tvb tvbuff_t *parameter_tvb; ldap_conv_info_t *ldap_info; @@ -251,9 +247,7 @@ ldap_conv_info_t *ldap_info; } actx->pinfo->private_data = ldap_info; -#.FN_PARS LDAPString VAL_PTR = ¶meter_tvb - -#.FN_BODY LDAPString +#.FN_BODY LDAPString VAL_PTR = ¶meter_tvb tvbuff_t *parameter_tvb = NULL; char *ldapstring; gchar *sc = NULL; /* semi-colon pointer */ @@ -334,9 +328,7 @@ ldap_conv_info_t *ldap_info; } -#.FN_PARS T_scope VAL_PTR = &scope - -#.FN_BODY T_scope +#.FN_BODY T_scope VAL_PTR = &scope gint scope; const gchar *valstr; @@ -353,9 +345,7 @@ ldap_conv_info_t *ldap_info; if(ldm_tree) proto_item_append_text(ldm_tree, " %%s", valstr); -#.FN_PARS T_resultCode VAL_PTR = &result - -#.FN_BODY T_resultCode +#.FN_BODY T_resultCode VAL_PTR = &result const gchar *valstr; @@ -375,9 +365,7 @@ ldap_conv_info_t *ldap_info; } -#.FN_PARS BindResponse_resultCode VAL_PTR = &result - -#.FN_BODY BindResponse_resultCode +#.FN_BODY BindResponse_resultCode VAL_PTR = &result const gchar *valstr; @@ -433,9 +421,7 @@ ldap_conv_info_t *ldap_info; } -#.FN_PARS AuthenticationChoice VAL_PTR = &branch - -#.FN_BODY AuthenticationChoice +#.FN_BODY AuthenticationChoice VAL_PTR = &branch gint branch = -1; gint auth = -1; const gchar *valstr; @@ -499,8 +485,6 @@ ldap_conv_info_t *ldap_info; } #.FN_BODY Filter/and - const ber_old_sequence_t and_set_of[1] = { { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_and_item }, -}; proto_tree *tr=NULL; proto_item *it=NULL; char *old_and_filter_string=and_filter_string; @@ -509,9 +493,10 @@ ldap_conv_info_t *ldap_info; if(tree){ it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "and: "); tr=proto_item_add_subtree(it, ett_ldap_T_and); + tree = tr; } - offset = dissect_ber_old_set_of(implicit_tag, actx, tr, tvb, offset, - and_set_of, -1, ett_ldap_T_and); + +%(DEFAULT_BODY)s proto_item_append_text(it, "%%s", and_filter_string); Filter_string=ep_strdup_printf("%%s",and_filter_string); @@ -526,8 +511,6 @@ ldap_conv_info_t *ldap_info; #.FN_BODY Filter/or - const ber_old_sequence_t or_set_of[1] = { { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_or_item }, -}; proto_tree *tr=NULL; proto_item *it=NULL; char *old_or_filter_string=or_filter_string; @@ -536,10 +519,9 @@ ldap_conv_info_t *ldap_info; if(tree){ it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "or: "); tr=proto_item_add_subtree(it, ett_ldap_T_or); + tree = tr; } - offset = dissect_ber_old_set_of(implicit_tag, actx, tr, tvb, offset, - or_set_of, -1, ett_ldap_T_or); - +%(DEFAULT_BODY)s proto_item_append_text(it, "%%s", or_filter_string); Filter_string=ep_strdup_printf("%%s",or_filter_string); or_filter_string=old_or_filter_string; @@ -599,11 +581,9 @@ ldap_conv_info_t *ldap_info; if(tree){ it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "substring: "); tr=proto_item_add_subtree(it, ett_ldap_SubstringFilter); + tree = tr; } - offset = dissect_ber_old_sequence(implicit_tag, actx, tr, tvb, offset, - SubstringFilter_sequence, hf_index, - ett_ldap_SubstringFilter); - +%(DEFAULT_BODY)s Filter_string=ep_strdup_printf("(%%s=%%s)",attr_type,substring_value); proto_item_append_text(it, "%%s", Filter_string); substring_value=old_substring_value; @@ -615,11 +595,9 @@ ldap_conv_info_t *ldap_info; if(tree){ it=proto_tree_add_text(tree, tvb, offset, tvb_length_remaining(tvb, offset), "Filter: "); tr=proto_item_add_subtree(it, ett_ldap_Filter); + tree = tr; } - offset = dissect_ber_old_choice(actx, tr, tvb, offset, - Filter_choice, -1, ett_ldap_Filter, - NULL); - +%(DEFAULT_BODY)s proto_item_append_text(it, "%%s", Filter_string); #.FN_BODY AuthenticationChoice/ntlmsspNegotiate |