Currently virtio-net is choosing the backend for virtio-net by the prefix of
the inteface. This patch allow an addition option "type" to choose backend type
explicitly. This allowed greater flexibility for end users to manage bhyve
specific resources (such as by naming the tap interfaces to more descriptive
names). The option "type" is optional. When it is not presented, the backend
will be derived by the name of the backend interface.
For example, the line `-s 3,virtio-net,bsdvm0,type=tap` will create a
virtio-net device for the guest using the tap interface "bsdvm0".
The idea behind adding the option "type" is to preserve the consistency
between the current (legacy) format. Which the next value after virtio-net
is set to be an identifier of an instance of a backend.
A drawback of this apporach is that; since tap interfaces cannot be created by
opening non "tap" prefixed device, if the backend tap interface is not presented
and such interface is not prefixed with "tap*", bhyve cannot automatically
create it. Since bhyve does not create the interfaces for other backends anyway,
it shouldn't be a big issue.