More uip_ipaddr_t fixes.

This commit is contained in:
bg- 2006-08-10 19:22:23 +00:00
parent e8030141f2
commit 9009d8dc06
4 changed files with 18 additions and 18 deletions

View file

@ -31,7 +31,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $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);

View file

@ -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();

View file

@ -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;

View file

@ -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 */