From 9009d8dc064a4afe4f23c45f345ba6522d9765a3 Mon Sep 17 00:00:00 2001 From: bg- Date: Thu, 10 Aug 2006 19:22:23 +0000 Subject: [PATCH] More uip_ipaddr_t fixes. --- examples/test-ipv6/tapdev6.c | 6 +++--- examples/test-ipv6/testv6.c | 10 +++++----- platform/minimal-net/contiki-main.c | 16 ++++++++-------- platform/minimal-net/net/tapdev-service.c | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/examples/test-ipv6/tapdev6.c b/examples/test-ipv6/tapdev6.c index 19b1cdc13..0b7b1ee2a 100644 --- a/examples/test-ipv6/tapdev6.c +++ b/examples/test-ipv6/tapdev6.c @@ -31,7 +31,7 @@ * * Author: Adam Dunkels * - * $Id: tapdev6.c,v 1.1 2006/06/17 22:41:24 adamdunkels Exp $ + * $Id: tapdev6.c,v 1.2 2006/08/10 19:22:23 bg- Exp $ */ @@ -181,10 +181,10 @@ tapdev_send(void) struct uip_neighbor_addr *addr; /* uip_arp_out();*/ - addr = uip_neighbor_lookup(IPBUF->destipaddr); + addr = uip_neighbor_lookup(&IPBUF->destipaddr); if(addr == NULL) { printf("tapdev6: tapdev_send: no matching neighbor found\n"); - DEBUG_PRINT6ADDR(IPBUF->destipaddr); + DEBUG_PRINT6ADDR(&IPBUF->destipaddr); printf("\n"); } else { memcpy(&BUF->dest, addr, 6); diff --git a/examples/test-ipv6/testv6.c b/examples/test-ipv6/testv6.c index 37d64071d..4d587b3bb 100644 --- a/examples/test-ipv6/testv6.c +++ b/examples/test-ipv6/testv6.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: testv6.c,v 1.1 2006/06/17 22:41:25 adamdunkels Exp $ + * $Id: testv6.c,v 1.2 2006/08/10 19:22:23 bg- Exp $ */ #include "contiki-net.h" @@ -48,13 +48,13 @@ PROCESS_THREAD(test_process, ev, data) PROCESS_BEGIN(); - uip_ip6addr(ip6addr, 0xfc00,0,0,0,0,0,0,0x232); - uip_sethostaddr(ip6addr); + uip_ip6addr(&ip6addr, 0xfc00,0,0,0,0,0,0,0x232); + uip_sethostaddr(&ip6addr); uip_setethaddr(ethaddr); - uip_ip6addr(ip6addr, 0xfc00,0,0,0,0,0,0,0x231); + uip_ip6addr(&ip6addr, 0xfc00,0,0,0,0,0,0,0x231); - tcp_connect(ip6addr, HTONS(7), NULL); + tcp_connect(&ip6addr, HTONS(7), NULL); while(1) { PROCESS_WAIT_EVENT(); diff --git a/platform/minimal-net/contiki-main.c b/platform/minimal-net/contiki-main.c index 44b20ce8a..9133eec3b 100644 --- a/platform/minimal-net/contiki-main.c +++ b/platform/minimal-net/contiki-main.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki OS * - * $Id: contiki-main.c,v 1.1 2006/06/17 22:41:30 adamdunkels Exp $ + * $Id: contiki-main.c,v 1.2 2006/08/10 19:23:13 bg- Exp $ * */ @@ -45,7 +45,7 @@ PROCINIT(&etimer_process, &tcpip_process, int main(void) { - u16_t addr[2]; + uip_ipaddr_t addr; process_init(); @@ -53,14 +53,14 @@ main(void) autostart_start(autostart_processes); - uip_ipaddr(addr, 192,168,2,2); - uip_sethostaddr(addr); + uip_ipaddr(&addr, 192,168,2,2); + uip_sethostaddr(&addr); - uip_ipaddr(addr, 192,168,2,1); - uip_setdraddr(addr); + uip_ipaddr(&addr, 192,168,2,1); + uip_setdraddr(&addr); - uip_ipaddr(addr, 255,255,255,0); - uip_setnetmask(addr); + uip_ipaddr(&addr, 255,255,255,0); + uip_setnetmask(&addr); while(1) { int n; diff --git a/platform/minimal-net/net/tapdev-service.c b/platform/minimal-net/net/tapdev-service.c index d148be4b5..d08d638c7 100644 --- a/platform/minimal-net/net/tapdev-service.c +++ b/platform/minimal-net/net/tapdev-service.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: tapdev-service.c,v 1.1 2006/06/17 22:41:30 adamdunkels Exp $ + * @(#)$Id: tapdev-service.c,v 1.2 2006/08/10 19:23:13 bg- Exp $ */ #include "contiki-net.h" @@ -56,7 +56,7 @@ pollhandler(void) if(uip_len > 0) { #if UIP_CONF_IPV6 if(BUF->type == htons(UIP_ETHTYPE_IPV6)) { - uip_neighbor_add(IPBUF->srcipaddr, &BUF->src); + uip_neighbor_add(&IPBUF->srcipaddr, &BUF->src); tcpip_input(); } else #endif /* UIP_CONF_IPV6 */