我正在为不对数据进行hton编码的协议(protocol)编写Wireshark Dissector插件,并且我需要提取64位数据值而不进行任何字节序转换。

Wireshark库中是否包含不执行tvb_get_ntoh64ntoh版本?

最佳答案

我找到了自己问题的答案。 Wireshark文档\ wireshark \ doc \ README.developer解决了此问题:



在查看tvbuff.h时,我还看到了其他口味:

extern guint16 tvb_get_letohs(tvbuff_t*, const gint offset);
extern guint32 tvb_get_letoh24(tvbuff_t*, const gint offset);
extern guint32 tvb_get_letohl(tvbuff_t*, const gint offset);
extern guint64 tvb_get_letoh64(tvbuff_t*, const gint offset);

发布信息,以便将来有人问这个问题的人都能找到答案。

关于c++ - Wireshark插件:是否有tvb_get_ntoh64的非ntoh版本?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2930111/

10-10 14:19