lkml.org 
[lkml]   [1999]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Modularizing ARP?
Date
In article <Pine.GSO.3.95.990908135940.22108A-100000@ten10> you wrote:
> functions. What I was envisioning is having the "original" ARP code
> running, then insmod my updated module that would override the "original"
> ARP code.

You could use the arpd user mode solution. In recent kernels ARP is
implemented as a neighboring cache.

You can use dev_add_pack() in a module to receive arp requests (like
__initfunc does in arp.c)

---
static struct packet_type arp_packet_type =
{
__constant_htons(ETH_P_ARP),
NULL, /* All devices */
arp_rcv,
NULL,
NULL
};

__initfunc(void arp_init (void))
{
neigh_table_init(&arp_tbl);
dev_add_pack(&arp_packet_type);
...
---


Greetings
Bernd

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.039 / U:2.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site