Plugins 错误:无效使用不完整的类型';tvbuff\u t

Plugins 错误:无效使用不完整的类型';tvbuff\u t,plugins,makefile,wireshark,wireshark-dissector,Plugins,Makefile,Wireshark,Wireshark Dissector,我正试图用新的wireshark源代码构建一个旧的剖析器,但我面临这个编译问题,无法解决它 更多日志: packet-xxx.cpp:467:7: error: invalid use of incomplete type 'tvbuff_t {aka struct tvbuff}' In file included from ../../epan/proto.h:51:0, from ../../epan/packet.h:29,

我正试图用新的wireshark源代码构建一个旧的剖析器,但我面临这个编译问题,无法解决它

更多日志:

packet-xxx.cpp:467:7: error: invalid use of incomplete type 'tvbuff_t {aka struct tvbuff}'
In file included from ../../epan/proto.h:51:0,
                 from ../../epan/packet.h:29,
                 from packet-xxx.cpp:51:
../../epan/tvbuff.h:64:8: error: forward declaration of 'tvbuff_t {aka struct tvbuff}'
make: *** [packet-xxx.lo] Error 1

创建了
tvbuff\u t
,因此在解析器代码中不再允许直接访问其成员。对于需要访问的任何属性,请使用
tvb\u length(tvb)
等,而不是
tvb->length


这在Wireshark的问答网站上得到了回答。

Wireshark中还存在这种类型吗?它是否移动了标题,您需要添加正确的include?标题仍然存在/epan/tvbuff.hIndeed。在回来再次查看错误后,我意识到这可能是问题所在,我只是还没有对其做出回答(或者试图证实我的怀疑)。