mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
net/inet: Rename ttl to s_ttl in sconn.
uniform naming convention Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
+6
-6
@@ -634,17 +634,17 @@ FAR struct udp_conn_s *udp_alloc(uint8_t domain)
|
||||
{
|
||||
/* Make sure that the connection is marked as uninitialized */
|
||||
|
||||
conn->sconn.ttl = IP_TTL_DEFAULT;
|
||||
conn->flags = 0;
|
||||
conn->sconn.s_ttl = IP_TTL_DEFAULT;
|
||||
conn->flags = 0;
|
||||
#if defined(CONFIG_NET_IPv4) || defined(CONFIG_NET_IPv6)
|
||||
conn->domain = domain;
|
||||
conn->domain = domain;
|
||||
#endif
|
||||
conn->lport = 0;
|
||||
conn->lport = 0;
|
||||
#if CONFIG_NET_RECV_BUFSIZE > 0
|
||||
conn->rcvbufs = CONFIG_NET_RECV_BUFSIZE;
|
||||
conn->rcvbufs = CONFIG_NET_RECV_BUFSIZE;
|
||||
#endif
|
||||
#if CONFIG_NET_SEND_BUFSIZE > 0
|
||||
conn->sndbufs = CONFIG_NET_SEND_BUFSIZE;
|
||||
conn->sndbufs = CONFIG_NET_SEND_BUFSIZE;
|
||||
|
||||
nxsem_init(&conn->sndsem, 0, 0);
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -184,7 +184,7 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn)
|
||||
dev->d_len = dev->d_sndlen + IPv4UDP_HDRLEN;
|
||||
|
||||
ipv4_build_header(IPv4BUF, dev->d_len, IP_PROTO_UDP,
|
||||
&dev->d_ipaddr, &raddr, conn->sconn.ttl,
|
||||
&dev->d_ipaddr, &raddr, conn->sconn.s_ttl,
|
||||
conn->sconn.s_tos, NULL);
|
||||
|
||||
#ifdef CONFIG_NET_STATISTICS
|
||||
@@ -219,7 +219,7 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn)
|
||||
|
||||
ipv6_build_header(IPv6BUF, dev->d_len, IP_PROTO_UDP,
|
||||
laddr, conn->u.ipv6.raddr,
|
||||
conn->sconn.ttl, conn->sconn.s_tclass);
|
||||
conn->sconn.s_ttl, conn->sconn.s_tclass);
|
||||
|
||||
/* The total length to send is the size of the application data
|
||||
* plus the IPv6 and UDP headers (and, eventually, the link layer
|
||||
|
||||
Reference in New Issue
Block a user