summaryrefslogtreecommitdiff
path: root/nuttx/net/udp/udp_send.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-16 13:01:08 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-16 13:01:08 -0600
commit403cc094e22feb6565ded93f8346a8446bf4ddbb (patch)
tree7b2706373a3d000f9dd145e7c14547e6106de25d /nuttx/net/udp/udp_send.c
parent1cab7bb6d184c0bba4889bf6eac7a863f0f242c7 (diff)
downloadpx4-nuttx-403cc094e22feb6565ded93f8346a8446bf4ddbb.tar.gz
px4-nuttx-403cc094e22feb6565ded93f8346a8446bf4ddbb.tar.bz2
px4-nuttx-403cc094e22feb6565ded93f8346a8446bf4ddbb.zip
Networking: Replace all references to the macros net_ipaddr_copy, net_ipaddr_hdrcopy, net_ipaddr_cmp, net_ipaddr_hdrcmp, and net_ipaddr_maskcmp with the appropriate IPv4 or IPv6 version of the macro (such as net_ipv4addr_copy). The goal is to support both IPv4 and IPv6 simultaneously. This requires that the macros be distinct and not conditionally defined to one on or the other.
Diffstat (limited to 'nuttx/net/udp/udp_send.c')
-rw-r--r--nuttx/net/udp/udp_send.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/net/udp/udp_send.c b/nuttx/net/udp/udp_send.c
index 4455813f0..8ceff0710 100644
--- a/nuttx/net/udp/udp_send.c
+++ b/nuttx/net/udp/udp_send.c
@@ -125,8 +125,8 @@ void udp_send(struct net_driver_s *dev, struct udp_conn_s *conn)
pudpbuf->proto = IP_PROTO_UDP;
pudpbuf->ttl = conn->ttl;
- net_ipaddr_copy(pudpbuf->srcipaddr, &dev->d_ipaddr);
- net_ipaddr_copy(pudpbuf->destipaddr, &conn->u.ipv4.raddr);
+ net_ipv6addr_copy(pudpbuf->srcipaddr, &dev->d_ipaddr);
+ net_ipav6ddr_copy(pudpbuf->destipaddr, &conn->u.ipv4.raddr);
#else /* CONFIG_NET_IPv6 */
@@ -142,8 +142,8 @@ void udp_send(struct net_driver_s *dev, struct udp_conn_s *conn)
pudpbuf->ttl = conn->ttl;
pudpbuf->proto = IP_PROTO_UDP;
- net_ipaddr_hdrcopy(pudpbuf->srcipaddr, &dev->d_ipaddr);
- net_ipaddr_hdrcopy(pudpbuf->destipaddr, &conn->u.ipv4.raddr);
+ net_ipv4addr_hdrcopy(pudpbuf->srcipaddr, &dev->d_ipaddr);
+ net_ipv4addr_hdrcopy(pudpbuf->destipaddr, &conn->u.ipv4.raddr);
/* Calculate IP checksum. */