diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-07 22:00:19 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-06-07 22:00:19 +0000 |
commit | 9ff075d9f32863b462dd5da68574bf253a2615f5 (patch) | |
tree | f67fe6501b540bb78cce93e25a1230e69a134adc /nuttx/net | |
parent | e34b62094f3655377d30929d82189f6f15c801f2 (diff) | |
download | px4-nuttx-9ff075d9f32863b462dd5da68574bf253a2615f5.tar.gz px4-nuttx-9ff075d9f32863b462dd5da68574bf253a2615f5.tar.bz2 px4-nuttx-9ff075d9f32863b462dd5da68574bf253a2615f5.zip |
First round of compile fixes for IPv6
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4813 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net')
-rw-r--r-- | nuttx/net/accept.c | 2 | ||||
-rw-r--r-- | nuttx/net/getsockname.c | 2 | ||||
-rw-r--r-- | nuttx/net/netdev_findbyaddr.c | 1 | ||||
-rw-r--r-- | nuttx/net/netdev_ioctl.c | 1 | ||||
-rw-r--r-- | nuttx/net/netdev_txnotify.c | 4 | ||||
-rw-r--r-- | nuttx/net/recvfrom.c | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/nuttx/net/accept.c b/nuttx/net/accept.c index 4dfe4c09d..07e3f983e 100644 --- a/nuttx/net/accept.c +++ b/nuttx/net/accept.c @@ -108,7 +108,7 @@ static inline void accept_tcpsender(FAR struct uip_conn *conn, { addr->sin_family = AF_INET6; addr->sin_port = conn->rport; - uip_ipaddr_copy(addr->sin_addr.s_addr, conn->ripaddr); + uip_ipaddr_copy(addr->sin6_addr.s6_addr, conn->ripaddr); } } #else diff --git a/nuttx/net/getsockname.c b/nuttx/net/getsockname.c index 35551ccf3..c5cae2f3b 100644 --- a/nuttx/net/getsockname.c +++ b/nuttx/net/getsockname.c @@ -42,6 +42,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <string.h> #include <errno.h> #include <nuttx/net/net.h> @@ -194,7 +195,6 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) #if defined(CONFIG_NET_TCP) || defined(CONFIG_NET_UDP) #ifdef CONFIG_NET_IPv6 -#error "Not big enough for IPv6 address" outaddr->sin_family = AF_INET6; memcpy(outaddr->sin6_addr.in6_u.u6_addr8, dev->d_ipaddr, 16); *addrlen = sizeof(struct sockaddr_in6); diff --git a/nuttx/net/netdev_findbyaddr.c b/nuttx/net/netdev_findbyaddr.c index 49fc17c20..50a246f67 100644 --- a/nuttx/net/netdev_findbyaddr.c +++ b/nuttx/net/netdev_findbyaddr.c @@ -81,6 +81,7 @@ static inline bool netdev_maskcmp(const uip_ipaddr_t *ipaddr, return (*ipaddr & *netmask) == (*raddr & *netmask); #else # warning "Not implemented for IPv6" + return false; #endif } diff --git a/nuttx/net/netdev_ioctl.c b/nuttx/net/netdev_ioctl.c index af0367c50..f78fc958a 100644 --- a/nuttx/net/netdev_ioctl.c +++ b/nuttx/net/netdev_ioctl.c @@ -87,7 +87,6 @@ static void ioctl_getipaddr(struct sockaddr *outaddr, uip_ipaddr_t *inaddr) { #ifdef CONFIG_NET_IPv6 -#error "Not big enough for IPv6 address" struct sockaddr_in6 *dest = (struct sockaddr_in6 *)outaddr; dest->sin_family = AF_INET6; dest->sin_port = 0; diff --git a/nuttx/net/netdev_txnotify.c b/nuttx/net/netdev_txnotify.c index d2ecae58f..4cb705ea8 100644 --- a/nuttx/net/netdev_txnotify.c +++ b/nuttx/net/netdev_txnotify.c @@ -1,8 +1,8 @@ /**************************************************************************** * net/netdev_txnotify.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <spudmonkey@racsa.co.cr> + * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 5477e29eb..741cd4c72 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -429,7 +429,7 @@ static inline void recvfrom_tcpsender(struct uip_driver_s *dev, struct recvfrom_ infrom->sin_port = TCPBUF->srcport; #ifdef CONFIG_NET_IPv6 - uip_ipaddr_copy(infrom->sin_addr.s_addr, TCPBUF->srcipaddr); + uip_ipaddr_copy(infrom->sin6_addr.s6_addr, TCPBUF->srcipaddr); #else uip_ipaddr_copy(infrom->sin_addr.s_addr, uip_ip4addr_conv(TCPBUF->srcipaddr)); #endif @@ -626,7 +626,7 @@ static inline void recvfrom_udpsender(struct uip_driver_s *dev, struct recvfrom_ infrom->sin_port = UDPBUF->srcport; #ifdef CONFIG_NET_IPv6 - uip_ipaddr_copy(infrom->sin_addr.s_addr, UDPBUF->srcipaddr); + uip_ipaddr_copy(infrom->sin6_addr.s6_addr, UDPBUF->srcipaddr); #else uip_ipaddr_copy(infrom->sin_addr.s_addr, uip_ip4addr_conv(UDPBUF->srcipaddr)); #endif |