Trying to create a project that access a pcap file and prints ETH add, IP add and TCP/UDP. For a reason when I'm doing...
int ether_type = ((int)(pkt_pointer[12]) << 8) | (int)pkt_pointer[13]; if(ether_type == ETHERTYPE_IP) offset = 14; else offset = ?; pkt_pointer += offset;Getting BUS ERROR. I know that error happening on the last line, but can't solve it. Any idea? Also, how many will be the offset in the else statement? Else refer to ETHETYPE_ARP.
Thank you


Sign In
Create Account


Back to top









