Ethernet Bridge development
 help / color / mirror / Atom feed
* [Bridge] Information needed about bridge c code
@ 2006-02-01  9:31 Louis Croisez
  2006-02-09 17:18 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Louis Croisez @ 2006-02-01  9:31 UTC (permalink / raw)
  To: bridge

Hello,
i need to write a little personal patch in the bridge code.
For this patch, i need to know the original src and dst mac addresses
of the packet incoming to the bridge. As i work on a brouter (some
packets are bridged, some are routed based on ebtable rules), packets
that are routed have their mac addresses modified by the IP stack).

I put a software probe in br_input.c::br_handle_frame( ), but there,
the dst mac address is already replaced by the bridge local mac
address.
My question is: where must i put the probe to get the original src and
dst mac addresses? At the driver level? In the bridge, but where?

Thx in advance.
PS: please CC  to louis.croisezATgmail.com, because i am receiving the
digest once per day.


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

* Re: [Bridge] Information needed about bridge c code
  2006-02-01  9:31 [Bridge] Information needed about bridge c code Louis Croisez
@ 2006-02-09 17:18 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2006-02-09 17:18 UTC (permalink / raw)
  To: Louis Croisez; +Cc: bridge

On Wed, 1 Feb 2006 10:31:07 +0100
Louis Croisez <louis.croisez@gmail.com> wrote:

> Hello,
> i need to write a little personal patch in the bridge code.
> For this patch, i need to know the original src and dst mac addresses
> of the packet incoming to the bridge. As i work on a brouter (some
> packets are bridged, some are routed based on ebtable rules), packets
> that are routed have their mac addresses modified by the IP stack).

At start of br_handle_frame, dst mac address in skb is as received on
wire. Call sequence is:

netif_receive_skb
	handle_bridge
		br_handle_frame
			
The skb on the pre-routing chain is actually after brouting but before
going through bridge forwarding.

> I put a software probe in br_input.c::br_handle_frame( ), but there,
> the dst mac address is already replaced by the bridge local mac
> address.
> My question is: where must i put the probe to get the original src and
> dst mac addresses? At the driver level? In the bridge, but where?
> 
> Thx in advance.
> PS: please CC  to louis.croisezATgmail.com, because i am receiving the
> digest once per day.
> 
> _______________________________________________
> Bridge mailing list
> Bridge@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/bridge


-- 
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger

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

end of thread, other threads:[~2006-02-09 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-01  9:31 [Bridge] Information needed about bridge c code Louis Croisez
2006-02-09 17:18 ` Stephen Hemminger

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