I am facing a weird problem
retrieving tcp header and trying to print source and destination ports code :
src_p = tcp->th_sport;
dest_p = tcp->th_dport;
output (in hex):
8e08 and 64a2
wireshark shows that the ports are 088e and a264
why is libpcap swapping the bytes? or is there something wrong with my code?
PS: I am using structs shown in this program.