Networking: Final detangle off IPv4 and IPv6 TCP/UDP send logic. The Networking subsystem now compiles with IPv6 enabled

This commit is contained in:
Gregory Nutt
2015-01-18 08:56:05 -06:00
parent ea52bda8f9
commit f7663ef0ab
18 changed files with 637 additions and 382 deletions
+17 -1
View File
@@ -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