29.06.2013 11:01, Mateusz Viste пишет:
>
> Stas Sergeev <s...@list.ru> wrote:
>> 29.06.2013 01:10, Mateusz Viste пишет:
>>> In fact, I don't think embedding slirp is a good thing anymore.
>> Yes but we need to be realistic.
>> We can embed slirp and clearly state that this is a temporary
>> solution until someone (of qemu) not to push the package out
>> of it. :)
> That sounds quite reasonable. Altough I am a bit scared - yesterday I managed 
> to compile slirt as a standalone .a library, the problem is that it uses 
> plenty of global stuff and functions named exactly as in dosemu, so my linker 
> was complaining a lot (and after integration it either made dosemu 
> immediately segfault or simply networking wasn't working). That's the main 
> reason why I brought the dosemu.slirp idea - to be safe, and avoid the risk 
> of breaking dosemu with some nasty border effects.. But maybe is there any 
> another (safer) way to embed an executable than a static .a file..? A way 
> that would allow to expose only specific functions to the linker?
The only simple solution I know is to use .so.
The problem of exposing too many functions will
then disappear, but the problem of the lib calling to
the dosemu functions instead of its own functions
with the same name, will remain unless you use the
-Bsymbolic option of the linker.
As to solving this without .so, I don't know. Maybe
someone else does.

>> But I would still encourage you to take a look into this:
>> https://github.com/mwilliamson/vde/blob/master/vde-2/include/libvdeplug.h
>> and this:
>> http://git.qemu.org/?p=qemu.git;a=blob;f=net/vde.c;h=2a619fbc813b3e2fe8b508f347348a6d115ab381;hb=HEAD
>> to see how (seemingly) simple it is.
> I am not sur this code is relevant to us - from what I understand it is for 
> connecting to a vde switch, not to the vdeslirp thing.
Yes!
So, as I understand, vde allows you to build a
userspace network of any kind. First thing you do
is to connect to vde_switch. This is with libvdeplug.
Then, by the use of some control interface (by sending
a textual commands, they are listed in their docs),
you create an instance of vdeslirp and connect it
to the same vde_switch.
So it may be a very interesting framework after all.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Dosemu-devel mailing list
Dosemu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dosemu-devel

Reply via email to