I'm using libpcap in C++ for reading packets from pcap files, e.g.:
rc = pcap_next_ex((pcap_t*)handle, &header, (const unsigned char**)packet);
I would like to parse the packets header (without the payload).
For example, how can I parse a given packet in order to extract its source and destintation ip addresses?
thanks