diff options
author | guy <guy> | 2000-10-25 07:46:49 +0000 |
---|---|---|
committer | guy <guy> | 2000-10-25 07:46:49 +0000 |
commit | 188fee53ccbbe6b11e84ae01b10955205be5ac62 (patch) | |
tree | 14a2efbcdd623ef403f55637ec99daf12b9bd220 /pcap-int.h | |
parent | 5c4a9505073aa4221706ef489a7efdb68521edfd (diff) | |
download | libpcap-188fee53ccbbe6b11e84ae01b10955205be5ac62.tar.gz |
If we're receiving packets from a PF_PACKET socket, check whether the
interface index of the interface for the packet is the interface index
of the loopback interface and, if it is, check if the packet is an
outgoing packet; if so, ignore it, as we'll also be seeing that packet
as a received packet.
If we don't handle the arphrd type of an interface, and fall back on
cooked mode, report the arphrd type, so we know what type we should
consider supporting (if that type can't be supported well, e.g. if you
don't get any link-layer header, as happens with PPP, we'd be silent).
Diffstat (limited to 'pcap-int.h')
-rw-r--r-- | pcap-int.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#) $Header: /tcpdump/master/libpcap/pcap-int.h,v 1.28 2000-09-19 03:28:10 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/libpcap/pcap-int.h,v 1.29 2000-10-25 07:46:49 guy Exp $ (LBL) */ #ifndef pcap_int_h @@ -67,6 +67,7 @@ struct pcap_md { int sock_packet; /* using Linux 2.0 compatible interface */ int timeout; /* timeout specified to pcap_open_live */ int promisc; /* running in promiscuous mode */ + int lo_ifindex; /* interface index of the loopback device */ char *device; /* device name */ #endif }; |