diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-16 12:30:18 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-16 12:30:18 -0600 |
commit | 80ea43c7c968cd7f9617ab8a69892b4214e6664c (patch) | |
tree | 0fd0ccd53493c12a7cd79a322e48680763715228 /nuttx/include | |
parent | 9d7bd7674895cf2d6f21501396f6945a14231e7b (diff) | |
download | px4-nuttx-80ea43c7c968cd7f9617ab8a69892b4214e6664c.tar.gz px4-nuttx-80ea43c7c968cd7f9617ab8a69892b4214e6664c.tar.bz2 px4-nuttx-80ea43c7c968cd7f9617ab8a69892b4214e6664c.zip |
Networking: Replace all references to net_ipaddr_t with either in_addr_t on net_ipv6addr_t. The goal is to support both IPv4 and IPv6 simultaneously. This requires that the two types be distinct and not conditionally typedef'ed to net_ipaddr_t.
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/net/icmp.h | 2 | ||||
-rw-r--r-- | nuttx/include/nuttx/net/ip.h | 14 |
2 files changed, 5 insertions, 11 deletions
diff --git a/nuttx/include/nuttx/net/icmp.h b/nuttx/include/nuttx/net/icmp.h index ec912f4b9..f64895afc 100644 --- a/nuttx/include/nuttx/net/icmp.h +++ b/nuttx/include/nuttx/net/icmp.h @@ -189,7 +189,7 @@ extern "C" * ****************************************************************************/ -int icmp_ping(net_ipaddr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen, +int icmp_ping(in_addr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen, int dsecs); #undef EXTERN diff --git a/nuttx/include/nuttx/net/ip.h b/nuttx/include/nuttx/net/ip.h index c401e6a0d..ffce6af98 100644 --- a/nuttx/include/nuttx/net/ip.h +++ b/nuttx/include/nuttx/net/ip.h @@ -94,12 +94,6 @@ typedef uint16_t net_ipv6addr_t[8]; -#ifdef CONFIG_NET_IPv6 -typedef net_ipv6addr_t net_ipaddr_t; -#else -typedef in_addr_t net_ipaddr_t; -#endif - /* Describes and address in either the IPv4 or IPv6 domain */ union ip_addr_u @@ -192,7 +186,7 @@ struct net_ipv6hdr_s * * This function constructs an IPv4 address in network byte order. * - * addr A pointer to a net_ipaddr_t variable that will be + * addr A pointer to a in_addr_t variable that will be * filled in with the IPv4 address. * addr0 The first octet of the IPv4 address. * addr1 The second octet of the IPv4 address. @@ -255,7 +249,7 @@ struct net_ipv6hdr_s * * Example: * - * net_ipaddr_t ipaddr1, ipaddr2; + * in_addr_t ipaddr1, ipaddr2; * * net_ipaddr(&ipaddr1, 192,16,1,2); * net_ipaddr_copy(&ipaddr2, &ipaddr1); @@ -289,7 +283,7 @@ struct net_ipv6hdr_s * * Example: * - * net_ipaddr_t ipaddr1, ipaddr2; + * in_addr_t ipaddr1, ipaddr2; * * net_ipaddr(&ipaddr1, 192,16,1,2); * if (net_ipaddr_cmp(ipaddr2, ipaddr1)) @@ -362,7 +356,7 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1, * * Example: * - * net_ipaddr_t ipaddr1, ipaddr2, netmask; + * in_addr_t ipaddr1, ipaddr2, netmask; * * net_ipaddr(&ipaddr1, 192,16,1,2); * net_ipaddr(&netmask, 255,255,255,0); |