Networking: Back out a previous change. It is incorrect

This commit is contained in:
Gregory Nutt 2015-01-22 12:10:16 -06:00
parent 46fc574f0f
commit eac4ea7ae5
2 changed files with 11 additions and 5 deletions

View File

@ -226,7 +226,7 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
#endif
{
DEBUGASSERT(IFF_IS_IPv4(dev->d_flags));
hdrlen = IPv4_HDRLEN;
hdrlen = IPv4TCP_HDRLEN;
}
#endif /* CONFIG_NET_IPv4 */
@ -236,7 +236,7 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
#endif
{
DEBUGASSERT(IFF_IS_IPv6(dev->d_flags));
hdrlen = IPv6_HDRLEN;
hdrlen = IPv6TCP_HDRLEN;
}
#endif /* CONFIG_NET_IPv6 */

View File

@ -145,6 +145,10 @@ static inline void tcp_ipv4_sendcomplete(FAR struct net_driver_s *dev,
ipv4->proto = IP_PROTO_TCP;
ipv4->ttl = IP_TTL;
/* At this point the TCP header holds the size of the payload, the
* TCP header, and the IP header.
*/
ipv4->len[0] = (dev->d_len >> 8);
ipv4->len[1] = (dev->d_len & 0xff);
@ -207,8 +211,9 @@ static inline void tcp_ipv6_sendcomplete(FAR struct net_driver_s *dev,
ipv6->proto = IP_PROTO_TCP;
ipv6->ttl = IP_TTL;
/* For IPv6, the IP length field does not include the IPv6 IP header
* length.
/* 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
* not include the size of IPv6 IP header length.
*/
iplen = dev->d_len - IPv6_HDRLEN;
@ -372,7 +377,8 @@ static void tcp_sendcommon(FAR struct net_driver_s *dev,
* dev - The device driver structure to use in the send operation
* conn - The TCP connection structure holding connection information
* flags - flags to apply to the TCP header
* len - length of the message
* len - length of the message (includes the length of the IP and TCP
* headers)
*
* Return:
* None