mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 17:13:49 +08:00
tcp.c, tcp_in.c, tcp.h, opt.h: Rename LWIP_CALCULATE_EFF_SEND_MSS in TCP_CALCULATE_EFF_SEND_MSS to have coherent TCP options names.
This commit is contained in:
@@ -511,9 +511,9 @@ tcp_connect(struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t port,
|
||||
pcb->snd_wnd = TCP_WND;
|
||||
/* The send MSS is updated when an MSS option is received. */
|
||||
pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS;
|
||||
#if LWIP_CALCULATE_EFF_SEND_MSS
|
||||
#if TCP_CALCULATE_EFF_SEND_MSS
|
||||
pcb->mss = tcp_eff_send_mss(pcb->mss, ipaddr);
|
||||
#endif /* LWIP_CALCULATE_EFF_SEND_MSS */
|
||||
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
|
||||
pcb->cwnd = 1;
|
||||
pcb->ssthresh = pcb->mss * 10;
|
||||
pcb->state = SYN_SENT;
|
||||
@@ -1225,7 +1225,7 @@ tcp_next_iss(void)
|
||||
return iss;
|
||||
}
|
||||
|
||||
#if LWIP_CALCULATE_EFF_SEND_MSS
|
||||
#if TCP_CALCULATE_EFF_SEND_MSS
|
||||
/**
|
||||
* Calcluates the effective send mss that can be used for a specific IP address
|
||||
* by using ip_route to determin the netif used to send to the address and
|
||||
@@ -1247,7 +1247,7 @@ tcp_eff_send_mss(u16_t sendmss, struct ip_addr *addr)
|
||||
}
|
||||
return sendmss;
|
||||
}
|
||||
#endif /* LWIP_CALCULATE_EFF_SEND_MSS */
|
||||
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
|
||||
|
||||
#if TCP_DEBUG || TCP_INPUT_DEBUG || TCP_OUTPUT_DEBUG
|
||||
/**
|
||||
|
||||
@@ -445,9 +445,9 @@ tcp_listen_input(struct tcp_pcb_listen *pcb)
|
||||
|
||||
/* Parse any options in the SYN. */
|
||||
tcp_parseopt(npcb);
|
||||
#if LWIP_CALCULATE_EFF_SEND_MSS
|
||||
#if TCP_CALCULATE_EFF_SEND_MSS
|
||||
npcb->mss = tcp_eff_send_mss(npcb->mss, &(npcb->remote_ip));
|
||||
#endif /* LWIP_CALCULATE_EFF_SEND_MSS */
|
||||
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
|
||||
|
||||
snmp_inc_tcppassiveopens();
|
||||
|
||||
@@ -553,9 +553,9 @@ tcp_process(struct tcp_pcb *pcb)
|
||||
/* Parse any options in the SYNACK before using pcb->mss since that
|
||||
* can be changed by the received options! */
|
||||
tcp_parseopt(pcb);
|
||||
#if LWIP_CALCULATE_EFF_SEND_MSS
|
||||
#if TCP_CALCULATE_EFF_SEND_MSS
|
||||
pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip));
|
||||
#endif /* LWIP_CALCULATE_EFF_SEND_MSS */
|
||||
#endif /* TCP_CALCULATE_EFF_SEND_MSS */
|
||||
|
||||
/* Set ssthresh again after changing pcb->mss (already set in tcp_connect
|
||||
* but for the default value of pcb->mss) */
|
||||
|
||||
Reference in New Issue
Block a user