mailing list archives
?????? how to use the wire shark source code to developapplication?
From: "??????????" <237825552 () qq com>
Date: Sun, 30 Mar 2014 17:44:58 +0800
ok,I will try,thank you so much!
------------------ ???????? ------------------
??????: "Pascal Quantin";<pascal.quantin () gmail com>;
????????: 2014??3??30??(??????) ????5:06
??????: "Developer support list for Wireshark"<wireshark-dev () wireshark org>;
????: Re: [Wireshark-dev] how to use the wireshark source code to developapplication?
Le 30 mars 2014 08:58, "??????????" <237825552 () qq com> a ??crit :
I want to store some information about packets and transmit among files,so i create a file in wireshark root
typedef struct performance_s
extern peformance* performance_test;
in the file ,i declare a struct and declare a pointer to it,then i want to use the variable "performance_test" in
file wiretap/libpcap.c, epan/dissectors/packet-ieee80211.c,so i define the variable "peformance_test" in
performance.c in wireshark root directory and include the head file in wiretap/libpcap.c,
epan/dissectors/packet-ieee80211.c ,but once i use the variable in these two files,when i compile the wireshark
project,it come up with one error:undefined reference to 'peformance_test'.
it looks like the variable peformance_test should be defined and used in the same file ,if i want to use it in
different files,i think i should modify the makefile.common to change the compile process ,but i don't know how
.could someone help me fix it,please!
Assuming you work on the master branch (Wireshark 1.11.X), if you want to use in libwireshark a variable defined in
libwiretap, you should export the symbol with the WS_DLL_PUBLIC macro instead of using extern. Do not forget to include
ws_symbol_export.h file also.
You can search in the code for examples of the use of this macro.
Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org>
mailto:wireshark-dev-request () wireshark org?subject=unsubscribe