--- Ravi Samprathi <[EMAIL PROTECTED]> wrote:
> See inline please..
> 
> On Thu, 16 May 2002, Anand S wrote:
> 
> > We are implementing a user space router for Linux
> >
> >
> **************************************************
> > out architecture is as follows
> >
> >            User Space Router architecture
> >     ------------------------------
> >
> > Incoming packet -> NETFILTER -> Queued
> >                                 packet  -
> >                                 handler  |
> >                                          |
> >                                          v
> >  reinject   <- device driver   <-  User space
> >  into kernel   for reinjection     router
> 
> From the device driver, you can make direct call to
> the interrupt routine netif_rx(), which eventually,
> thru
> bh ends up calling net_rx_action in net/core/dev.c.
> Is this what you are looking for?


***
we thought of calling ip_finish_output() or
deve_queue_xmit() insted - will it make any
difference? in any case could any one tell what are
the fields in the skb and perticulerly skb->dst that i
need to fill up before calling these functions ( we
capture packets from NF_IP_PREROUTING)

***

> >      |
> >      V
> >  packet goes out
> >
> >
> > We have implemented the "Queued packet handler" to
> > take the packets given by NETFILTER and gives it
> to
> > the user space program
> >
> > The "user space routing program" takes the routing
> > decision and write the packet back using write()
> of
> > the device driver.
> >
> > write() calls NETFILTER's nf_reinject() to put the
> > packet back on track
> >
> >
>
*******************************************************The
> > problem we have is:
> >
> > We want to indicate the next hop IP address for
> the
> > packet while reinjecting through nf_reinject(),
> i.e.
> > We want the forwarding to be done based on the IP
> > address supplied by the user space program
> >
> >
>
*******************************************************
> > how do we do this ?
> >
> > We could think of these ways
> >   1. setting skb->dst to correspond to the
> >information about this IP address
>
> If you setup skb->dst yourself, you can call
> ip_route_output(),
> since at this point, you already have the info about
> the route
> (next hop).
> 
> >   2. directly call ip_route_input() with proper
> > parameters
> >   3. lookup the information about this IP address
> from
> > the kernel's routing table
> 
> You have to do this anyways todo [1] above.
>
> >
> > Is any of these feasible ?
> > Is there a better way ?
> 
> Do you indicate netfilter about your stolen packet?
> 
> >
>
*******************************************************
> > THANKS IN ADVANCE
> >
> > __________________________________________________
> > Do You Yahoo!?
> > LAUNCH - Your Yahoo! Music Experience
> > http://launch.yahoo.com
> >
> >
> 
> 

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

Reply via email to