NET: Rename uip_mss to tcp_mss

This commit is contained in:
Gregory Nutt 2014-06-30 19:09:23 -06:00
parent 5d7915e5ef
commit 77330679d4
6 changed files with 14 additions and 14 deletions

View File

@ -102,7 +102,7 @@
* a MTU of 296 and window of 256, but actually only sends 168 bytes of data:
* 40 + 128. I believe that is to allow for the 2x worst cast packet
* expansion. Ideally we would like to advertise the 256 MSS, but restrict
* uIP to 128 bytes (possibly by modifying the uip_mss() macro).
* uIP to 128 bytes (possibly by modifying the tcp_mss() macro).
*/
#if CONFIG_NET_BUFSIZE < 296

View File

@ -486,10 +486,10 @@ int tcp_backlogdelete(FAR struct tcp_conn_s *conn,
} while (0)
/* Get the current maximum segment size that can be sent on the current
* connection.
* TCP connection.
*/
#define uip_mss(conn) ((conn)->mss)
#define tcp_mss(conn) ((conn)->mss)
#endif /* CONFIG_NET_TCP */
#endif /* __INCLUDE_NUTTX_NET_TCP_H */

View File

@ -185,7 +185,7 @@ uint16_t devif_callback_execute(FAR struct net_driver_s *dev, FAR void *pvconn,
* The amount of data that actually is sent out after a call to this
* function is determined by the maximum amount of data TCP allows. uIP
* will automatically crop the data so that only the appropriate
* amount of data is sent. The function uip_mss() can be used to query
* amount of data is sent. The function tcp_mss() can be used to query
* uIP for the amount of data that actually will be sent.
*
* Note: This function does not guarantee that the sent data will

View File

@ -262,9 +262,9 @@ static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvcon
uint32_t sndlen = pstate->snd_flen - pstate->snd_sent;
if (sndlen > uip_mss(conn))
if (sndlen > tcp_mss(conn))
{
sndlen = uip_mss(conn);
sndlen = tcp_mss(conn);
}
/* Check if we have "space" in the window */

View File

@ -563,9 +563,9 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev,
*/
sndlen = WRB_PKTLEN(wrb) - WRB_SENT(wrb);
if (sndlen > uip_mss(conn))
if (sndlen > tcp_mss(conn))
{
sndlen = uip_mss(conn);
sndlen = tcp_mss(conn);
}
if (sndlen > conn->winsize)

View File

@ -297,12 +297,12 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
if (sndlen >= CONFIG_NET_TCP_SPLIT_SIZE)
{
/* sndlen is the number of bytes remaining to be sent.
* uip_mss(conn) will return the number of bytes that can sent
* tcp_mss(conn) will return the number of bytes that can sent
* in one packet. The difference, then, is the number of bytes
* that would be sent in the next packet after this one.
*/
int32_t next_sndlen = sndlen - uip_mss(conn);
int32_t next_sndlen = sndlen - tcp_mss(conn);
/* Is this the even packet in the packet pair transaction? */
@ -329,13 +329,13 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
{
/* Will there be another (even) packet afer this one?
* (next_sndlen > 0) Will the split condition occur on that
* next, even packet? ((next_sndlen - uip_mss(conn)) < 0) If
* next, even packet? ((next_sndlen - tcp_mss(conn)) < 0) If
* so, then perform the split now to avoid the case where the
* byte count is less than CONFIG_NET_TCP_SPLIT_SIZE on the
* next pair.
*/
if (next_sndlen > 0 && (next_sndlen - uip_mss(conn)) < 0)
if (next_sndlen > 0 && (next_sndlen - tcp_mss(conn)) < 0)
{
/* Here, we know that sndlen must be MSS < sndlen <= 2*MSS
* and so (sndlen / 2) is <= MSS.
@ -352,9 +352,9 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev,
#endif /* CONFIG_NET_TCP_SPLIT */
if (sndlen > uip_mss(conn))
if (sndlen > tcp_mss(conn))
{
sndlen = uip_mss(conn);
sndlen = tcp_mss(conn);
}
/* Check if we have "space" in the window */