mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Update minimal net to new ds6 interface
This commit is contained in:
parent
d1f1fae689
commit
9bcf982d87
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: contiki-conf.h,v 1.9 2008/10/15 09:14:25 adamdunkels Exp $
|
||||
* @(#)$Id: contiki-conf.h,v 1.10 2010/03/18 20:11:54 dak664 Exp $
|
||||
*/
|
||||
|
||||
#ifndef __CONTIKI_CONF_H__
|
||||
@ -60,6 +60,9 @@ typedef unsigned short uip_stats_t;
|
||||
#define UIP_CONF_LOGGING 0
|
||||
#define UIP_CONF_UDP_CHECKSUMS 0
|
||||
|
||||
/* Not used but avoids compile errors while sicslowpan.c is being developed */
|
||||
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_HC06
|
||||
|
||||
#define UIP_CONF_UDP 1
|
||||
#define UIP_CONF_TCP 1
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
*
|
||||
* This file is part of the Contiki OS
|
||||
*
|
||||
* $Id: contiki-main.c,v 1.23 2010/02/02 17:51:55 dak664 Exp $
|
||||
* $Id: contiki-main.c,v 1.24 2010/03/18 20:11:54 dak664 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -132,12 +132,22 @@ main(void)
|
||||
printf("Def. Router: %d.%d.%d.%d\n", uip_ipaddr_to_quad(&addr));
|
||||
|
||||
#else /* !UIP_CONF_IPV6 */
|
||||
uint8_t i;
|
||||
uip_ipaddr_t ipaddr;
|
||||
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_netif_addr_autoconf_set(&ipaddr, &uip_lladdr);
|
||||
uip_netif_addr_add(&ipaddr, 16, 0, TENTATIVE);
|
||||
printf("IP6 Address: ");sprint_ip6(ipaddr);printf("\n");
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
#if UIP_CONF_ROUTER
|
||||
uip_ds6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0, 0, 0, 0);
|
||||
#else /* UIP_CONF_ROUTER */
|
||||
uip_ds6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0);
|
||||
#endif /* UIP_CONF_ROUTER */
|
||||
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
|
||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
||||
// printf("IP6 Address: ");sprint_ip6(ipaddr);printf("\n");
|
||||
for (i=0;i<UIP_DS6_ADDR_NB;i++) {
|
||||
if (uip_ds6_if.addr_list[i].isused) {
|
||||
printf("IPV6 Address: ");sprint_ip6(uip_ds6_if.addr_list[i].ipaddr);printf("\n");
|
||||
}
|
||||
}
|
||||
#endif /* !UIP_CONF_IPV6 */
|
||||
|
||||
/* Make standard output unbuffered. */
|
||||
|
Loading…
Reference in New Issue
Block a user