I'm not going to have too much information to give you, unfortunately. I would think that this is an area more for embedded logic on routers. I couldn't begin to tell you what the predominant language is in that kind of situation. Hopefully someone else will know more.
If you are talking about programming a router or similar to which you can write to the processors program instructions memory, it all depends on the processor in use. such as most 8051's (its definately not one of those) only support regular C (some enhanced 8051's have native java support), however some of the more high end processors use C++ (arm core processors) possibly Cypress PSOC also use C++ i only used C with them, and some embedded processors actually run java.
So once you know how to write to the instruction memory and the language the particular device's processor wants and or supports, the its just a matter of writing the code but it can be done. I have a full 802.15.4 libary that enables MAC filtering, CCA, Auto ACK, limited retires (3 by default), channel activity scanning and hopping to less busy channels etc. All in normal C using a C8051F120 core with a CC2420 wireless module.
So what im saying is that if you have the hardware and the facilities to program it then you can impliment whatever you like on it with or without OS support (i implimented most of my libary with no OS on the processor, never got around to porting he code beyond MAC filtering onto the Salvo RTOS im to lazy :) )