Wireshark Dissector VoidString 类型

Wireshark Dissector VoidString type

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

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

我不确定你的需求,但是根据wireshark源代码(wslua_proto_fields.c),VoidString[的定义=20=]参数是:

#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. */

因此 table 将是 "cast" 紧随 类型 并在 中打印基数表示。