How to insert layer between network dev driver and IP?

From: Damir Cosic (damir@fatpipeinc.com)
Date: Mon Jan 10 2000 - 18:31:45 EST


I am working on a program that should have some NAT functionality and to
me the most natural place for it would be between network device driver
and IP part (any other suggestions?) Also, I'd like to write it as a
module. Kernel version is 2.2.14.

1. Is it possible to write kernel module which would insert itself in
between network device driver and IP part?

2. For transmission part, can I replace network device hard_start_xmit
pointer with pointer to my function (which would call the original
driver's hard_start_xmit, after some processing is done)? Can I do that
from the initialization routine of my module?

3. How can I insert new layer in receiving part? I know that driver
calls netif_rx in order to pass skb to upper level, but how can I change
that?

Any hints, tips, or pointers to more info would be greatly appreciated.
Thanks!

Damir

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



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:17 EST