Ethernet Bridge development
 help / color / mirror / Atom feed
* [Bridge] Customize bridge code to set transmit interface
@ 2007-06-21 18:51 Hasan Rashid
  2007-06-21 20:17 ` Steve Lazaridis
  0 siblings, 1 reply; 2+ messages in thread
From: Hasan Rashid @ 2007-06-21 18:51 UTC (permalink / raw)
  To: bridge

[-- Attachment #1: Type: text/plain, Size: 781 bytes --]

I am trying to modify the bridge code so I can define what interfaces to
transmit data through. I added a function in brctl CLI to accept the
interface name as an argument.

 

For example:

 

brctl settransmit br0 ath0

 

Basically this is for an embedded device where I have two radios on the
device. I want to send all the outgoing traffic through ath0 (radio 1) and
use the other radio for receving ath1 (radio 2).

 

I am trying to load the net_bridge_port from the ifindex and set that as the
port for the *skb->dev->br_port in br_device.c in function br_dev_xmit. No
real success so far.

 

Any ideas on how this could be accomplished? 

 

Thank you!

 

Regards,

Hasan Rashid

Software Developer

 

Digital Path, Inc

275 Airpark Blvd suite 500

Chico, CA 95973

 


[-- Attachment #2: Type: text/html, Size: 7177 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bridge] Customize bridge code to set transmit interface
  2007-06-21 18:51 [Bridge] Customize bridge code to set transmit interface Hasan Rashid
@ 2007-06-21 20:17 ` Steve Lazaridis
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Lazaridis @ 2007-06-21 20:17 UTC (permalink / raw)
  Cc: bridge

Write a driver that hooks into the bridge code.
Drop incoming frames on ath0
Drop outgoing frames from ath1
Allow the rest.

Netfilter provides you the hook API to do this without having to hack
device.c or any other main kernel code.

Or just use ebtables and setup some rules to do that :)


Of course, you'll still receive packets on the radio, but you just won't
process them through the bridge stack.

If you want to do this type of filtering at the radio level you should
be hacking your atheros driver instead.


Regards,
Steve



Hasan Rashid wrote:
> I am trying to modify the bridge code so I can define what interfaces to
> transmit data through. I added a function in brctl CLI to accept the
> interface name as an argument.
> 
>  
> 
> For example:
> 
>  
> 
> brctl settransmit br0 ath0
> 
>  
> 
> Basically this is for an embedded device where I have two radios on the
> device. I want to send all the outgoing traffic through ath0 (radio 1)
> and use the other radio for receving ath1 (radio 2).
> 
>  
> 
> I am trying to load the net_bridge_port from the ifindex and set that as
> the port for the *skb->dev->br_port in br_device.c in function
> br_dev_xmit. No real success so far.
> 
>  
> 
> Any ideas on how this could be accomplished?
> 
>  
> 
> Thank you!
> 
>  
> 
> Regards,
> 
> *Hasan Rashid*
> 
> Software Developer
> 
>  
> 
> //Digital Path, Inc//////
> 
> 275 Airpark Blvd suite 500
> 
> Chico, CA 95973
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bridge mailing list
> Bridge@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/bridge

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-21 20:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-21 18:51 [Bridge] Customize bridge code to set transmit interface Hasan Rashid
2007-06-21 20:17 ` Steve Lazaridis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox