Home page logo

wireshark logo Wireshark mailing list archives

Re: how to add a struct in wireshark?
From: Guy Harris <guy () alum mit edu>
Date: Sat, 29 Mar 2014 11:07:55 -0700

On Mar 29, 2014, at 2:12 AM, "??????????" <237825552 () qq com> wrote:

what should i do to create a struct and use it in different files?

Do you want to have a single global "performance_test" structure?

If so, do

        extern performance performance_test;

in performance.h, do

        performance_test.index = 0;

rather than

        performance_test->index = 0;

in epan/dissectors/packet-ieee80211.c and, in at least one source file, make sure you include "performance.h" *AND* do

        performance performance_test;

so that it's not just declared, but defined, in at least one file.
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]