Skip to content

Commit

Permalink
ASN1: Register PDU-dissectors as NEW
Browse files Browse the repository at this point in the history
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64
Reviewed-on: https://code.wireshark.org/review/4494
Petri-Dish: Stig Bjørlykke <[email protected]>
Tested-by: Petri Dish Buildbot <[email protected]>
Reviewed-by: Michael Mann <[email protected]>
Reviewed-by: Stig Bjørlykke <[email protected]>
Tested-by: Stig Bjørlykke <[email protected]>
  • Loading branch information
stigbjorlykke committed Oct 13, 2014
1 parent 94d3548 commit 4e1b5ea
Show file tree
Hide file tree
Showing 147 changed files with 3,519 additions and 2,326 deletions.
4 changes: 2 additions & 2 deletions asn1/HI2Operations/HI2Operations.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ EN301040 EN301040

#.EXPORTS

#.REGISTER
#.REGISTER_NEW

#.PDU
#.PDU_NEW
IRIsContent

#.NO_EMIT
Expand Down
2 changes: 1 addition & 1 deletion asn1/HI2Operations/packet-HI2Operations-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void proto_register_HI2Operations(void) {
proto_register_field_array(proto_HI2Operations, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));

register_dissector("HI2Operations", dissect_IRIsContent_PDU, proto_HI2Operations);
new_register_dissector("HI2Operations", dissect_IRIsContent_PDU, proto_HI2Operations);
}


Expand Down
4 changes: 2 additions & 2 deletions asn1/acp133/acp133.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#.IMPORT ../x509if/x509if-exp.cnf
#.IMPORT ../x509sat/x509sat-exp.cnf

#.PDU
#.PDU_NEW
ACPPreferredDelivery
ALType
Community
Expand Down Expand Up @@ -65,7 +65,7 @@ Kmid
&id ObjectIdentifierType
#.END

#.REGISTER
#.REGISTER_NEW

# X.402

Expand Down
2 changes: 1 addition & 1 deletion asn1/atn-cm/atn-cm.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#.EXPORTS

#.PDU
#.PDU_NEW
CMAircraftMessage
CMGroundMessage
#.END
Expand Down
8 changes: 4 additions & 4 deletions asn1/atn-cm/packet-atn-cm-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ dissect_atn_cm(
dissect_CMGroundMessage_PDU(
tvb,
pinfo,
sub_tree);
sub_tree, NULL);
break;
case dm:
dissect_CMAircraftMessage_PDU(
tvb,
pinfo,
sub_tree);
sub_tree, NULL);
break;
default:
break;
Expand Down Expand Up @@ -126,7 +126,7 @@ dissect_atn_cm_heur(
dissect_CMGroundMessage_PDU(
tvb,
pinfo,
NULL);
NULL, NULL);
/* no exception thrown: looks like it is a CM PDU */
is_atn_cm = TRUE; }
CATCH_ALL {
Expand All @@ -138,7 +138,7 @@ dissect_atn_cm_heur(
dissect_CMAircraftMessage_PDU(
tvb,
pinfo,
NULL);
NULL, NULL);
/* no exception thrown: looks like it is a CM PDU */
is_atn_cm = TRUE;}
CATCH_ALL {
Expand Down
2 changes: 1 addition & 1 deletion asn1/atn-cpdlc/atn-cpdlc.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#.OMIT_ASSIGNMENT
#.END

#.PDU
#.PDU_NEW
AircraftPDUs
GroundPDUs
ProtectedAircraftPDUs
Expand Down
36 changes: 20 additions & 16 deletions asn1/atn-cpdlc/packet-atn-cpdlc-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,26 @@ void proto_reg_handoff_atn_cpdlc(void);
static const char *object_identifier_id;

/* forward declarations */
static void dissect_GroundPDUs_PDU(
static int dissect_GroundPDUs_PDU(
tvbuff_t *tvb _U_,
packet_info *pinfo _U_,
proto_tree *tree _U_);
static void dissect_AircraftPDUs_PDU(
proto_tree *tree _U_,
void *data _U_);
static int dissect_AircraftPDUs_PDU(
tvbuff_t *tvb _U_,
packet_info *pinfo _U_,
proto_tree *tree _U_);
static void dissect_ProtectedGroundPDUs_PDU(
proto_tree *tree _U_,
void *data _U_);
static int dissect_ProtectedGroundPDUs_PDU(
tvbuff_t *tvb _U_,
packet_info *pinfo _U_,
proto_tree *tree _U_);
static void dissect_ProtectedAircraftPDUs_PDU(
proto_tree *tree _U_,
void *data _U_);
static int dissect_ProtectedAircraftPDUs_PDU(
tvbuff_t *tvb _U_,
packet_info *pinfo _U_,
proto_tree *tree _U_);
proto_tree *tree _U_,
void *data _U_);

#include "packet-atn-cpdlc-hf.c"

Expand Down Expand Up @@ -172,12 +176,12 @@ dissect_atn_cpdlc(
dissect_ProtectedGroundPDUs_PDU(
tvb,
pinfo,
atn_cpdlc_tree);
atn_cpdlc_tree, NULL);
}else { /* downlink PDU's = Aircraft PDU's */
dissect_ProtectedAircraftPDUs_PDU(
tvb,
pinfo,
atn_cpdlc_tree);
atn_cpdlc_tree, NULL);
}
break;
case cpdlc:
Expand All @@ -186,12 +190,12 @@ dissect_atn_cpdlc(
dissect_GroundPDUs_PDU(
tvb,
pinfo,
atn_cpdlc_tree);
atn_cpdlc_tree, NULL);
}else { /* downlink PDU's = Aircraft PDU's */
dissect_AircraftPDUs_PDU(
tvb,
pinfo,
atn_cpdlc_tree);
atn_cpdlc_tree, NULL);
}
break;
default:
Expand All @@ -217,7 +221,7 @@ dissect_atn_cpdlc_heur(
switch(type){
case um:
TRY {
dissect_ProtectedGroundPDUs_PDU(tvb, pinfo, NULL);
dissect_ProtectedGroundPDUs_PDU(tvb, pinfo, NULL, NULL);
is_atn_cpdlc = TRUE;
is_pm = TRUE;
break;}
Expand All @@ -226,7 +230,7 @@ dissect_atn_cpdlc_heur(
is_pm = FALSE;}
ENDTRY;
TRY {
dissect_GroundPDUs_PDU(tvb, pinfo, NULL);
dissect_GroundPDUs_PDU(tvb, pinfo, NULL, NULL);
is_pm = FALSE;
is_atn_cpdlc = TRUE;
break;}
Expand All @@ -237,7 +241,7 @@ dissect_atn_cpdlc_heur(
break;
case dm:
TRY {
dissect_ProtectedAircraftPDUs_PDU(tvb, pinfo, NULL);
dissect_ProtectedAircraftPDUs_PDU(tvb, pinfo, NULL, NULL);
is_atn_cpdlc = TRUE;
is_pm = TRUE;
break;}
Expand All @@ -246,7 +250,7 @@ dissect_atn_cpdlc_heur(
is_pm = FALSE; }
ENDTRY;
TRY{
dissect_AircraftPDUs_PDU(tvb, pinfo, NULL);
dissect_AircraftPDUs_PDU(tvb, pinfo, NULL, NULL);
is_atn_cpdlc = TRUE;
is_pm = FALSE;
break;}
Expand Down
4 changes: 2 additions & 2 deletions asn1/atn-ulcs/atn-ulcs.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PDV-list/presentation-data-values/single-ASN1-type pdv-list_presentation-data-va
PDV-list/presentation-data-values/arbitrary pdv-list_presentation-data-values_arbitrary
#.END

#.PDU
#.PDU_NEW
Fully-encoded-data
ACSE-apdu
#.END
Expand Down Expand Up @@ -74,7 +74,7 @@ PDV-list/presentation-data-values/arbitrary pdv-list_presentation-data-values_ar
dissect_ACSE_apdu_PDU(
tvb_new_subset_remaining(tvb_usr, 0),
pinfo,
atn_ulcs_tree);
atn_ulcs_tree, NULL);
break;
case 3: /* USER data; call subdissector for CM, CPDLC ... */

Expand Down
9 changes: 5 additions & 4 deletions asn1/atn-ulcs/packet-atn-ulcs-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ static int dissect_atn_ulcs_T_externalt_encoding_arbitrary(
proto_tree *tree _U_,
int hf_index _U_);

static void dissect_ACSE_apdu_PDU(
static int dissect_ACSE_apdu_PDU(
tvbuff_t *tvb _U_,
packet_info *pinfo _U_,
proto_tree *tree _U_);
proto_tree *tree _U_,
void *data _U_);

guint32 dissect_per_object_descriptor_t(
tvbuff_t *tvb,
Expand Down Expand Up @@ -604,7 +605,7 @@ dissect_atn_ulcs(
dissect_Fully_encoded_data_PDU(
tvb,
pinfo,
atn_ulcs_tree);
atn_ulcs_tree, NULL);

return offset +
tvb_reported_length_remaining(tvb, offset ) ;
Expand Down Expand Up @@ -712,7 +713,7 @@ dissect_atn_ulcs(
dissect_ACSE_apdu_PDU(
tvb_new_subset_remaining(tvb, offset),
pinfo,
atn_ulcs_tree);
atn_ulcs_tree, NULL);

return offset +
tvb_reported_length_remaining(tvb, offset );
Expand Down
2 changes: 1 addition & 1 deletion asn1/c1222/c1222.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ IMPORT ../acse/acse.inf

#.EXPORTS

#.PDU
#.PDU_NEW
MESSAGE

#.NO_EMIT
Expand Down
10 changes: 3 additions & 7 deletions asn1/c1222/packet-c1222-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,13 +1066,9 @@ dissect_c1222_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME);

/* create the c1222 protocol tree */
if (tree) {
c1222_item = proto_tree_add_item(tree, proto_c1222, tvb, 0, -1, ENC_NA);
c1222_tree = proto_item_add_subtree(c1222_item, ett_c1222);
dissect_MESSAGE_PDU(tvb, pinfo, c1222_tree);
}

return tvb_captured_length(tvb);
c1222_item = proto_tree_add_item(tree, proto_c1222, tvb, 0, -1, ENC_NA);
c1222_tree = proto_item_add_subtree(c1222_item, ett_c1222);
return dissect_MESSAGE_PDU(tvb, pinfo, c1222_tree, NULL);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion asn1/camel/camel.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ OPERATION.&ResultType
#.END


#.REGISTER
#.REGISTER_NEW
CAP-GPRS-ReferenceNumber B "0.4.0.0.1.1.5.2" "id-CAP-GPRS-ReferenceNumber"
CAP-U-ABORT-REASON B "0.4.0.0.1.1.2.2" "id-CAP-U-ABORT-Reason"

Expand Down
2 changes: 1 addition & 1 deletion asn1/cdt/cdt.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#.EXPORTS
CompressedData

#.REGISTER
#.REGISTER_NEW
CompressedData B "1.3.26.0.4406.0.4.2" "cdt"

#.FN_BODY CompressedData
Expand Down
2 changes: 1 addition & 1 deletion asn1/cdt/packet-cdt-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void dissect_cdt (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
col_set_str (pinfo->cinfo, COL_PROTOCOL, "CDT");
col_clear (pinfo->cinfo, COL_INFO);

dissect_CompressedData_PDU (tvb, pinfo, tree);
dissect_CompressedData_PDU (tvb, pinfo, tree, NULL);
}

void proto_register_cdt (void) {
Expand Down
4 changes: 2 additions & 2 deletions asn1/cmip/cmip.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static const value_string cmip_error_code_vals[] = {

# X.721

#.REGISTER
#.REGISTER_NEW
BaseManagedObjectId B "2.9.2.21.7.13" "BaseManagedObjectId(13)"
# X.721
SimpleNameType B "2.9.3.2.7.1" "discriminatorId(1)"
Expand Down Expand Up @@ -216,7 +216,7 @@ Priority
RejectProblem


#.PDU
#.PDU_NEW


#.FN_HDR CMIPAbortInfo
Expand Down
2 changes: 1 addition & 1 deletion asn1/cmp/cmp.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ RevDetails
RevRepContent
RevReqContent

#.REGISTER
#.REGISTER_NEW
PBMParameter B "1.2.840.113533.7.66.13" "id-PasswordBasedMac"
DHBMParameter B "1.2.640.113533.7.66.30" "id-DHBasedMac"
CAProtEncCertValue B "1.3.6.1.5.5.7.4.1" "id-it-caProtEncCert"
Expand Down
2 changes: 1 addition & 1 deletion asn1/cms/cms.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SignerInfos
SignatureValue
UnsignedAttributes

#.REGISTER
#.REGISTER_NEW
ContentInfo B "1.2.840.113549.1.9.16.1.6" "id-ct-contentInfo"
#OctetString B "1.2.840.113549.1.7.1" "id-data" see x509sat.cnf
SignedData B "1.2.840.113549.1.7.2" "id-signedData"
Expand Down
4 changes: 2 additions & 2 deletions asn1/cms/packet-cms-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ void proto_register_cms(void) {
proto_register_field_array(proto_cms, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));

register_ber_syntax_dissector("ContentInfo", proto_cms, dissect_ContentInfo_PDU);
register_ber_syntax_dissector("SignedData", proto_cms, dissect_SignedData_PDU);
new_register_ber_syntax_dissector("ContentInfo", proto_cms, dissect_ContentInfo_PDU);
new_register_ber_syntax_dissector("SignedData", proto_cms, dissect_SignedData_PDU);
register_ber_oid_syntax(".p7s", NULL, "ContentInfo");
register_ber_oid_syntax(".p7m", NULL, "ContentInfo");
register_ber_oid_syntax(".p7c", NULL, "ContentInfo");
Expand Down
2 changes: 1 addition & 1 deletion asn1/credssp/credssp.cnf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# credssp.cnf
# Credential Security Support Provider (CredSSP) conformance file

#.PDU
#.PDU_NEW
TSRequest

#.FN_PARS TSRequest/authInfo VAL_PTR = &auth_tvb
Expand Down
10 changes: 5 additions & 5 deletions asn1/credssp/packet-credssp-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ static gint ett_credssp = -1;
/*
* Dissect CredSSP PDUs
*/
static void
dissect_credssp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
static int
dissect_credssp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data)
{
proto_item *item=NULL;
proto_tree *tree=NULL;
Expand All @@ -77,7 +77,7 @@ dissect_credssp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
col_clear(pinfo->cinfo, COL_INFO);

creds_type = -1;
dissect_TSRequest_PDU(tvb, pinfo, tree);
return dissect_TSRequest_PDU(tvb, pinfo, tree, data);
}

static gboolean
Expand Down Expand Up @@ -121,7 +121,7 @@ dissect_credssp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,

tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data);
}
dissect_credssp(tvb, pinfo, parent_tree);
dissect_credssp(tvb, pinfo, parent_tree, NULL);
return TRUE;
}
}
Expand Down Expand Up @@ -162,7 +162,7 @@ void proto_register_credssp(void) {

/* Register protocol */
proto_credssp = proto_register_protocol(PNAME, PSNAME, PFNAME);
register_dissector("credssp", dissect_credssp, proto_credssp);
new_register_dissector("credssp", dissect_credssp, proto_credssp);

/* Register fields and subtrees */
proto_register_field_array(proto_credssp, hf, array_length(hf));
Expand Down
2 changes: 1 addition & 1 deletion asn1/crmf/crmf.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SinglePubInfo
SubsequentMessage
UTF8Pairs

#.REGISTER
#.REGISTER_NEW
EncKeyWithID B "1.2.840.113549.1.9.16.1.21" "id-ct-encKeyWithID"
PBMParameter B "1.2.840.113533.7.66.13" "PasswordBasedMac"
RegToken B "1.3.6.1.5.5.7.5.1.1" "id-regCtrl-regToken"
Expand Down
Loading

0 comments on commit 4e1b5ea

Please sign in to comment.