Extracted linuxradio device name to contiki-conf

This commit is contained in:
Vladimir Pouzanov 2014-03-01 10:30:41 +00:00 committed by Vladimir Pouzanov
parent 52c90519d9
commit 4c8618e6ba
3 changed files with 5 additions and 2 deletions

View file

@ -164,8 +164,7 @@ on(void)
perror("linuxradio socket()");
return 0;
} else {
/* TODO: interface should not be hard-coded */
strncpy((char *)ifr.ifr_name, "wpan0", IFNAMSIZ);
strncpy((char *)ifr.ifr_name, NETSTACK_CONF_LINUXRADIO_DEV, IFNAMSIZ);
err = ioctl(sockfd, SIOCGIFINDEX, &ifr);
if(err == -1) {
perror("linuxradio ioctl()");

View file

@ -174,6 +174,8 @@ typedef unsigned short uip_stats_t;
#define UIP_CONF_DS6_AADDR_NBU 0
#endif /* NETSTACK_CONF_WITH_IPV6 */
#define NETSTACK_CONF_LINUXRADIO_DEV "wpan0"
typedef unsigned long clock_time_t;
#define CLOCK_CONF_SECOND 1000
#define INFINITE_TIME ULONG_MAX

View file

@ -101,6 +101,8 @@ typedef unsigned short uip_stats_t;
#define NETSTACK_CONF_NETWORK sicslowpan_driver
#define NETSTACK_CONF_LINUXRADIO_DEV "wpan0"
#define UIP_CONF_ROUTER 1
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06