mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-19 03:05:14 +00:00
change for ds6 calls
This commit is contained in:
parent
115b3a7c5c
commit
de2f5aaddc
@ -28,7 +28,7 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: raven-lcd.c,v 1.6 2010/02/28 21:29:20 dak664 Exp $
|
||||
* $Id: raven-lcd.c,v 1.7 2010/03/17 20:19:33 dak664 Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -71,7 +71,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
static u16_t addr[8];
|
||||
static u8_t count = 0;
|
||||
static u8_t seqno;
|
||||
uip_ipaddr_t dest_addr;
|
||||
@ -106,7 +105,10 @@ void
|
||||
raven_ping6(void)
|
||||
{
|
||||
/* ping the router */
|
||||
|
||||
#if THEOLDWAY
|
||||
// Setup destination address.
|
||||
static u16_t addr[8];
|
||||
struct uip_nd6_defrouter *defrouter;
|
||||
uint8_t i,tmp;
|
||||
|
||||
@ -130,6 +132,17 @@ raven_ping6(void)
|
||||
UIP_IP_BUF->ttl = uip_netif_physical_if.cur_hop_limit;
|
||||
uip_ipaddr_copy(&UIP_IP_BUF->destipaddr, &dest_addr);
|
||||
uip_netif_select_src(&UIP_IP_BUF->srcipaddr, &UIP_IP_BUF->destipaddr);
|
||||
|
||||
#else
|
||||
/* Get address from default router */
|
||||
UIP_IP_BUF->vtc = 0x60;
|
||||
UIP_IP_BUF->tcflow = 1;
|
||||
UIP_IP_BUF->flow = 0;
|
||||
UIP_IP_BUF->proto = UIP_PROTO_ICMP6;
|
||||
UIP_IP_BUF->ttl = uip_ds6_if.cur_hop_limit;
|
||||
uip_ipaddr_copy(&UIP_IP_BUF->destipaddr, uip_ds6_defrt_choose());
|
||||
uip_ds6_select_src(&UIP_IP_BUF->srcipaddr, &UIP_IP_BUF->destipaddr);
|
||||
#endif
|
||||
|
||||
UIP_ICMP_BUF->type = ICMP6_ECHO_REQUEST;
|
||||
UIP_ICMP_BUF->icode = 0;
|
||||
|
@ -227,21 +227,13 @@ void initialize(void)
|
||||
}
|
||||
#endif /* COFFEE_FILES */
|
||||
|
||||
/* Add prefixes for testing */
|
||||
/* Add addresses for testing */
|
||||
#if 0
|
||||
{
|
||||
uip_ip6addr_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);
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
{
|
||||
uip_ip6addr_t ipaddr;
|
||||
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||
uip_netif_addr_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0, AUTOCONF);
|
||||
uip_nd6_prefix_add(&ipaddr, UIP_DEFAULT_PREFIX_LEN, 0);
|
||||
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
|
||||
// uip_ds6_prefix_add(&ipaddr,64,0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -253,13 +245,12 @@ void initialize(void)
|
||||
char buf[80];
|
||||
unsigned int size;
|
||||
|
||||
for(i = 0; i < UIP_CONF_NETIF_MAX_ADDRESSES; i ++) {
|
||||
if(uip_netif_physical_if.addresses[i].state != NOT_USED) {
|
||||
httpd_cgi_sprint_ip6(*(uip_ipaddr_t*)&uip_netif_physical_if.addresses[i],buf);
|
||||
printf_P(PSTR("IPv6 Address: %s\n"),buf);
|
||||
}
|
||||
for (i=0;i<UIP_DS6_ADDR_NB;i++) {
|
||||
if (uip_ds6_if.addr_list[i].isused) {
|
||||
httpd_cgi_sprint_ip6(uip_ds6_if.addr_list[i].ipaddr,buf);
|
||||
printf_P(PSTR("IPv6 Address: %s\n"),buf);
|
||||
}
|
||||
}
|
||||
|
||||
eeprom_read_block (buf,server_name, sizeof(server_name));
|
||||
buf[sizeof(server_name)]=0;
|
||||
printf_P(PSTR("%s"),buf);
|
||||
|
Loading…
Reference in New Issue
Block a user