Hello to everyone.
Just for educational purposes I've virtualized MacOS with Virtualbox in FreeBSD. Problem is that Virtualbox does not support the USB 3.0/3.1 plugin/addon. So,I've thought to some ideas to overcome the problem. My idea is to use a tool called USB over IP,sharing the USB disks I have from an OS that can mount them to the MacOS that / which can't. At the beginning my idea was to install the server part on a bhyve virtual machine,let's say for example Linux or Windows. But I've soon realized that I can't run both bhyve and VirtualBOX at the same time. (if someone knows about a trick to do it,please share it :p) ; so,the only place where I can install it is on FreeBSD itself and I will install the client on the MacOS. And since there is no known USB over IP tool which can run on it (again : if someone knows about it,please share it), I'm evaluating virtualhere usb server :
and I tried to install it with the linuxulator. Surprisingly it started,but unfortunately it reported another error,telling that it can't find an IP protocol to communicate with the client :
VirtualHere USB Server is running...press CTRL-C to stop
setsockopt - IP_PKTINFO: Protocol not available
what to do here to fix it ?
As far as I remember, the option IP_PKTINFO does not exist in the FreeBSD kernel, so to emulate it we first have to implement it in our network stack.
What matters here is #network's opinion, do we need this feature or not?
yes,I need it. I find very comfortable to share the USB disks from freebsd to any guest OS using the virtualhere usb/ip tool. Despite the network protocol error,it seems that it can start without so much problems. So,why not adding a new feature to freebsd ? sharing usb drives from freebsd host and a virtualbox vm is nice. This can be the only way to do that, because virtualbox does not support the usb 2 and 3 addon. So,passing thrue an USB disk with it will result in a very slow speed (1.0 !).
(In reply to mario felicioni from comment #2)
well, I'll try. There's nothing difficult here, except for this one:
If IP_PKTINFO is passed to sendmsg(2) and ipi_spec_dst is not zero, then it is used as the local source address for the routing table lookup and for setting up IP source route options. When ipi_ifindex is not zero, the primary local address of the interface specified by the index overwrites ipi_spec_dst for the routing table lookup.
Perhaps I will omit this.