Network Server Ankh

Martin Schröder martin.schroeder at openlimit.com
Fri Feb 7 16:29:57 CET 2014


Hi,

Am 07.02.2014 15:22, schrieb Ajith Whowe:
> Dear Adam,
>
> Thank You very much for the response. Do You mean that the l4shmnet can be used as a communication channel between two (or more ?) instances of l4linux over TCP/IP?

Yes, never tried with more, but two instances are working fine.

> By the way, how should then the start scripts seem? Would it be again like a client - server type interaction between both instances? For instance would it work with the following set up and would I see for example a ping request and response of each side?

The l4shmnet negotiates client and server automatically.

l4shmnet needs some namespace to find the other side:

- local my_channel = l:new_channel();
+ local test_l4shm = l:create_namespace({test_l4shm = "shmns_1"});

> local linux_caps1 = {
>    log = L4.Env.log:m("rws");
>    vbus = io_caps.linux_bus1,
>    rtc = rtc_caps.rtc,
>    rom = L4.Env.rom,

-    myL4shm = my_channel:svr(),
+    test_l4shm = test_l4shm:mode("rw");

> };
>
>   l:start(
>          {
>                 caps = linux_caps1,
>          },
>          "rom/vmlinuz1 mem=512M console=ttyLv0 l4shmnet.add=test_l4shm,macpart=01 ramdisk=rom/ramdisk1 root=1:0 ramdisk_size=5000 l4x_rd=rom/ramdisk1 init=/sbin/init");
>
>
> local linux_caps2 = {
>    log = L4.Env.log:m("r");
>    vbus = io_caps.linux_bus1,
>    rtc = rtc_caps.rtc,
>    rom = L4.Env.rom,

-    myL4shm = my_channel,
+    test_l4shm = test_l4shm:mode("rw");

> };
>
>   l:start(
>          {
>                 caps = linux_caps2,
>          },
>          "rom/vmlinuz2 mem=512M console=ttyLv0 l4shmnet.add=test_l4shm,macpart=02 ramdisk=rom/ramdisk2 root=1:0 ramdisk_size=5000 l4x_rd=rom/ramdisk2 init=/sbin/init");
>

Do not forget to enable CONFIG_L4_NET_L4SHM



Martin





More information about the l4-hackers mailing list