[Fwd: HDLC driver: Frame-relay Inverse ARP]
Hi Mr. Halasa.
I sent you a message some days ago asking for the inverse ARP implementation status in the hdlc driver.
Once I haven't received any answer, I started implementing it by myself, based on linux kernel version 2.4.17. The protocol message exchange, ARPOP_InREQUEST and ARPOP_InREPLY, is done and working fine, both being treated by arp_rcv function in arp.c file.
Now, I would like to know which action should be taken when arp_rcv (arp.c) receives an inverse ARP reply message. I thought just to add a new route to the host that sent the message, but I would prefer having your opinion about that.
I added a new paramenter in sethdlc to enable inverse arp, and just by now the pointopoint parameter in ifconfig should be set to 0.0.0.0. Thus, to setup a pvc :
sethdlc hdlc0 v35 clock ext
sethdlc hdlc0 fr lmi ansi dce t391 10 t392 15 n391 10 n392 10 n393 10 ifconfig hdlc0 0 0.0.0.0 up
sethdlc hdlc0 create 16 inverse_arp
ifconfig pvc0 10.0.0.2 pointopoint 0.0.0.0 mtu 1500 up
I attached a diff file with the changes I did, and also the sethdlc. Please analyse them and send me back your comments, and if possible, something that help me to "fill the blanks" I left as ??? in the code.
Thanks in advance.
Livio.
Greetings,
Livio Ceci <[email protected]> :
[rfc2390 for linux fr]
Quoted 3 lines
I attached a diff file with the changes I did, and also the sethdlc. Please analyse them and send me back your comments, and if possible, something that help me to "fill the blanks" I left as ??? in the code.
May be something like this:net/ipv4/arp.c
/*
* Special case: We must set Frame Relay source Q.922 address
*/
if (dev_type == ARPHRD_DLCI) {
sha = dev->broadcast;
if (arp->ar_op == __constant_htons(ARPOP_InREQUEST)) {
/*
* Use fib_lookup in order to comply with
* address selection in rfc2390 - 7.1 and
* set tip consequently
*/
...
} else if (arp->ar_op == __constant_htons(ARPOP_InREPLY))
arp->ar_op = ARPOP_REPLY;
}Then one forces ARPOP_InREQUEST to follow the same path as ARPOP_REQUEST, arp_send(ARPOP_InREPLY,...) being the sole difference.
^^
Remarks ?
Signature · 1 line
Ueimor