【发布时间】:2015-12-23 05:35:54
【问题描述】:
我遇到了一个奇怪的问题
正在检索 tcp 标头并尝试打印源端口和目标端口 代码:
src_p = tcp->th_sport;
dest_p = tcp->th_dport;
output (in hex):
8e08 and 64a2
wireshark 显示端口是 088e和a264
为什么 libpcap 交换字节? 还是我的代码有问题?
PS:我正在使用this program 中显示的结构。
【问题讨论】: