Bill Meier | 1 May 2012 02:50
Favicon

Re: [Wireshark-commits] rev 42368: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-bfd.c

On 4/30/2012 7:08 PM, guy@... wrote:
> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=42368
>
> User: guy
> Date: 2012/04/30 04:08 PM
>
> Log:
>   No C++-style comments, please; some C compilers reject them.
>
> Directory: /trunk/epan/dissectors/
>    Changes    Path            Action
>    +6 -6      packet-bfd.c    Modified
>
>

My mistake... I forgot to remove some "comments to myself..."  :(

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Guy Harris | 1 May 2012 03:05
Picon
Favicon

Re: [Wireshark-commits] rev 42368: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-bfd.c


On Apr 30, 2012, at 5:50 PM, Bill Meier wrote:

> My mistake... I forgot to remove some "comments to myself..."  :(

I replaced them with indications of why the field length is 6 (they're showing the Sta field and the flags separately).
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Christopher Maynard | 1 May 2012 03:08

_U_ is used when it shouldn't be.

So after fixing a Clang warning, I noticed that _U_ is greatly overused in some
files, such as packet-dcerpc-frsrpc.c, generated from epan/dissectors/pidl/. 
Not that it's particularly harmful, but marking arguments unused when they are
in fact used can be confusing, if nothing else.

Does anyone know how to globally search for and reveal such cases?  Better would
be to automatically fix them by deleting the _U_, as manually finding/fixing
them would probably be too tedious a task.

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Guy Harris | 1 May 2012 03:17
Picon
Favicon

Re: _U_ is used when it shouldn't be.


On Apr 30, 2012, at 6:08 PM, Christopher Maynard wrote:

> So after fixing a Clang warning, I noticed that _U_ is greatly overused in some
> files, such as packet-dcerpc-frsrpc.c, generated from epan/dissectors/pidl/.

Is _U_ being used in human-written code or in code written by the PIDL-to-dissector code?  If the latter,
then it should be fixed in the generator *IF* the generator can, without too much trouble, figure out
whether an argument is used; otherwise, it's probably not worth worrying about.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Christopher Maynard | 1 May 2012 03:25

pidl-generated dissectors

Up until recently, I hadn't looked at the pidl-generated dissectors much, but
after having just generated the packet-dcerpc-frsrpc.c dissector, it seems that
there are many differences between the generated files and those previously
generated dissectors under revision control in epan/dissectors/.

There are also several warnings generated and some complaints about unused hf
fields by the pidl compiler.  I'm not too sure how to fix those either.  Are
there any pidl experts out there who might be able to have a look at these?

- Chris

P.S. Below is just a small example of some diffs between a "just-generated" file
and the one under version control (other pidl-generated dissectors have many
more differences though):

$ diff packet-dcerpc-frsrpc.c ../packet-dcerpc-frsrpc.c
3781c3781
<-         { "  Ndr Guid Size",
"frsrpc.frsrpc_FrsVerifyPromotionParent.__ndr_guid_size", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
---
->         { "Ndr Guid Size",
"frsrpc.frsrpc_FrsVerifyPromotionParent.__ndr_guid_size", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
3801c3801
<-         { "  Ndr Guid Size",
"frsrpc.frsrpc_FrsStartPromotionParent.__ndr_guid_size", FT_UINT32, BASE_DEC,
NULL, 0, NULL, HFILL }},
---
->         { "Ndr Guid Size",
(Continue reading)

Christopher Maynard | 1 May 2012 03:30

Re: _U_ is used when it shouldn't be.

Guy Harris <guy <at> ...> writes:

> Is _U_ being used in human-written code or in code written by the
PIDL-to-dissector code?  If the latter,
> then it should be fixed in the generator *IF* the generator can, without too
much trouble, figure out
> whether an argument is used; otherwise, it's probably not worth worrying about.

In the case of packet-dcerpc-frsrpc.c, I guess it's a combination of both? 
epan/dissectors/pidl/frsrpc.cnf is also a file under revision control and it has
several files where _U_ is used incorrectly; however, the generated
packet-dcerpc-frsrpc.c file has many more cases.  I don't know enough about pidl
to know how/where the rest are coming from yet.

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Guy Harris | 1 May 2012 03:43
Picon
Favicon

Re: pidl-generated dissectors


On Apr 30, 2012, at 6:25 PM, Christopher Maynard wrote:

> In the above case, I tried searching for "Ndr Guid Size" to find out where those
> leading spaces were coming from,

They come from

	1) the NDR GUID size field being named "__ndr_guid_size" in epan/dissectors/pidl/frsrpc.idl

and

	2) the PIDL-to-dissector script replacing all underscores, including leading ones with spaces when
generating field descriptive names.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Vishnu Bhatt | 2 May 2012 10:01
Favicon

Re: Problem in using a global variable in wireshark/gtk folder which is defined in epan/dissectors/ folder

Hi,

 

I am implementing a functionality where I want to scan all packets in a pcap file, and depending on a configuration, select only the relevant packets of a call flow (basically create a filter and then apply it). I will be using only the GUI mode (no tshark). Tap interface will not serve my purpose.

Is there a quick fix way to call UI code from the dissectors code? I simply want to prototype and test.

 

Regards,

Vishnu  

 

From: wireshark-dev-bounces-IZ8446WsY0/dtAWm4Da02A@public.gmane.org [mailto:wireshark-dev-bounces-IZ8446WsY0/dtAWm4Da02A@public.gmane.org] On Behalf Of Anders Broman
Sent: Wednesday, April 18, 2012 5:25 PM
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] Problem in using a global variable in wireshark/gtk folder which is defined in epan/dissectors/ folder

 

Hi,

You should probably do what you are trying to do trough the tap interface instead, dissectors are not supposed to have any UI code as they can be run from tshark as well.

If you intend to submit your code back to Wireshark it might help if you describe the functionality you are designing,

Regards

Anders

 

From: wireshark-dev-bounces <at> wireshark.org [mailto:wireshark-dev-bounces-IZ8446WsY0/dtAWm4Da02A@public.gmane.org] On Behalf Of Vishnu Bhatt
Sent: den 18 april 2012 12:52
To: wireshark-dev <at> wireshark.org
Subject: [Wireshark-dev] Problem in using a global variable in wireshark/gtk folder which is defined in epan/dissectors/ folder

Hello,

I have a global variable in a .c file in the wireshark/epan/dissectors/ folder. How do I use it in another .c file in the wireshark/gtk/ folder? Every time I try using extern, I get an "undefined reference" error. I am able to use the same variable in another .c file in the epan/ folder. Is there anything I am missing?

 

The exact error I am getting is

 

/home1/vishnu.bhatt/11.2.1/wireshark_3g/gtk/call_trace.c:139: undefined reference to `UE_trace_IMSI_table'

 

“UE_trace_IMSI_table” is a global variable defined in /home1/vishnu.bhatt/11.2.1/wireshark_3g/epan/dissectors/packet-abc.c

 

And I am trying to use “UE_trace_IMSI_table” in /home1/vishnu.bhatt/11.2.1/wireshark_3g/gtk/call_trace.c

 

I have declared “UE_trace_IMSI_table” in /home1/vishnu.bhatt/11.2.1/wireshark_3g/gtk/call_trace.h

 

Any help will be appreciated.

 

Thanks and Regards

Vishnu Bhatt





===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================





===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe
Erwin Rol | 2 May 2012 11:06

dynamic generation of dissector

Hey all,

is there a way to dynamically generate part of a dissector? For example 
reading a database (sqlite/xml/etc.) and use that at run time to 
generate the dissector?

Are there any dissectors that already do this ?

- Erwin

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe

Robert G. Jakabosky | 2 May 2012 12:05
Gravatar

Re: dynamic generation of dissector

On Wednesday 02, Erwin Rol wrote:
> Hey all,
> 
> is there a way to dynamically generate part of a dissector? For example
> reading a database (sqlite/xml/etc.) and use that at run time to
> generate the dissector?
> 
> Are there any dissectors that already do this ?

I wrote a dissector in Lua that reads a text file that describes many 
different message layouts:
http://opensimulator.org/wiki/LLUDP_Dissector

It should be possible to use the standard Lua modules for reading a database 
from a Lua dissector.  But I haven't tried that.

--

-- 
Robert G. Jakabosky
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@...>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@...?subject=unsubscribe


Gmane