mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
Networking: Final detangle off IPv4 and IPv6 TCP/UDP send logic. The Networking subsystem now compiles with IPv6 enabled
This commit is contained in:
+17
-1
@@ -139,7 +139,7 @@ unsigned int net_dsec2tick(int dsec);
|
||||
unsigned int net_timeval2dsec(FAR struct timeval *tv);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: tcp_chksum
|
||||
* Name: tcp_chksum, tcp_ipv4_chksum, and tcp_ipv6_chksum
|
||||
*
|
||||
* Description:
|
||||
* Calculate the TCP checksum of the packet in d_buf and d_appdata.
|
||||
@@ -157,7 +157,23 @@ unsigned int net_timeval2dsec(FAR struct timeval *tv);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
uint16_t tcp_ipv4_chksum(FAR struct net_driver_s *dev);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
/* REVIST: Is this used? */
|
||||
uint16_t tcp_ipv6_chksum(FAR struct net_driver_s *dev);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
|
||||
uint16_t tcp_chksum(FAR struct net_driver_s *dev);
|
||||
#elif defined(CONFIG_NET_IPv4)
|
||||
# define tcp_chksum(d) tcp_ipv4_chksum(d)
|
||||
#else /* if defined(CONFIG_NET_IPv6) */
|
||||
# define tcp_chksum(d) tcp_ipv6_chksum(d)
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Name: udp_chksum
|
||||
|
||||
Reference in New Issue
Block a user