[LiSA-Devel] MSTP inplementation in Lisa

Radu Rendec radu.rendec at mindbit.ro
Wed Jul 21 11:42:15 EEST 2010


Hello,

Sorry for the delayed response!

AF_SWITCH sockets are not used for the sole purpose of ioctl() handling.
They can also be used for passing packets back and forth to userspace.
Actually, since the switch handler is hooked early on the RX path, using
AF_SWITCH sockets is the only way to pass packets to userspace (except
for the libpcap stuff, which is hooked earlier than the switch handler).

In the latest 2.6.32 branch, there are 2 examples of such hooks, one for
Andrei Faur's RSTP and one for CDP. Have a look at sw_socket.c, function
sw_socket_filter(). Basically, you have to add your own hook for
receiving BPDUs.

Andrei's address is included in cc. Also, I encourage everybody to use
the lisa-devel mailing list (which I've included in cc as well) for any
discussion involving LiSA internals. It's a public list, the archives
can be indexed by search engines, etc.

Best regards,

Radu Rendec

On Fri, 2010-07-16 at 18:55 +0800, 李家宏 wrote:
> Hello! 
>     i am an engineer from China.I am working on the implementation of
> MSTP(Multi Spanning Tree Protocol) based on lisa. I plan to implement
> MSTP in userspace with the help of switch socket. 
>     
>     According to IEEE Std 802.1s, when bridge is to forwarding
> vlan-tagged packets, it will choose the right MSTI(Multi Spanning Tree
> Instance) as an active topology based on MST Configuration and thus
> set every switch port at the right state corresponding to that
> topology.That means first i must know from which vlan the packet is
> send , then i can choose the corresponding topology and set the swtich
> port at right state. Bust how can i get the vlan information from the
> packets when i can not get the packet through switch socket in
> userspace? 
>    And i came across one problem: i can only send and recv BPDU
> packets in userspace.While have no reach to user data packets.
>    Looking forward to your reply and thanks a lot  !
> 
>    Also i've read Andrei Faur's paper "STP/RSTP implementation in
> LiSA , and i got some questions . i want make some contact with him
> while i don't know how . Would you please help? Thanks again. 
>                                                                                 
>  sincerely
>  jamie
> 




More information about the LiSA-Devel mailing list