Spanning Tree Protocol (STP) in FreeRTOS

Hi All, I am currently working on a project related to implement an STP protocol on a CPU (I used LM3S6965 ARM Cortex-M3 and FreeRTOS v5.0.3). First, I wonder if there were any hint and sample of performing STP posted in FreeRTOS in previous. Second, I would to learn how to receive/trans a BPDU (Bridge Protocol Data Unit, a Layer 2 frame) through an Ethernet port on the CPU or a function in FreeRTOS can read/write the packet of BPDU. I understood the STP algorithm on a network, but I hope I can get some helps or hints from this community. Thanks a lot. Bill Yang