Ethereal-dev: Re: [Ethereal-dev] how to access a global variable defined inwiretap(new format)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Ravi Kondamuru" <ravikondamuru@xxxxxxxxx>
Date: Wed, 24 May 2006 16:22:34 -0700
Actually I feel the other way. Even if it is the trace file property, I wouldnt want to use a global variable.

You could have a static global variable that is set in your wiretap _open() function. And on each call to your wiretap _seek_read() you could set the pseudo_header->endian_type value to the global variable. Just one additional assignment for each packet.

I still feel passing through the pseudo_header is a good way!! :)

Ravi.

On 5/24/06, Raman Singla < ramans@xxxxxxxxxxxxxxxxxxx> wrote:
Peudo_header means we are passign information for every packet whereas say for example we just want to pass whether packet are in big/little format or some specific information which is applicable to whole trace (all the packets). passing infomation in Pseudo_header is not gud option in such type of cases.
----- Original Message -----
Sent: 2006 May 25 4:08 AM
Subject: Re: [Ethereal-dev] how to access a global variable defined inwiretap(new format) from epan/dissector

The best way in my opinion will be to pass such infromation through the pseudo_header defined for your format.

Will this be an entire trace file specific property or one that varies for each packet in the file?

Thanks,
Ravi.

On 5/24/06, Raman Singla <ramans@xxxxxxxxxxxxxxxxxxx> wrote:
hi
I have written a new capture format(dec-trace) which reads from saved file & corresponding dissector.
 
Since dec-trace can be in either of big/little format. so i want to pass this global variable from wiretap (where it will read endian type)  to epan/dissector (where value of this variable will be read by dissector & based on that decoding will take place).
 
It was workign on linux platform very well,
but as i building the same on Windows platform using msvc it is showing linking problem. unresolved reference.
 
/******************** I m not sure but this could be the reason ***********/
When i tried to go in deep it could be b'cos of dissector.lib. since linker tries to resolves it within dissector.lib.
/**************************************************************************************/
 
what could be the way access global variable defined in wiretap ?
 
regards,
Raman
Ext - 1667

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




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


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



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