Can you please explain what you mean with sending 'raw data to the ethernet ports'?
If you mean sending Ethernet frames containing whatever data (payload) you want, that's quite possible, just create and use a RAW Ethernet socket in your software. You can find more info about how to do that (including sample code) here. Another example is in the source code for EtherPuppet (see below).
If you mean controlling the signals going in and out of the port right down to the signal element level (like turning it into a superfast RS-485 port), I don't know if that's possible. Usually the hardware (and the driver) is 'wired' (sorry about the pun) to transmit and receive Ethernet frames, so that's what it will do best.
Assuming you do want to send/receive raw Ethernet frames: if you just want to do some testing first before you unleash your software onto your unsuspecting router, you could consider using EtherPuppet. EtherPuppet is a small program for Linux that will create a virtual interface (TUN/TAP) on one machine from the ethernet interface of another machine through a TCP connection. Everything seen by the real interface will be seen by the virtual one. Everything sent to the virtual interface will be emitted by the real one. More info on EtherPuppet on OpenWRT is in this thread.
This way you can hook up your microcontrollor to a free port on your router, setup EtherPuppet as 'puppet' on your router to take full control of that port, setup EtherPuppet as 'puppet master' on a PC which has network access to your router (this will even work over the Internet or wireless network), and use your microcontroller test/control software on that PC as if the microcontroller was hooked up directly to the PC's network card.
Note: if the ports on your router are bridged together, you may need to remove the port which your microcontroller is connected to from that bridge so devices connected to other ports don't get confused by the data format you use to communicate with the microcontroller.
When everything works as you want, you can cross-compile your software for your router's flavour of OpenWRT and run it on your router.
Hopefully this answers your question :-)
(Last edited by ack on 24 Feb 2011, 19:43)