netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PF_PACKET + bind() to proto + outbound packets
@ 2010-05-14  1:14 Paul LeoNerd Evans
  0 siblings, 0 replies; only message in thread
From: Paul LeoNerd Evans @ 2010-05-14  1:14 UTC (permalink / raw)
  To: netdev

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

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@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-14  1:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14  1:14 PF_PACKET + bind() to proto + outbound packets Paul LeoNerd Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).