0
我面临着一个奇怪的问题的libpcap:印刷TCP源端口和目的端口
检索TCP报头,并试图打印源端口和目的端口 代码:
src_p = tcp->th_sport;
dest_p = tcp->th_dport;
output (in hex):
8e08 and 64a2
Wireshark的表示,端口是 088e和a264
为什么libpcap交换字节? 或者我的代码有问题吗? PS:我使用this program中显示的结构。