Hello Ivan,

I'm afraid there is no out-of-the-box solution available by now. But I
would think it's not that complicated to extend the nic_bridge to allow
clients to communicate with each other. By now, the nic_bridge is held
quite simple. It doesn't check the destination of ip-packets from it's
clients, just brings them on-line. It only inspects and modifies dhcp
requests from the clients (and vice versa).

To reduce work for this task I've attached a modified version of the
l4linux run-script, where l4linux and our simple web-server test are
started, and communicate with the network via the nic_bridge. With that
script I can communicate with the l4linux instance anywhere from my LAN
(and vice versa), as well as with the dummy webserver, but both cannot
speak to each other. (The run-script requires a pre-configured bridged
tap0 device to work properly.)

I hope that brings you a little bit further.

Best regards
Stefan

On 20.03.2012 10:12, Ivan Loskutov wrote:
> Hello.
> 
> How to make network connection betwen server in l4linux and genode
> application (for example Arora)? Has Genode implementation for this case?
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> 
> 
> 
> _______________________________________________
> Genode-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/genode-main

-- 
Stefan Kalkowski
Genode Labs

http://www.genode-labs.com/ · http://genode.org/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
assert_spec foc

#
# Build
#
set build_components {
        core
        init
        drivers/timer
        drivers/uart
        drivers/framebuffer
        server/nic_bridge
        test/lwip/http_srv
        l4linux }

lappend_if [have_spec     x86] build_components drivers/nic
lappend_if [have_spec     pci] build_components drivers/pci
lappend_if [have_spec     ps2] build_components drivers/input/ps2
lappend_if [have_spec lan9118] build_components drivers/nic

build $build_components
create_boot_directory

#
# Config
#
set config  {
<config prio_levels="2">
        <parent-provides>
                <service name="ROM"/>
                <service name="RAM"/>
                <service name="IRQ"/>
                <service name="IO_MEM"/>
                <service name="IO_PORT"/>
                <service name="CAP"/>
                <service name="PD"/>
                <service name="RM"/>
                <service name="CPU"/>
                <service name="LOG"/>
                <service name="SIGNAL"/>
        </parent-provides>
        <default-route>
                <any-service> <parent/> <any-child/> </any-service>
        </default-route>
        <start name="timer">
                <resource name="RAM" quantum="1M"/>
                <provides><service name="Timer"/></provides>
        </start>
        <start name="uart_drv">
                <resource name="RAM" quantum="1M"/>
                <provides><service name="Terminal"/></provides>
                <config><policy label="l4linux" uart="1"/></config>
        </start> }

append_if [have_spec pci] config {
        <start name="pci_drv">
                <resource name="RAM" quantum="1M"/>
                <provides><service name="PCI"/></provides>
        </start>}

append_if [have_spec vesa] config {
        <start name="vesa_drv">
                <resource name="RAM" quantum="1M"/>
                <provides><service name="Framebuffer"/></provides>
        </start> }

append_if [have_spec pl11x] config {
        <start name="pl11x_drv">
                <resource name="RAM" quantum="2M"/>
                <provides><service name="Framebuffer"/></provides>
        </start> }

append_if [have_spec ps2] config {
        <start name="ps2_drv">
                <resource name="RAM" quantum="1M"/>
                <provides><service name="Input"/></provides>
        </start>}

append_if [have_spec x86] config {
        <start name="nic_drv">
                <resource name="RAM" quantum="2M"/>
                <provides><service name="Nic"/></provides>
        </start>}

append_if [have_spec lan9118] config {
        <start name="nic_drv">
                <resource name="RAM" quantum="1M"/>
                <provides><service name="Nic"/></provides>
        </start> }

append config {
        <start name="nic_bridge">
                <resource name="RAM" quantum="1M"/>
                <provides><service name="Nic"/></provides>
                <route>
                        <service name="Nic"> <child name="nic_drv"/> </service>
                        <any-service> <parent/> <any-child/> </any-service>
                </route>
        </start>
        <start name="test-lwip_httpsrv">
                <resource name="RAM" quantum="2M"/>
                <route>
                        <service name="Nic"> <child name="nic_bridge"/> 
</service>
                        <any-service> <any-child/> <parent/> </any-service>
                </route>
        </start>
        <start name="l4linux">
                <resource name="RAM" quantum="128M"/>
                <config args="mem=64M console=ttyS0 l4x_rd=initrd.gz"/>
                <route>
                        <service name="Nic"> <child name="nic_bridge"/> 
</service>
                        <any-service> <any-child/> <parent/> </any-service>
                </route>
        </start>
</config>}

install_config $config

#
# Boot modules
#
set boot_modules { core init timer uart_drv l4linux initrd.gz nic_bridge
                   ld.lib.so libc.lib.so libc_log.lib.so lwip.lib.so 
test-lwip_httpsrv}
lappend_if [have_spec     pci] boot_modules pci_drv
lappend_if [have_spec     ps2] boot_modules ps2_drv
lappend_if [have_spec   pl11x] boot_modules pl11x_drv
lappend_if [have_spec    vesa] boot_modules vesa_drv
lappend_if [have_spec     x86] boot_modules nic_drv
lappend_if [have_spec lan9118] boot_modules nic_drv

if {[have_spec x86]} {
        set uri "http://genode.org/files/release-11.11/l4lx/initrd-ia32.gz";
} elseif {[have_spec arm]} {
        set uri "http://genode.org/files/release-11.11/l4lx/initrd-arm.gz";
}
if {![file exists bin/initrd.gz]} {
        puts "Download initramfs ..."
        exec >& /dev/null wget -c -O bin/initrd.gz $uri
}

build_boot_image  [join $boot_modules " "]

#
# Qemu
#
append qemu_args " -m 128 -nographic "
append qemu_args " -serial unix:/tmp/qemu-pipe,server,nowait "
append qemu_args " -serial mon:stdio "
append_if [have_spec     x86] qemu_args " -net nic,model=e1000 -net 
tap,ifname=tap0,script=no,downscript=no "
append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 -net user "

#
# Execute test case
#
run_genode_until forever

## Wait for network to settle down
#send "sleep 5\n"
#send "wget http://genode.org/\n";
#
#expect {
#        -re "Connecting to genode.org.*index.html.*\/ #.*" { }
#       timeout { puts stderr "Error: Test execution timed out"; exit -2 }
#}
#
#puts "Test succeeded"
#exec rm bin/initrd.gz
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to