Data streaming / sharing from client side in an IPC example

Ajith Whowe ajith.whowe at
Thu Jan 30 11:15:01 CET 2014

Dear Martin,

thank you very much for the kind answer. The solution You provided
worked well. The only concern is as You know the data to be send can
not have a greater size than the L4_UTCB_GENERIC_DATA_SIZE (due to
UTCB size). So the question is do you have also another solution for
larger data streaming? (Off course other than sending the data by
means of various blocks with L4_UTCB_GENERIC_DATA_SIZE)

Best Regards,


Am 27.01.2014 15:03, schrieb Ajith Whowe:
>* Dear all,
*>>* I have reviewed available examples for the client server based
*>* applications. Unfortunately could not find any example for which a
*>* client sends a char array to the server side. Each time the client
*>* sends a request and the server shares the data. Would it be possible
*>* to find an example for that?
*>>* For instance in the streammap example, the clients does the following
*>* (writes basic protocal and message tag to the UTCB and waits for the
*>* stream from the server would it be possible for the client to perform
*>* the stream whereas the server waits for the input?:
*>>* s << l4_umword_t
*>* <
*>* << (l4_addr_t
*>* <
*Just insert the following line here:

             s << "message from client";

>* s << L4::Ipc::Rcv_fpage::mem((l4_addr_t
*>* <
*>* <
*>* 0);
*>>* The server on the other hand gets the protocol and base adress and
*>* then does the streaming:
*>* l4_addr_t
*>* <
*>* snd_base;
*>* ios >> snd_base;
*and insert here:

             unsigned long len;
             char buf[100];
             len = sizeof(buf);
             ios >> L4::Ipc::Buf_cp_in<char>(buf, len);
             printf ("Received from client: %s\n", buf);

>* // put something into the page to read it out at the other side
*>* snprintf(page_to_map, sizeof(page_to_map), "Hello from the server!");
*>* printf("Sending to client\n");
*>* // send page
*>* ios << L4::Ipc::Snd_fpage::mem((l4_addr_t
*>* <
*>* <
*>* <
*>* snd_base)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the l4-hackers mailing list