Is it possible to work with layer 2 or 3 protocols like OSPF, LLDP, STP?

It would have to be implemented, but in general it should be possible if you compare it to GRE and other lower layers that are already supported to some extent.