Re: overriding ARP protocol in module

Andi Kleen (ak@muc.de)
27 Sep 1999 12:06:28 +0200


dpz@pobox.com (Daniel P. Zepeda) writes:

> Hello,
> I sent a message to this list a few weeks ago about creating a
> module to modify the behaviour of the ARP protocol, as I'm helping to
> experiment with different routing protocols in this manner. I got several
> suggestions, one that I liked the best was to use dev_add_pack() to
> register my module as the handler for that particular type of packet.
>
> My new question is, when I insert my module and it registers to
> handle ARP packets, doesn't the original ARP code get the packet as well?
> Would it be better to hook my module in through
> register_firewall() instead? As I understand it, this would then bypass the
> original ARP code completely, is that correct?

The original ARP code gets it as well. dev_add_pack behaves like you
start a tcpdump (PF_PACKET) on a interface - other processes still see the
data. BTW, it is quite likely that you can implement it in user space
as well using these sockets. That should be handy at least for the prototype.

Also register_firewall never sees ARP packets, because ARP firewalling
is not implemented.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/