net: Rename IP_TTL to IP_TTL_DEFAULT
Since a SOL option IP_TTL exist, we should rename this IP_TTL in netconfig.h to avoid confusion. Signed-off-by: Huang Qi <huangqi3@xiaomi.com> Change-Id: Ib04c36553f23bce8d362e97294a8b83eaa050cf3
This commit is contained in:
parent
c303a12f26
commit
e5c278981a
@ -210,7 +210,7 @@
|
||||
* This should normally not be changed.
|
||||
*/
|
||||
|
||||
#define IP_TTL 64
|
||||
#define IP_TTL_DEFAULT 64
|
||||
|
||||
/* Network drivers often receive packets with garbage at the end
|
||||
* and are longer than the size of packet in the TCP header. The
|
||||
|
@ -133,7 +133,7 @@ static void sendto_request(FAR struct net_driver_s *dev,
|
||||
ipv4->ipid[1] = g_ipid & 0xff;
|
||||
ipv4->ipoffset[0] = IP_FLAG_DONTFRAG >> 8;
|
||||
ipv4->ipoffset[1] = IP_FLAG_DONTFRAG & 0xff;
|
||||
ipv4->ttl = IP_TTL;
|
||||
ipv4->ttl = IP_TTL_DEFAULT;
|
||||
ipv4->proto = IP_PROTO_ICMP;
|
||||
|
||||
net_ipv4addr_hdrcopy(ipv4->srcipaddr, &dev->d_ipaddr);
|
||||
|
@ -194,7 +194,7 @@ static int sixlowpan_tcp_header(FAR struct tcp_conn_s *conn,
|
||||
ipv6tcp->ipv6.tcf = 0x00;
|
||||
ipv6tcp->ipv6.flow = 0x00;
|
||||
ipv6tcp->ipv6.proto = IP_PROTO_TCP;
|
||||
ipv6tcp->ipv6.ttl = IP_TTL;
|
||||
ipv6tcp->ipv6.ttl = IP_TTL_DEFAULT;
|
||||
|
||||
/* The IPv6 header length field does not include the size of IPv6 IP
|
||||
* header.
|
||||
|
@ -139,7 +139,7 @@ static inline void tcp_ipv4_sendcomplete(FAR struct net_driver_s *dev,
|
||||
*/
|
||||
|
||||
ipv4->proto = IP_PROTO_TCP;
|
||||
ipv4->ttl = IP_TTL;
|
||||
ipv4->ttl = IP_TTL_DEFAULT;
|
||||
ipv4->vhl = 0x45;
|
||||
|
||||
/* At this point the TCP header holds the size of the payload, the
|
||||
@ -210,7 +210,7 @@ static inline void tcp_ipv6_sendcomplete(FAR struct net_driver_s *dev,
|
||||
*/
|
||||
|
||||
ipv6->proto = IP_PROTO_TCP;
|
||||
ipv6->ttl = IP_TTL;
|
||||
ipv6->ttl = IP_TTL_DEFAULT;
|
||||
|
||||
/* At this point the TCP header holds the size of the payload, the
|
||||
* TCP header, and the IP header. For IPv6, the IP length field does
|
||||
|
@ -584,7 +584,7 @@ FAR struct udp_conn_s *udp_alloc(uint8_t domain)
|
||||
conn->boundto = 0; /* Not bound to any interface */
|
||||
#endif
|
||||
conn->lport = 0;
|
||||
conn->ttl = IP_TTL;
|
||||
conn->ttl = IP_TTL_DEFAULT;
|
||||
#if CONFIG_NET_RECV_BUFSIZE > 0
|
||||
conn->rcvbufs = CONFIG_NET_RECV_BUFSIZE;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user