fragglet / ipxbox

Standalone DOSbox IPX-over-UDP server
GNU General Public License v2.0
69 stars 6 forks source link

Allow For Selection of TAP Device Number #22

Open joeHeartsmith opened 1 year ago

joeHeartsmith commented 1 year ago

For servers with multiple TAP/TUN devices, most utilities offer the ability to select the numerical ID for the device they wish to create (i.e. tap5 vs tap0). Could this functionality be added with the ability to supply an ID as a command-line argument?

fragglet commented 1 year ago

Thanks for the suggestion. Taking a look at the water library that ipxbox uses for creating TAP devices, it looks like this is possible but rather complicated because it needs to be done individually on a per-OS basis:

https://github.com/songgao/water/blob/master/if.go#L37

Would having this feature solve an immediate problem you have or is it just a "nice to have" feature request?

joeHeartsmith commented 1 year ago

This is nothing critical - just for easier management of a server with multiple TAP devices. I'm not too familiar with Go and assumed it might be as simple as it is in C. Definitely something I can script around without any issue.