Wireshark-dev: Re: [Wireshark-dev] pass some value to customized plugin
From: Fabiano Ricci <fabiano.ricci@xxxxxxxxxxx>
Date: Wed, 24 Jul 2013 09:44:07 +0200
Hi,
You can let the user configure the filter by preferences. You can find many infos here: http://wiki.wireshark.org/Preferences and in the README.dissector file. EX: //creates and initialize a global var static gint global_bit_order = 0; //creates an enumeration with your options const enum_val_t enum_gtp_market_data_feed[] = { { "Little Endian", "Decode as Little Endian", "Decode as Little Endian" }, { "Big Endian", "Decode as Big Endian", "Decode as Big Endian" }, { NULL, NULL, 0 } }; //in the proto_register function //register the preference module module = prefs_register_protocol(proto, proto_reg_handoff); //Register enum prefs_register_enum_preference(module, "bit.order", "Decode as...", "Set the bit order", &global_itch_market, enum_itch_market_data_feed, TRUE); This will create an ITEM with your protocol name in the wireshark preference window. So the user can easily configure the bit order by change preferences in Edit->Preference->Protocols->YOUPROTO window. In your code you can check the var global_bit_order to understand if the user is filtering by BIG_END or LITTLE_END. Hope this help and is what you need. Regards, Fabiano Fabiano
Ricci
|
- Follow-Ups:
- Re: [Wireshark-dev] pass some value to customized plugin
- From: Fabiano Ricci
- Re: [Wireshark-dev] pass some value to customized plugin
- References:
- [Wireshark-dev] pass some value to customized plugin
- From: Hardik Patel
- [Wireshark-dev] pass some value to customized plugin
- Prev by Date: [Wireshark-dev] pass some value to customized plugin
- Next by Date: Re: [Wireshark-dev] pass some value to customized plugin
- Previous by thread: [Wireshark-dev] pass some value to customized plugin
- Next by thread: Re: [Wireshark-dev] pass some value to customized plugin
- Index(es):
- Get Wireshark
- Download
- Code of Conduct