Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Warnings in asn2wrs generated files

From: "Anders Broman" <a.broman@xxxxxxxxx>
Date: Wed, 28 Mar 2007 23:33:18 +0200
Hi,
Looking again the basic problem is asn2wrs not handling constructs like:
--InitiatingMessage ::= SEQUENCE {
--	procedureID
NBAP-ELEMENTARY-PROCEDURE.&procedureID	({NBAP-ELEMENTARY-PROCEDURES}),
--	criticality
NBAP-ELEMENTARY-PROCEDURE.&criticality
({NBAP-ELEMENTARY-PROCEDURES}{@procedureID}),
--	messageDiscriminator
NBAP-ELEMENTARY-PROCEDURE.&messageDiscriminator({NBAP-ELEMENTARY-PROCEDURES}
{@procedureID}),
--	transactionID 			TransactionID,
--	value
NBAP-ELEMENTARY-PROCEDURE.&InitiatingMessage({NBAP-ELEMENTARY-PROCEDURES}{@p
rocedureID})
--}
:
--AuditResponse-IEs NBAP-PROTOCOL-IES ::= {
--	{ ID id-End-Of-Audit-Sequence-Indicator
CRITICALITY ignore	TYPE End-Of-Audit-Sequence-Indicator
PRESENCE mandatory }|
--	{ ID id-Cell-InformationList-AuditRsp
CRITICALITY ignore	TYPE Cell-InformationList-AuditRsp
PRESENCE optional }|
--	{ ID id-CCP-InformationList-AuditRsp
CRITICALITY ignore	TYPE CCP-InformationList-AuditRsp
PRESENCE optional }|
	-- CCP (Communication Control Port) --
--	{ ID id-Local-Cell-InformationList-AuditRsp
CRITICALITY ignore	TYPE Local-Cell-InformationList-AuditRsp
PRESENCE optional }|
--	{ ID id-Local-Cell-Group-InformationList-AuditRsp	CRITICALITY
ignore	TYPE Local-Cell-Group-InformationList-AuditRsp	PRESENCE optional }|
--	{ ID id-CriticalityDiagnostics
CRITICALITY ignore	TYPE CriticalityDiagnostics
PRESENCE optional },
--	...
--}

--AuditResponse-Extensions NBAP-PROTOCOL-EXTENSION ::= {
--	{ ID id-Power-Local-Cell-Group-InformationList-AuditRsp	CRITICALITY
ignore	EXTENSION Power-Local-Cell-Group-InformationList-AuditRsp
PRESENCE optional },
--	...
--}

--Cell-InformationList-AuditRsp ::= SEQUENCE (SIZE (1..maxCellinNodeB)) OF
ProtocolIE-Single-Container {{ Cell-InformationItemIE-AuditRsp}}
Cell-InformationList-AuditRsp ::= SEQUENCE (SIZE (1..256)) OF
ProtocolIE-Single-Container

The current workarounds leads to a lot of unused code creating warnings.
I see no good solution currently.
Best regards
Anders

-----Ursprungligt meddelande-----
Från: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Anders Broman
Skickat: den 28 mars 2007 18:11
Till: 'Developer support list for Wireshark'
Ämne: Re: [Wireshark-dev] Warnings in asn2wrs generated files

Hi,
Without checking - I think the PDU lacked something in the signature or
something such as that but I'll try to find the time to have another look.
Best regards
Anders

-----Ursprungligt meddelande-----
Från: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Kukosa, Tomas
Skickat: den 28 mars 2007 17:19
Till: Developer support list for Wireshark
Ämne: Re: [Wireshark-dev] Warnings in asn2wrs generated files

Hi,

if those choice statemens are only dummy 
the better way is to define those types as PDU in .cnf file.
Then -F option could be removed. 

Regards,
  Tomas

Mailcode: NdD2sKHg
-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Anders Broman
(AL/EAB)
Sent: Wednesday, March 28, 2007 2:30 PM
To: Developer support list for Wireshark
Subject: [Wireshark-dev] Warnings in asn2wrs generated files

 
Hi,
I had a quick look at the warnings for NBAP some of the "unused
function" warnings are due
To the "dirty" way hf fields and stuff are auto generated by creating
dummy statements for
Opcodes and elements to hand craft them or remove the dummy statements
after copying the auto generated stuff to the template file seems like
owerkill or?

Other parts of the warnings are problems with asn2wrs it self or how
it's used.
>Tomas kukosa wrote:
>those "field functions" are created bacuse of -F option is used.
>It is used because some of "field functions" are called from nbap
template.
> 
>"field functions" are not called from generated code now. 
>It was changed few months ago when I change PER helper funcions from
"field oriented" to "type oriented".

I'm not sure how to fix those...

Best regards
Anders

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Joerg Mayer
Sent: den 28 mars 2007 14:13
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] [Patch] pragma warning

On Wed, Mar 28, 2007 at 08:21:24AM +0000, ronnie sahlberg wrote:
> I dont think it is really realistic to have all autogenerated files 
> always compile without any warnings.

Which warnings do you have in mind specifically? Why do you think they
can't be avoided?

> Maybe we should instead split Makefile.common up into three parts :
> 
> First part : normal dissectors
> 
> Second part : ANS2WRS generated dissectors  which take extra compile 
> time flags and definitions to suppress artefacts from the compiler.

I think they should just be generated from their "real sources" on each
build, thus removing the need to manually rebuild them at all.

> Third part : PIDL generated dissectors that once again take extra 
> compile parameters and definitions.

dito.

 ciao
    Joerg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev