From f02c39a402eb81a1028138b972b591f14b0441d7 Mon Sep 17 00:00:00 2001 From: fbernon Date: Tue, 22 Jan 2008 21:15:14 +0000 Subject: [PATCH] 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. --- CHANGELOG | 4 ++++ src/core/tcp.c | 8 ++++---- src/core/tcp_in.c | 8 ++++---- src/include/lwip/opt.h | 8 ++++---- src/include/lwip/tcp.h | 4 ++-- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6c006c14..2dd683b1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,10 @@ HISTORY ++ New features: + 2008-01-22 Frédéric Bernon + * 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. + 2008-01-14 Frédéric Bernon * rawapi.txt, api_msg.c, tcp.c, tcp_in.c, tcp.h: changes for task #7675 "Enable to refuse data on a TCP_EVENT_RECV call". Important, behavior changes for the diff --git a/src/core/tcp.c b/src/core/tcp.c index 531b26d5..cfa0bd09 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -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 /** diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index f3943123..a06d9ae1 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -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) */ diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index bb0fce58..bd98ca1e 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -677,15 +677,15 @@ #endif /** - * LWIP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really + * TCP_CALCULATE_EFF_SEND_MSS: "The maximum size of a segment that TCP really * sends, the 'effective send MSS,' MUST be the smaller of the send MSS (which * reflects the available reassembly buffer size at the remote host) and the * largest size permitted by the IP layer" (RFC 1122) * Setting this to 1 enables code that checks TCP_MSS against the MTU of the - * netif used for a connection and limits the MSS it would be too big otherwise. + * netif used for a connection and limits the MSS if it would be too big otherwise. */ -#ifndef LWIP_CALCULATE_EFF_SEND_MSS -#define LWIP_CALCULATE_EFF_SEND_MSS 1 +#ifndef TCP_CALCULATE_EFF_SEND_MSS +#define TCP_CALCULATE_EFF_SEND_MSS 1 #endif diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index 3fb04464..149b66a5 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -531,9 +531,9 @@ u32_t tcp_next_iss(void); void tcp_keepalive(struct tcp_pcb *pcb); void tcp_zero_window_probe(struct tcp_pcb *pcb); -#if LWIP_CALCULATE_EFF_SEND_MSS +#if TCP_CALCULATE_EFF_SEND_MSS u16_t tcp_eff_send_mss(u16_t sendmss, struct ip_addr *addr); -#endif /* LWIP_CALCULATE_EFF_SEND_MSS*/ +#endif /* TCP_CALCULATE_EFF_SEND_MSS */ extern struct tcp_pcb *tcp_input_pcb; extern u32_t tcp_ticks;