diff --git a/cpu/native/net/wpcap.c b/cpu/native/net/wpcap.c index 073a615ee..f32ba980f 100644 --- a/cpu/native/net/wpcap.c +++ b/cpu/native/net/wpcap.c @@ -192,7 +192,7 @@ uint8_t wfall_send(const uip_lladdr_t *lladdr); static uip_ipaddr_t last_sender; #endif -static void +static int output(void) { #if FALLBACK_HAS_ETHERNET_HEADERS&&0 @@ -203,8 +203,8 @@ output(void) } uip_ipaddr_copy(&last_sender, &UIP_IP_BUF->srcipaddr); #endif - PRINTF("FUT: %u\n", uip_len); - wfall_send(0); + PRINTF("FUT: %u\n", uip_len); + return wfall_send(0); } const struct uip_fallback_interface rpl_interface = { diff --git a/examples/cc2530dk/border-router/slip-bridge.c b/examples/cc2530dk/border-router/slip-bridge.c index 30bd4a429..ff79e2b98 100644 --- a/examples/cc2530dk/border-router/slip-bridge.c +++ b/examples/cc2530dk/border-router/slip-bridge.c @@ -83,7 +83,7 @@ init(void) slip_set_input_callback(slip_input_callback); } /*---------------------------------------------------------------------------*/ -static void +static int output(void) { if(uip_ipaddr_cmp(&last_sender, &UIP_IP_BUF->srcipaddr)) { @@ -94,6 +94,7 @@ output(void) PRINTF("SUT: %u\n", uip_len); slip_send(); } + return 0; } /*---------------------------------------------------------------------------*/ struct uip_fallback_interface slip_interface = { diff --git a/examples/ipv6/native-border-router/tun-bridge.c b/examples/ipv6/native-border-router/tun-bridge.c index 22cb4289b..827f72961 100644 --- a/examples/ipv6/native-border-router/tun-bridge.c +++ b/examples/ipv6/native-border-router/tun-bridge.c @@ -222,13 +222,15 @@ tun_init() } /*---------------------------------------------------------------------------*/ -void +static int tun_output(uint8_t *data, int len) { /* fprintf(stderr, "*** Writing to tun...%d\n", len); */ if(write(tunfd, data, len) != len) { err(1, "serial_to_tun: write"); + return 1; } + return 0; } /*---------------------------------------------------------------------------*/ int @@ -246,13 +248,14 @@ init(void) { } /*---------------------------------------------------------------------------*/ -static void +static int output(void) { PRINTF("SUT: %u\n", uip_len); if(uip_len > 0) { - tun_output(&uip_buf[UIP_LLH_LEN], uip_len); + return tun_output(&uip_buf[UIP_LLH_LEN], uip_len); } + return 0; } diff --git a/examples/ipv6/rpl-border-router/slip-bridge.c b/examples/ipv6/rpl-border-router/slip-bridge.c index 582f626e7..62940d5ef 100644 --- a/examples/ipv6/rpl-border-router/slip-bridge.c +++ b/examples/ipv6/rpl-border-router/slip-bridge.c @@ -100,7 +100,7 @@ init(void) slip_set_input_callback(slip_input_callback); } /*---------------------------------------------------------------------------*/ -static void +static int output(void) { if(uip_ipaddr_cmp(&last_sender, &UIP_IP_BUF->srcipaddr)) { @@ -115,6 +115,7 @@ output(void) // PRINTF("SUT: %u\n", uip_len); slip_send(); } + return 0; } /*---------------------------------------------------------------------------*/ diff --git a/examples/sensinode/border-router/slip-bridge.c b/examples/sensinode/border-router/slip-bridge.c index edd048a7d..b0ebd066d 100644 --- a/examples/sensinode/border-router/slip-bridge.c +++ b/examples/sensinode/border-router/slip-bridge.c @@ -84,7 +84,7 @@ init(void) slip_set_input_callback(slip_input_callback); } /*---------------------------------------------------------------------------*/ -static void +static int output(void) { if(uip_ipaddr_cmp(&last_sender, &UIP_IP_BUF->srcipaddr)) { @@ -95,6 +95,7 @@ output(void) PRINTF("SUT: %u\n", uip_len); slip_send(); } + return 0; } /*---------------------------------------------------------------------------*/ const struct uip_fallback_interface slip_interface = { diff --git a/platform/avr-ravenusb/contiki-raven-main.c b/platform/avr-ravenusb/contiki-raven-main.c index 6e7f9d28c..e2ca7711e 100644 --- a/platform/avr-ravenusb/contiki-raven-main.c +++ b/platform/avr-ravenusb/contiki-raven-main.c @@ -132,7 +132,7 @@ init(void) { } void mac_LowpanToEthernet(void); -static void +static int output(void) { // if(uip_ipaddr_cmp(&last_sender, &UIP_IP_BUF->srcipaddr)) { @@ -142,6 +142,7 @@ output(void) PRINTD("SUT: %u\n", uip_len); mac_LowpanToEthernet(); //bounceback trap is done in lowpanToEthernet // } + return 0; } const struct uip_fallback_interface rpl_interface = { init, output