William Stearns wrote:
> Good day, Marius,
> On Wed, 8 May 2002, Marius Bernklev wrote:
> > It would be _very_ nice if one could give uml an entire network
> > interface. i.e. "linux eth0=eth1" would give the user mode kernel
> > total control of the host's eth1. I can see three uses for this, you
> > can probably think of more.
How about using a PACKET socket? It allows you to send and receive raw packets on an ethernet
interface. It would be trivial to write the UML PACKET socket ethernet driver...
If you put the ethernet card into promiscues mode and are prepared to handle the ethernet address
filtering yourself, you can even add more than one uml-ethX to a single ethernetcard. Both on the
real wire and inside the UML, it will look like two different ethernet cards on the same LAN.
AFAIK, you can even use the ethernet card in the host kernel at the same time.
I have used this PACKET socket to write a little daemon that, amongst other things, could create
hundreds of virtual ethernet cards, all with different MAC's, on a single hardware ethernet card.
The only disadvantage is that you need root permission to open such a socket.