-------- Original-Nachricht --------
> Datum: Fri, 01 Apr 2011 14:36:50 -0400
> Von: Bill Meier <[email protected]>
> An: Developer support list for Wireshark <[email protected]>
> Betreff: Re: [Wireshark-dev] was: Adding Files to Wireshark (new developer)

> On 4/1/2011 12:57 PM, Chaswi Przellczyk wrote:
> 
> > Dear Stephen,
> >
> > that would be a good way to get this solved. I went ahead and
> > modified packet-rtp.c to add a field for a sampling-rate preference.
> > That works nice. BUT the preferences are typically used in the
> > dissectors, which is not true for my case. I can make the variable
> > visible in all files (make it truly global), but I'm wondering if
> > that's the right way to go. At the very least it would differ from
> > what I've seen in other source-files. Is there a different way of
> > accessing these preferences "correctly"?
> >
> 
> 
> Take at look at the data struct passed to register_tap() (or whatever
> it's called) when the tap is created by the dissector.
> 
> I'm not a 'tap' expert, but I think a ptr to that struct is passed to
> the tap callback fcn called for each frame.
> 
> Also  see doc/README.tapping

Dear Bill,

thanks again for your time and effort. I have to admit it's a new feeling in 
programming to actually have the data, but being unable to get it to the point 
of the program where you need it. Makes me feel young and inexperienced again :(

I did take a look at the tapping-README and I believe you are referring to 
register_tap_listener(...) and "the_tapinfo_struct" or in my case 
rtpstream_tapinfo_t

The call to register_tap_listener(...) for my case is in rtp_stream.c, which is 
located in ...\Wireshark\gtk
My tap-routines along with the global variable for the sampling-rate-defaults 
are in tap-rtp-common.c are inpacket-rtp.c  located in  
...\wireshark\epan\dissectors and finally the file where I want to use it is 
tap-rtp-common.c located in ...\wireshark\.
I believe these 3 files result in 3 different compilation targets - I haven't 
been able to access the global variable for my default-sampling-rate from 
either of the 2 other locations. Not even when exporting it from dissectors.lib.
Sorry to be so ignorant, but could you please shed some more light to get me 
started?

Thanks - and have a nice weekend!
CP.

-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to