Wireshark-dev: Re: [Wireshark-dev] Adding tap to dissector causes build errors in tap.h?
From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Sun, 11 Apr 2010 20:34:38 -0400
Shawn Mayer wrote:
After reverting back to the original file I found that tap.h throws errors even if the only change I make is adding the "#include <tap.h>". I've tried including it in packet-aim.c and packet-aim-messaging.c with the same results:


register.c
packet-aim-messaging.c
c:\wireshark\epan\tap.h(31) : error C2143: syntax error : missing ')' before '*'

c:\wireshark\epan\tap.h(31) : error C2081: 'packet_info' : name in formal parame
ter list illegal

Looking at one of lines the compiler is complaining about:

typedef gboolean (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data);

it seems that the references to 'packet_info' and 'epan_dissect_t' are probably the cause of the complaints.

Doing a grep for these symbols over the wireshark .h source shows that these are defined in

epan/packet_info.h
and epan/epan.h


Alternatively (and probably better): grepping the epan/dissector sources for dissector .c files which use tap.h and then examining same, it becomes clear that

including packet.h before including tap.h also works (since packet.h includes both packet_info.h and epan.h).