netdev
[Top] [All Lists]

forwarding packets

To: netdev <netdev@xxxxxxxxxxx>
Subject: forwarding packets
From: Rabeeh Khoury <rabeeh@xxxxxxxxxxxxx>
Date: Tue, 19 Sep 2000 14:14:37 -0400
Reply-to: rabeeh@xxxxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
Hi All

I am working on a Galileo Technology evaluation board. I'm writing
ethernet driver for our embedded systems and I have to ethernet ports.

I need to ask if there is a way for implementing the following scenario
for the ethernet drivers to be activated as two ethernet ports router :

1.. The ethernet driver receives a packet
2.. The ethernet driver checks if the packet should be forwarded to
another interface. The checking is done by query to the kernel routing
table.
3.. If the packet should be forwarded, the ethernet driver queues the
packet to the destination interface with slight changes (source and
destination MAC addresses).

If this scenario possible, please send me the functions that I should
use. (dev_queue_xmit for queing a packet to another interface ??!!)

The main motive in this scenario is that I don't want that the packet to
be handed to the kernel IP stack, then to decide if it should be routed
or not ; I want from the ethernet driver to know if the packet should be
routed or not, and if to be routed to which interface.

Another question :
How can I know from the sk_buff when handed to the ethernet driver, if
it is a routed packet or it's origin is from the local CPU ?

p.s. I'm using kernel 2.2.14 (MIPS based CPU)

Regards,
Rabea Khoury

Attachment: rabeeh.vcf
Description: Card for Rabeeh Khoury

<Prev in Thread] Current Thread [Next in Thread>