Mailing List Archive

asn2wrs blurb
Tomas,

I want to extend asn2wrs to generate ASN.1 type information for a given hf
that I can use to bring up ASN.1 spec at the appropriate location. Whilst I
have done this with a separate "#include packet-XXX-typearr.c", I was
wondering if the asn2wrs generated "blurb" could be used?

I can't quite tell what the asn2wrs wants to set the "blurb" to - but it is
often blank in asn2wrs generated files.

Attached is a patch (for discussion only) for what I am looking, so you can
see what I mean.

With this patch, packet-x509.c goes from:
...
{ &hf_x509af_version,
{ "version", "x509af.version",
FT_INT32, BASE_DEC, VALS(x509af_Version_vals), 0,
"", HFILL }},
{ &hf_x509af_serialNumber,
{ "serialNumber", "x509af.serialNumber",
FT_INT32, BASE_DEC, NULL, 0,
"", HFILL }},
{ &hf_x509af_signature,
{ "signature", "x509af.signature",
FT_NONE, BASE_NONE, NULL, 0,
"", HFILL }},
{ &hf_x509af_issuer,
{ "issuer", "x509af.issuer",
FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
"", HFILL }},
{ &hf_x509af_validity,
{ "validity", "x509af.validity",
FT_NONE, BASE_NONE, NULL, 0,
"Certificate/signedCertificate/validity", HFILL }},
{ &hf_x509af_subject,
{ "subject", "x509af.subject",
FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
"Certificate/signedCertificate/subject", HFILL }},
{ &hf_x509af_subjectPublicKeyInfo,
{ "subjectPublicKeyInfo", "x509af.subjectPublicKeyInfo",
FT_NONE, BASE_NONE, NULL, 0,
"Certificate/signedCertificate/subjectPublicKeyInfo", HFILL }},
to:

{ &hf_x509af_version,
{ "version", "x509af.version",
FT_INT32, BASE_DEC, VALS(x509af_Version_vals), 0,
"x509af.Version", HFILL }},
{ &hf_x509af_serialNumber,
{ "serialNumber", "x509af.serialNumber",
FT_INT32, BASE_DEC, NULL, 0,
"x509af.CertificateSerialNumber", HFILL }},
{ &hf_x509af_signature,
{ "signature", "x509af.signature",
FT_NONE, BASE_NONE, NULL, 0,
"x509af.AlgorithmIdentifier", HFILL }},
{ &hf_x509af_issuer,
{ "issuer", "x509af.issuer",
FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
"x509if.Name", HFILL }},
{ &hf_x509af_validity,
{ "validity", "x509af.validity",
FT_NONE, BASE_NONE, NULL, 0,
"x509af.Validity", HFILL }},
{ &hf_x509af_subject,
{ "subject", "x509af.subject",
FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
"x509af.SubjectName", HFILL }},
{ &hf_x509af_subjectPublicKeyInfo,
{ "subjectPublicKeyInfo", "x509af.subjectPublicKeyInfo",
FT_NONE, BASE_NONE, NULL, 0,
"x509af.SubjectPublicKeyInfo", HFILL }},

Comments?

Graeme
RE: asn2wrs blurb [ In reply to ]
-------------------
The Ethereal project is being continued at a new site. Please go to
http://www.wireshark.org and subscribe to wireshark-dev@wireshark.org.
Don't forget to unsubscribe from this list at
http://www.ethereal.com/mailman/listinfo/ethereal-dev
-------------------

Hello Graeme,

the 1st idea was to put full filed name (e.g.
"Certificate/signedCertificate/subject") if the field has only one
occurence.
I have not thought about it later and it remains still the same.

It is the question what should be in the blurb.
We can find either one value suitable for all protocols or I can
implement command line option if we find more than one purposeful value.

You choice is "proto.WrsType".
What are other opinions?



-----Original Message-----
From: ethereal-dev-bounces@ethereal.com
[mailto:ethereal-dev-bounces@ethereal.com] On Behalf Of Graeme Lunt
Sent: Saturday, July 29, 2006 4:13 PM
To: 'Ethereal development'
Subject: [Ethereal-dev] asn2wrs blurb

Tomas,

I want to extend asn2wrs to generate ASN.1 type information for a given
hf
that I can use to bring up ASN.1 spec at the appropriate location.
Whilst I
have done this with a separate "#include packet-XXX-typearr.c", I was
wondering if the asn2wrs generated "blurb" could be used?

I can't quite tell what the asn2wrs wants to set the "blurb" to - but
it is
often blank in asn2wrs generated files.

Attached is a patch (for discussion only) for what I am looking, so you
can
see what I mean.

With this patch, packet-x509.c goes from:
...
{ &hf_x509af_version,
{ "version", "x509af.version",
FT_INT32, BASE_DEC, VALS(x509af_Version_vals), 0,
"", HFILL }},
{ &hf_x509af_serialNumber,
{ "serialNumber", "x509af.serialNumber",
FT_INT32, BASE_DEC, NULL, 0,
"", HFILL }},
{ &hf_x509af_signature,
{ "signature", "x509af.signature",
FT_NONE, BASE_NONE, NULL, 0,
"", HFILL }},
{ &hf_x509af_issuer,
{ "issuer", "x509af.issuer",
FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
"", HFILL }},
{ &hf_x509af_validity,
{ "validity", "x509af.validity",
FT_NONE, BASE_NONE, NULL, 0,
"Certificate/signedCertificate/validity", HFILL }},
{ &hf_x509af_subject,
{ "subject", "x509af.subject",
FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
"Certificate/signedCertificate/subject", HFILL }},
{ &hf_x509af_subjectPublicKeyInfo,
{ "subjectPublicKeyInfo", "x509af.subjectPublicKeyInfo",
FT_NONE, BASE_NONE, NULL, 0,
"Certificate/signedCertificate/subjectPublicKeyInfo", HFILL }},
to:

{ &hf_x509af_version,
{ "version", "x509af.version",
FT_INT32, BASE_DEC, VALS(x509af_Version_vals), 0,
"x509af.Version", HFILL }},
{ &hf_x509af_serialNumber,
{ "serialNumber", "x509af.serialNumber",
FT_INT32, BASE_DEC, NULL, 0,
"x509af.CertificateSerialNumber", HFILL }},
{ &hf_x509af_signature,
{ "signature", "x509af.signature",
FT_NONE, BASE_NONE, NULL, 0,
"x509af.AlgorithmIdentifier", HFILL }},
{ &hf_x509af_issuer,
{ "issuer", "x509af.issuer",
FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
"x509if.Name", HFILL }},
{ &hf_x509af_validity,
{ "validity", "x509af.validity",
FT_NONE, BASE_NONE, NULL, 0,
"x509af.Validity", HFILL }},
{ &hf_x509af_subject,
{ "subject", "x509af.subject",
FT_UINT32, BASE_DEC, VALS(x509af_SubjectName_vals), 0,
"x509af.SubjectName", HFILL }},
{ &hf_x509af_subjectPublicKeyInfo,
{ "subjectPublicKeyInfo", "x509af.subjectPublicKeyInfo",
FT_NONE, BASE_NONE, NULL, 0,
"x509af.SubjectPublicKeyInfo", HFILL }},

Comments?

Graeme
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@ethereal.com
http://www.ethereal.com/mailman/listinfo/ethereal-dev