Wireshark-dev: Re: [Wireshark-dev] was: Adding Files to Wireshark (new developer)

From: "Chaswi Przellczyk" <cp70@xxxxxx>
Date: Fri, 01 Apr 2011 18:57:00 +0200
-------- Original-Nachricht --------
> Datum: Fri, 1 Apr 2011 09:43:28 -0600
> Von: Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx>
> An: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
> Betreff: Re: [Wireshark-dev] (no subject)

> On Thu, Mar 31, 2011 at 10:38:52AM +0200, Chaswi Przellczyk wrote:
> 
> > At the end of tap-rtp-common.c is a function called int 
> > rtp_packet_analyse(...). Inside rtp_packet_analyse when you go down to 
> > /* Dynamic PT */ and go to the else of that if, there is a statement 
> > that says
> 
> > clock_rate = 0;
> 
> It sounds like you should add a standard Wirshark preference.  See the 
> README.developer file in the doc directory of the source code for more 
> details.
> 
> 

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"?

Thanks a lot for the hint!

Regards - and have a nice weekend,
CP.

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de