Example #1
0
int main(void)
{
    puts("IETF90 - BnB - CCN-RPL router");

    /*
    if (msg_init_queue(msg_buffer_shell, SHELL_MSG_BUFFER_SIZE) != 0) {
        DEBUG("msg init queue failed...abording\n");
        return -1;
    }
    */

    riot_ccn_relay_start();
    
    id = 2;

    /* fill neighbor cache */
    fill_nc();

    riot_ccn_appserver(1, NULL);
    rpl_ex_init('n');
    udp_server(1, NULL);

    posix_open(uart0_handler_pid, 0);
    net_if_set_src_address_mode(0, NET_IF_TRANS_ADDR_M_SHORT);
    shell_init(&shell, sc, UART0_BUFSIZE, uart0_readc, uart0_putc);
    shell_run(&shell);

    return 0;
}
Example #2
0
File: main.c Project: AnonMall/RIOT
int main(void)
{
    puts("CCN!");

    if (msg_init_queue(msg_buffer_shell, SHELL_MSG_BUFFER_SIZE) != 0) {
        DEBUG("msg init queue failed...abording\n");
        return -1;
    }

    riot_ccn_relay_start();

    puts("starting shell...");
    puts("  posix open");
    posix_open(uart0_handler_pid, 0);
    puts("  shell init");
    shell_init(&shell, sc, UART0_BUFSIZE, uart0_readc, uart0_putc);
    puts("  shell run");
    shell_run(&shell);

    return 0;
}