#include <stdio.h>
#include <rtai_lxrt.h>
#include <rtai_netrpc.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <assert.h>
#include <errno.h>
#include <sys/mman.h>
#include <sys/io.h>

int main()
{
    RT_TASK *server, *client;
    int priority = 0, stack_size = 4096, msg_size = 0;
    unsigned int msg;
    RTIME period, a, b;
    server = rt_task_init(nam2num("servr"), priority,
                              stack_size, msg_size);
    assert(server != 0);
    while(1) {
        client = rt_receive(0, &msg);
        assert(client != 0);
        printf("got message = %d\n", msg);
    }
    rt_task_delete(server);
}
