diff --git a/cpu/native/net/linuxradio-drv.c b/cpu/native/net/linuxradio-drv.c index 237cb2b64..da645762f 100644 --- a/cpu/native/net/linuxradio-drv.c +++ b/cpu/native/net/linuxradio-drv.c @@ -35,11 +35,15 @@ #include "contiki.h" +#ifdef linux + #include "linuxradio-drv.h" #include "net/packetbuf.h" #include "net/netstack.h" +#include +#include #include #include #include @@ -145,6 +149,7 @@ handle_fd(fd_set *rset, fd_set *wset) NETSTACK_RDC.input(); } } + static const struct select_callback linuxradio_sock_callback = { set_fd, handle_fd }; static int @@ -199,3 +204,5 @@ const struct radio_driver linuxradio_driver = on, off, }; + +#endif diff --git a/platform/minimal-net/contiki-conf.h b/platform/minimal-net/contiki-conf.h index e736b363d..1e15adc7c 100644 --- a/platform/minimal-net/contiki-conf.h +++ b/platform/minimal-net/contiki-conf.h @@ -36,6 +36,12 @@ #include #include +struct select_callback { + int (* set_fd)(fd_set *fdr, fd_set *fdw); + void (* handle_fd)(fd_set *fdr, fd_set *fdw); +}; +int select_set_callback(int fd, const struct select_callback *callback); + #define CC_CONF_REGISTER_ARGS 1 #define CC_CONF_FUNCTION_POINTER_ARGS 1 #define CC_CONF_FASTCALL @@ -88,9 +94,9 @@ typedef unsigned short uip_stats_t; */ #define WEBSERVER_CONF_STATUSPAGE 1 -/* RPL currently works only on Windows. *nix would require converting the tun interface to two pcap tees. */ +/* RPL currently works only on Windows. *nix would require converting the tun interface to two pcap tees. */ //#define RPL_BORDER_ROUTER 0 -#endif +#endif #if UIP_CONF_IPV6_RPL /* RPL motes use the uip.c link layer address or optionally the harded coded address (but without the prefix!) @@ -121,7 +127,7 @@ typedef unsigned short uip_stats_t; * e.g. the jackdaw RNDIS <-> repeater. Then RPL will configure on the radio network and the RF motes will * be reached through bbbb::. * Possibly minimal-net RPL motes could also be added to this interface? - * + * */ #undef UIP_CONF_ROUTER #define UIP_CONF_ROUTER 1