On Thu, Mar 20, 2014 at 9:01 AM, Justin Cormack
<[email protected]> wrote:
> One option with rumprun, thinking out loud, is to provide .o files
> with main renamed rather than binaries, so you can link them into your
> single program. This would need some changes to the build, as netbsd
> libc needs to not be linked at that stage but later. So you would end
> up with some .o files that you link into your binary and can call
> ifconfig_main(...) in order to configure your network. Alternatively
> could bundle a bunch of them into a util library, maybe with a
> slightly easier interface using varargs so it is ifconfig("lo0", ...).
> This would be the simple option to add to your standalone rump based
> program for adding config.

Well I hacked up a version that works like this in the "rumprun"
branch. It can run ifconfig followed by ping. It needs the rest of the
commands added. It has some issues (like never actually calling
exit(3) but that doesnt seem to matter). And the interface could be
nicer.

Really, you want a nice library interface not these command line
commands... especially if you want to read the output. but someone
would have to write it. On the other hand this does work if you just
want to configure some stuff right now.

Justin

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to