Home page logo
/

wireshark logo Wireshark mailing list archives

Re: how to use wireshark source code?
From: Peter Wu <lekensteyn () gmail com>
Date: Thu, 27 Mar 2014 10:10:40 +0100

Hi,

On Thursday 27 March 2014 17:05:08 我想不无聊 wrote:
I add a file named peformance.h under wireshark  main directory,


peformance.h

spelling error here (and below), it should be "performance".

#include <glib.h>


typedef struct peformance_s
{
      gfloat time[100];
              gfloat delay[100];
      guint32 packetSize[100];
      guint32 payload;
      guint32 index;
      guint32 temp_size;
      gfloat temp_time;
}peformance;
extern peformance* peformance_test;



then I modify the /epan/dissectors/packet-ieee80211.c,
#include "../../peformance.h"


then define the struct variable,
peformance pef_test;
peformance * peformance_test=&pef_test;


peformance_test->index=0;

when i execute "sudo make", it occurs to me one error ,below is the error information:

You should not run the compilation as root. Just "make" is fine.
To fix up this mistake, change the ownership of the object files to your user.

packet-ieee80211.c:94:30: error: ../../peformance.h: No such file or directory

This is a clear hint.

packet-ieee80211.c:149: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pef_test'
packet-ieee80211.c:150: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
packet-ieee80211.c:153: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token

The top-level directory is already in the headers search path. Just drop the
../..:

   #include "performance.h"

Kind regards,
Peter

___________________________________________________________________________
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 ]