Hello,
First of all I'm not
sure this is the place to ask this question. If it's not, I'm sorry. Any pointer
to a more relevant place on the web is appreciated.
When I capture a
packet with libpcap, how can I tell if the packets is incoming or
outgoing?
The struct which is
returned with every captured packet, pcap_pkthdr, does not contains this
information. The stats structure, pcap_stat, seems to do.
Do I need to call
the function which fills the stats struct for every packet I capture so I can
tell then if it's incoming or outgoing? Or is there a better way to this?
I don't want to make
any assumptions based on data that may or may be not present in the
packet.
Any help
appreciated,
Max
