Page 1 of 1
finding the names of the host's network adapters
Posted: 13. Jun 2012, 18:44
by adrianh
Is there a way to find the names of the host's network adapters so that through some scripting means I can bridge to them automagically?
Re: finding the names of the host's network adapters
Posted: 13. Jun 2012, 19:07
by Perryg
As mentioned before yes. Whether or not you can actually do this is depending on your programming abilities. The method that VirtualBox uses can be found in the source code located
HERE, but there are a lot of other examples.
Re: finding the names of the host's network adapters
Posted: 13. Jun 2012, 19:11
by adrianh
I meant with the tools currently available without modifying the source.
Re: finding the names of the host's network adapters
Posted: 13. Jun 2012, 19:18
by Perryg
Who said anything about modifying the source? You asked if it was possible and it is. The source shows you one way. Or there are other ways, and you can even build your own.
Re: finding the names of the host's network adapters
Posted: 13. Jun 2012, 19:26
by adrianh
Ok, so what you are saying is, that buried in the source is some place that contains the data that I'm looking for where I can trace back to some interface somewhere to get the names of the host adapters?
Do you have an engineering document of the system's structure? This would be a lot to have to go through to find out how to do this.
Or perhaps I'm not understanding your suggestion?
Re: finding the names of the host's network adapters
Posted: 13. Jun 2012, 19:32
by Perryg
It is fairly well spelled out and easy to follow the structure, or you can download the
SDK
Google also has a lot of entries on how to detect network adapters. (format specific and generic).
Re: finding the names of the host's network adapters
Posted: 13. Jun 2012, 19:51
by mpack
@adrianh: I think the problem here is that you are asking how to perform a host OS function (enumerating available devices), using VirtualBox. In fact that isn't VirtualBox's purpose, you should be asking your Q on a appropriate developers forum for the host OS.
Re: finding the names of the host's network adapters
Posted: 13. Jun 2012, 20:04
by Perryg
That and it is still not going to solve the issue unless you modify the VBox source to accept the newly found data.
Re: finding the names of the host's network adapters
Posted: 15. Jun 2012, 20:02
by adrianh
All I'm asking for is to find the names of the local physical network devices as understood by virtualbox so that I can use VBoxManage to attach them to the guest OS's VM.
Why is that so difficult? It shouldn't be Host OS dependent.
Re: finding the names of the host's network adapters
Posted: 15. Jun 2012, 23:12
by adrianh
mpack wrote:@adrianh: I think the problem here is that you are asking how to perform a host OS function (enumerating available devices), using VirtualBox. In fact that isn't VirtualBox's purpose, you should be asking your Q on a appropriate developers forum for the host OS.
adrianh wrote:All I'm asking for is to find the names of the local physical network devices as understood by virtualbox so that I can use VBoxManage to attach them to the guest OS's VM.
Why is that so difficult? It shouldn't be Host OS dependent.
BTW, I'm saying it shouldn't be Host OS dependent since if I'm using the VBoxManage interface, it should be able to state the parameters that it would accept if they aren't something as simple as an enumeration. Why should it be something that needs to be interrogated from the Host OS?