[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100514011435.GL18613@cel.leo>
Date: Fri, 14 May 2010 02:14:35 +0100
From: Paul LeoNerd Evans <leonerd@...nerd.org.uk>
To: netdev@...r.kernel.org
Subject: PF_PACKET + bind() to proto + outbound packets
I'm writing a small traffic watching program, to capture IPv4 packets.
If I have a PF_PACKET socket bound to no particular protocol it sees
both inbound and outbound packets; I can then apply a BPF filter for
just one protocol (i.e. IPv4).
But if instead I bind the socket to the IPv4 protocol specifically, it
no longer sees any outbound packets created by the machine, only inbound
ones.
Is there perhaps some ioctl or sockopt I could enable, to see these
outbound packets too?
Further, would there actually be much difference in practice, in terms
of performance, abilities, etc... even if this were an option turned on?
What's the preferred method of snooping on all of the machine's, for
example, IPv4 traffic?
--
Paul "LeoNerd" Evans
leonerd@...nerd.org.uk
ICQ# 4135350 | Registered Linux# 179460
http://www.leonerd.org.uk/
Download attachment "signature.asc" of type "application/pgp-signature" (191 bytes)
Powered by blists - more mailing lists