diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-15 13:13:23 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-15 13:13:23 -0600 |
commit | 24a33a43436bcc8430c5c1e6707dedc8c2531171 (patch) | |
tree | bf837b9244093960c729978056c8097c198541a0 /nuttx/net/tcp/tcp_send.c | |
parent | cf1c261a3dccb0f1ab7c98f1ad3900417b1d8262 (diff) | |
download | px4-nuttx-24a33a43436bcc8430c5c1e6707dedc8c2531171.tar.gz px4-nuttx-24a33a43436bcc8430c5c1e6707dedc8c2531171.tar.bz2 px4-nuttx-24a33a43436bcc8430c5c1e6707dedc8c2531171.zip |
Network: All logic will now handle varialbe length link layer protocol headers within incoming packets. This permits use of multiple network interfaces with differing data links. For example, ETHERNET + SLIP
Diffstat (limited to 'nuttx/net/tcp/tcp_send.c')
-rw-r--r-- | nuttx/net/tcp/tcp_send.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/net/tcp/tcp_send.c b/nuttx/net/tcp/tcp_send.c index 4f615721e..d68855511 100644 --- a/nuttx/net/tcp/tcp_send.c +++ b/nuttx/net/tcp/tcp_send.c @@ -62,7 +62,7 @@ * Pre-processor Definitions ****************************************************************************/ -#define BUF ((struct tcp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN]) +#define BUF ((struct tcp_iphdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev)]) /**************************************************************************** * Public Variables @@ -360,8 +360,8 @@ void tcp_ack(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, pbuf->optdata[0] = TCP_OPT_MSS; pbuf->optdata[1] = TCP_OPT_MSS_LEN; - pbuf->optdata[2] = (TCP_MSS) / 256; - pbuf->optdata[3] = (TCP_MSS) & 255; + pbuf->optdata[2] = TCP_MSS(dev) / 256; + pbuf->optdata[3] = TCP_MSS(dev) & 255; dev->d_len = IPTCP_HDRLEN + TCP_OPT_MSS_LEN; pbuf->tcpoffset = ((TCP_HDRLEN + TCP_OPT_MSS_LEN) / 4) << 4; |