Added configurable router module

This commit is contained in:
nifi 2010-03-01 14:46:57 +00:00
parent 5e43a6998b
commit 1025e7337c

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* @(#)$Id: contiki-sky-main.c,v 1.73 2010/03/01 13:30:21 nifi Exp $ * @(#)$Id: contiki-sky-main.c,v 1.74 2010/03/01 14:46:57 nifi Exp $
*/ */
#include <signal.h> #include <signal.h>
@ -55,9 +55,6 @@
#include "net/sicslowpan.h" #include "net/sicslowpan.h"
#include "net/uip-netif.h" #include "net/uip-netif.h"
#include "net/mac/sicslowmac.h" #include "net/mac/sicslowmac.h"
#if UIP_CONF_ROUTER
#include "net/routing/rimeroute.h"
#endif /* UIP_CONF_ROUTER*/
#endif /* WITH_UIP6 */ #endif /* WITH_UIP6 */
#include "net/rime.h" #include "net/rime.h"
@ -76,6 +73,20 @@
SENSORS(&button_sensor); SENSORS(&button_sensor);
#if UIP_CONF_ROUTER
#ifndef UIP_ROUTER_MODULE
#ifdef UIP_CONF_ROUTER_MODULE
#define UIP_ROUTER_MODULE UIP_CONF_ROUTER_MODULE
#else /* UIP_CONF_ROUTER_MODULE */
#define UIP_ROUTER_MODULE rimeroute
#endif /* UIP_CONF_ROUTER_MODULE */
#endif /* UIP_ROUTER_MODULE */
extern const struct uip_router UIP_ROUTER_MODULE;
#endif /* UIP_CONF_ROUTER */
#if DCOSYNCH_CONF_ENABLED #if DCOSYNCH_CONF_ENABLED
static struct timer mgt_timer; static struct timer mgt_timer;
#endif #endif
@ -318,7 +329,7 @@ main(int argc, char **argv)
#if UIP_CONF_ROUTER #if UIP_CONF_ROUTER
uip_router_register(&rimeroute); uip_router_register(&UIP_ROUTER_MODULE);
#endif /* UIP_CONF_ROUTER */ #endif /* UIP_CONF_ROUTER */
#else /* WITH_UIP6 */ #else /* WITH_UIP6 */