On 21/02/2018 11:41, Mark Cave-Ayland wrote:
> 1) Does the new -nic syntax support multiple on-board NICs? I remember
> seeing this on some of the ARM boards I was studying when trying to
> implement something similar for SPARC.
Yes, but they will be in different subnets if you do "-nic user -nic
user". If you want to put them on the same trunk, what you want is
(cut-and-pasted from an offlist email from Thomas):
-netdev user,id=slirp \
-netdev hubport,id=port,netdev=slirp,hubid=0 \
-nic hubport,hubid=0 \
-nic hubport,hubid=0
We could make id and hubid optional (id was already optional in -net so
the logic is there already, see assign_name in net/net.c), giving the
much nicer:
-netdev user,id=slirp \
-netdev hubport,netdev=slirp \
-nic hubport \
-nic hubport
Thanks,
Paolo
> 2) Is it possible to provide a convenient wrapper function to handle the
> logic related to determining whether a specified NIC is on-board or not?