[vbox-dev] Using Sockets in Device emulation
klaus.espenlaub at oracle.com
Mon Sep 19 10:34:04 PDT 2011
On 16.09.2011 22:20, Arpit Patel wrote:
> I wanted to use tcp sockets from Device Emulation (eg. DevAHCI.cpp) and
> connect to a socket server running on one of the Guest OS or to another
> system on the network. I have following questions -
DevAHCI is a rather complex device... which means it's not the ideal
What do you actually want to achieve? Accessing remote storage? It would
help a lot of you'd say a few words about your general idea before
setting out to implement it.
> 1. Would this kind of socket comm possible from Device Emulation code?
> 2. As device emulation code runs in Ring0 mode, if I try to even include
> iprt/sockets.h file, it complains that RTSocket APIs are not available
> in Ring-0 context. If that is so, what sockets can I use from within
> Device Emulation code?
> 3. How do I know which code of Virtualbox is running in Ring0 and which
> is running in Ring3? I was under the impression that the vbox host
> drivers that are built and installed on the host OS is the only code
> that runs in Ring0 and everything else should be Ring3.
> 4. Is there any sample code of this socket comm that can be used from
> device emulation in virtualbox, that you can point me to?.
In general you need to make sure that the socket code is ONLY used by
Ring3 code, then it would compile. However this all may be unnecessary
if you actually want a new storage "format".
> vbox-dev mailing list
> vbox-dev at virtualbox.org
Dr. Klaus Espenlaub | Snr. Manager Software Development Desktop
Phone: +49 7151 60405 205 <tel:+49715160405205>
Oracle VM VirtualBox
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt
ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
More information about the vbox-dev