gpt4 book ai didi

c++ - Wireshark Dissector VoidString 类型

转载 作者:行者123 更新时间:2023-11-28 04:23:39 25 4
gpt4 key购买 nike

我正在为一个高级项目开发 Wireshark Dissector Generator。我读了一些书,但对 ProtoField 对象中的 VoidString 对象有疑问。 documentation对这个特定值或其用途不太清楚。

我们的生成器使用 C++,以便我们的客户可以在项目完成后对其进行修改。我正在阅读另一个线程 here它可以传递一个键值对表。此参数是否用于其他结构或信息?我们正在尝试制作一个数据结构来包含对用户传递的文件的解析,并且我们正在尝试确定如何最好地制作这个对象。允许在此处传递模板对象会更好还是表格是否足够?

最佳答案

我不确定是否理解您的需求,但根据 wireshark 源代码 (wslua_proto_fields.c),VoidString 参数的定义是:

#define WSLUA_OPTARG_ProtoField_new_VALUESTRING 4 /* A table containing the text that
corresponds to the values, or a table containing unit name for the values if base is
`base.UNIT_STRING`, or one of `frametype.NONE`, `frametype.REQUEST`, `frametype.RESPONSE`,
`frametype.ACK` or `frametype.DUP_ACK` if field type is ftypes.FRAMENUM. */

因此表格将“转换”类型之后并以基本表示形式打印。

关于c++ - Wireshark Dissector VoidString 类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54933084/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com