[Xorp-users] Multiple xorp instances performance improvements.
Pavlin Radoslavov
pavlin at icir.org
Tue Sep 18 11:16:59 PDT 2007
Ben Greear <greearb at candelatech.com> wrote:
> Pavlin Radoslavov wrote:
>
> > I don't think you can apply BPF filters on raw IP sockets.
Sorry, I should have clarified that I was thinking within the pcap(3)
framework which internally might be using BPF (depends on the
system).
> Just FYI, it appears that we *can* apply filters to IP and other
> sockets, at least on Linux, so I'm adding this to my Xorp TODO list.
For portability reasons we are using pcap(3) (for I/O purpose)
instead of the OS-specific BPF.
With the PCAP API you get a pcap handler when you use, say,
pcap_open_live(). Then all pcap operations are with that handler.
If you need a file descriptor associated with that pcap handler,
then you use the apprpriate pcap_*() function.
Said that, it is pcap itself that gives you the file descriptor
hence you cannot apply it on pre-existing socket.
Indeed, in your case you wanted to use BPF for different purpose:
filtering incoming packets.
Again, I am yet to be convinced that this is the bottleneck and is
worth the extra complexity, so I wouldn't have it too high on the
TODO list.
Thanks,
Pavlin
> Thanks,
> Ben
>
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc http://www.candelatech.com
>
> _______________________________________________
> Xorp-users mailing list
> Xorp-users at xorp.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users
More information about the Xorp-users
mailing list