diff --git a/src/apps/snmp/snmp_netconn.c b/src/apps/snmp/snmp_netconn.c index aa83f391..440b461f 100644 --- a/src/apps/snmp/snmp_netconn.c +++ b/src/apps/snmp/snmp_netconn.c @@ -94,7 +94,7 @@ snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result) LWIP_UNUSED_ARG(conn); /* unused in case of IPV4 only configuration */ - ip_route_get_local_ip(IP_IS_V6_VAL(conn->pcb.udp->local_ip), &conn->pcb.udp->local_ip, dst, dst_if, dst_ip); + ip_route_get_local_ip(&conn->pcb.udp->local_ip, dst, dst_if, dst_ip); if((dst_if != NULL) && (dst_ip != NULL)) { ip_addr_copy(*result, *dst_ip); diff --git a/src/apps/snmp/snmp_raw.c b/src/apps/snmp/snmp_raw.c index 50a6ca07..2fb7765c 100644 --- a/src/apps/snmp/snmp_raw.c +++ b/src/apps/snmp/snmp_raw.c @@ -67,7 +67,7 @@ snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result) LWIP_UNUSED_ARG(udp_pcb); /* unused in case of IPV4 only configuration */ - ip_route_get_local_ip(IP_IS_V6_VAL(udp_pcb->local_ip), &udp_pcb->local_ip, dst, dst_if, dst_ip); + ip_route_get_local_ip(&udp_pcb->local_ip, dst, dst_if, dst_ip); if((dst_if != NULL) && (dst_ip != NULL)) { ip_addr_copy(*result, *dst_ip); diff --git a/src/core/raw.c b/src/core/raw.c index 6635d65e..b2c4d09c 100644 --- a/src/core/raw.c +++ b/src/core/raw.c @@ -279,7 +279,7 @@ raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) } } - netif = ip_route(IP_IS_V6(dst_ip), &pcb->local_ip, dst_ip); + netif = ip_route(&pcb->local_ip, dst_ip); if (netif == NULL) { LWIP_DEBUGF(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, ("raw_sendto: No route to ")); ip_addr_debug_print(RAW_DEBUG | LWIP_DBG_LEVEL_WARNING, dst_ip); @@ -307,7 +307,7 @@ raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) if (ip_addr_isany(&pcb->local_ip)) { /* use outgoing network interface IP address as source address */ - src_ip = ip_netif_get_local_ip(IP_IS_V6(dst_ip), netif, dst_ip); + src_ip = ip_netif_get_local_ip(netif, dst_ip); #if LWIP_IPV6 if (src_ip == NULL) { if (q != p) { @@ -332,7 +332,7 @@ raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) #endif NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); - err = ip_output_if(IP_IS_V6(dst_ip), q, src_ip, dst_ip, pcb->ttl, pcb->tos, pcb->protocol, netif); + err = ip_output_if(q, src_ip, dst_ip, pcb->ttl, pcb->tos, pcb->protocol, netif); NETIF_SET_HWADDRHINT(netif, NULL); /* did we chain a header earlier? */ diff --git a/src/core/tcp.c b/src/core/tcp.c index 861e20aa..783db33c 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -763,11 +763,7 @@ tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); - if (ipaddr != NULL) { - ip_addr_set(&pcb->remote_ip, ipaddr); - } else { - return ERR_VAL; - } + ip_addr_set(&pcb->remote_ip, ipaddr); pcb->remote_port = port; /* check if we have a route to the remote host */ @@ -775,7 +771,7 @@ tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, /* no local IP address set, yet. */ struct netif *netif; const ip_addr_t *local_ip; - ip_route_get_local_ip(IP_IS_V6(ipaddr), &pcb->local_ip, &pcb->remote_ip, netif, local_ip); + ip_route_get_local_ip(&pcb->local_ip, &pcb->remote_ip, netif, local_ip); if ((netif == NULL) || (local_ip == NULL)) { /* Don't even try to send a SYN packet if we have no route since that will fail. */ @@ -828,7 +824,7 @@ tcp_connect(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; #if TCP_CALCULATE_EFF_SEND_MSS - pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip, IP_IS_V6_VAL(pcb->remote_ip)); + pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; pcb->ssthresh = TCP_WND; @@ -1785,19 +1781,16 @@ tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest #if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING , const ip_addr_t *src #endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ -#if LWIP_IPV6 && LWIP_IPV4 - , u8_t isipv6 -#endif /* LWIP_IPV6 && LWIP_IPV4 */ ) { u16_t mss_s; struct netif *outif; s16_t mtu; - outif = ip_route(isipv6, src, dest); + outif = ip_route(src, dest); #if LWIP_IPV6 #if LWIP_IPV4 - if (isipv6) + if (IP_IS_V6(dest)) #endif /* LWIP_IPV4 */ { /* First look in destination cache, to see if there is a Path MTU. */ @@ -1819,7 +1812,7 @@ tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest if (mtu != 0) { #if LWIP_IPV6 #if LWIP_IPV4 - if (isipv6) + if (IP_IS_V6(dest)) #endif /* LWIP_IPV4 */ { mss_s = mtu - IP6_HLEN - TCP_HLEN; diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index b719435b..0dccad22 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -594,8 +594,7 @@ tcp_listen_input(struct tcp_pcb_listen *pcb) npcb->ssthresh = LWIP_TCP_INITIAL_SSTHRESH(npcb); #if TCP_CALCULATE_EFF_SEND_MSS - npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, - &npcb->remote_ip, IP_IS_V6_VAL(npcb->remote_ip)); + npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); #endif /* TCP_CALCULATE_EFF_SEND_MSS */ MIB2_STATS_INC(mib2.tcppassiveopens); @@ -736,8 +735,7 @@ tcp_process(struct tcp_pcb *pcb) pcb->state = ESTABLISHED; #if TCP_CALCULATE_EFF_SEND_MSS - pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip, - IP_IS_V6_VAL(pcb->remote_ip)); + pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); #endif /* TCP_CALCULATE_EFF_SEND_MSS */ /* Set ssthresh again after changing 'mss' and 'snd_wnd' */ diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 5de643fa..fa8d77fb 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -930,7 +930,7 @@ tcp_send_empty_ack(struct tcp_pcb *pcb) } #endif - netif = ip_route(IP_IS_V6_VAL(pcb->remote_ip), &pcb->local_ip, &pcb->remote_ip); + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); if (netif == NULL) { err = ERR_RTE; } else { @@ -941,7 +941,7 @@ tcp_send_empty_ack(struct tcp_pcb *pcb) } #endif NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(IP_IS_V6_VAL(pcb->remote_ip), p, &pcb->local_ip, &pcb->remote_ip, + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, pcb->tos, IP_PROTO_TCP, netif); NETIF_SET_HWADDRHINT(netif, NULL); } @@ -1161,7 +1161,7 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb) if (seg->flags & TF_SEG_OPTS_MSS) { u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS - mss = tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip, IP_IS_V6_VAL(pcb->remote_ip)); + mss = tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip); #else /* TCP_CALCULATE_EFF_SEND_MSS */ mss = TCP_MSS; #endif /* TCP_CALCULATE_EFF_SEND_MSS */ @@ -1189,15 +1189,14 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb) pcb->rtime = 0; } - netif = ip_route(IP_IS_V6_VAL(pcb->remote_ip), &pcb->local_ip, &pcb->remote_ip); + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); if (netif == NULL) { return ERR_RTE; } /* If we don't have a local IP address, we get one from netif */ if (ip_addr_isany(&pcb->local_ip)) { - const ip_addr_t *local_ip = ip_netif_get_local_ip(IP_IS_V6_VAL(pcb->remote_ip), netif, - &pcb->remote_ip); + const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); if (local_ip == NULL) { return ERR_RTE; } @@ -1262,7 +1261,7 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb) TCP_STATS_INC(tcp.xmit); NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(IP_IS_V6_VAL(pcb->remote_ip), seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, + err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, pcb->tos, IP_PROTO_TCP, netif); NETIF_SET_HWADDRHINT(netif, NULL); return err; @@ -1321,7 +1320,7 @@ tcp_rst(u32_t seqno, u32_t ackno, TCP_STATS_INC(tcp.xmit); MIB2_STATS_INC(mib2.tcpoutrsts); - netif = ip_route(IP_IS_V6(remote_ip), local_ip, remote_ip); + netif = ip_route(local_ip, remote_ip); if (netif != NULL) { #if CHECKSUM_GEN_TCP IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_TCP) { @@ -1330,7 +1329,7 @@ tcp_rst(u32_t seqno, u32_t ackno, } #endif /* Send output with hardcoded TTL/HL since we have no access to the pcb */ - ip_output_if(IP_IS_V6(remote_ip), p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP, netif); + ip_output_if(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP, netif); } pbuf_free(p); LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); @@ -1493,7 +1492,7 @@ tcp_keepalive(struct tcp_pcb *pcb) ("tcp_keepalive: could not allocate memory for pbuf\n")); return ERR_MEM; } - netif = ip_route(IP_IS_V6_VAL(pcb->remote_ip), &pcb->local_ip, &pcb->remote_ip); + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); if (netif == NULL) { err = ERR_RTE; } else { @@ -1508,8 +1507,7 @@ tcp_keepalive(struct tcp_pcb *pcb) /* Send output to IP */ NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(IP_IS_V6_VAL(pcb->remote_ip), p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, - 0, IP_PROTO_TCP, netif); + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, netif); NETIF_SET_HWADDRHINT(netif, NULL); } pbuf_free(p); @@ -1581,7 +1579,7 @@ tcp_zero_window_probe(struct tcp_pcb *pcb) pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len); } - netif = ip_route(IP_IS_V6_VAL(pcb->remote_ip), &pcb->local_ip, &pcb->remote_ip); + netif = ip_route(&pcb->local_ip, &pcb->remote_ip); if (netif == NULL) { err = ERR_RTE; } else { @@ -1595,7 +1593,7 @@ tcp_zero_window_probe(struct tcp_pcb *pcb) /* Send output to IP */ NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if(IP_IS_V6_VAL(pcb->remote_ip), p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, + err = ip_output_if(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, netif); NETIF_SET_HWADDRHINT(netif, NULL); } diff --git a/src/core/udp.c b/src/core/udp.c index 7327e6d9..6c3c5277 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -601,7 +601,7 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, #endif /* LWIP_IPV6 || (LWIP_IPV4 && LWIP_MULTICAST_TX_OPTIONS) */ /* find the outgoing network interface for this packet */ - netif = ip_route(IP_IS_V6(dst_ip_route), &pcb->local_ip, dst_ip_route); + netif = ip_route(&pcb->local_ip, dst_ip_route); /* no outgoing network interface could be found? */ if (netif == NULL) { @@ -886,7 +886,7 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,0x%02"X16_F",)\n", (u16_t)ip_proto)); /* output to IP */ NETIF_SET_HWADDRHINT(netif, &(pcb->addr_hint)); - err = ip_output_if_src(IP_IS_V6(dst_ip), q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif); + err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif); NETIF_SET_HWADDRHINT(netif, NULL); /* TODO: must this be increased even if error occurred? */ diff --git a/src/include/lwip/ip.h b/src/include/lwip/ip.h index 82fd657c..f1bb0ed7 100644 --- a/src/include/lwip/ip.h +++ b/src/include/lwip/ip.h @@ -225,63 +225,63 @@ extern struct ip_globals ip_data; #define ip_reset_option(pcb, opt) ((pcb)->so_options &= ~(opt)) #if LWIP_IPV4 && LWIP_IPV6 -#define ip_output(isipv6, p, src, dest, ttl, tos, proto) \ - ((isipv6) ? \ +#define ip_output(p, src, dest, ttl, tos, proto) \ + (IP_IS_V6(dest) ? \ ip6_output(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto) : \ ip4_output(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto)) -#define ip_output_if(isipv6, p, src, dest, ttl, tos, proto, netif) \ - ((isipv6) ? \ +#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ + (IP_IS_V6(dest) ? \ ip6_output_if(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \ ip4_output_if(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif)) -#define ip_output_if_src(isipv6, p, src, dest, ttl, tos, proto, netif) \ - ((isipv6) ? \ +#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ + (IP_IS_V6(dest) ? \ ip6_output_if_src(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, netif) : \ ip4_output_if_src(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, netif)) -#define ip_output_hinted(isipv6, p, src, dest, ttl, tos, proto, addr_hint) \ - ((isipv6) ? \ +#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ + (IP_IS_V6(dest) ? \ ip6_output_hinted(p, ip_2_ip6(src), ip_2_ip6(dest), ttl, tos, proto, addr_hint) : \ ip4_output_hinted(p, ip_2_ip4(src), ip_2_ip4(dest), ttl, tos, proto, addr_hint)) -#define ip_route(isipv6, src, dest) \ - ((isipv6) ? \ +#define ip_route(src, dest) \ + (IP_IS_V6(dest) ? \ ip6_route(ip_2_ip6(src), ip_2_ip6(dest)) : \ ip4_route_src(ip_2_ip4(dest), ip_2_ip4(src))) -#define ip_netif_get_local_ip(isipv6, netif, dest) ((isipv6) ? \ +#define ip_netif_get_local_ip(netif, dest) (IP_IS_V6(dest) ? \ ip6_netif_get_local_ip(netif, ip_2_ip6(dest)) : \ ip4_netif_get_local_ip(netif)) #define ip_debug_print(is_ipv6, p) ((is_ipv6) ? ip6_debug_print(p) : ip4_debug_print(p)) #elif LWIP_IPV4 /* LWIP_IPV4 && LWIP_IPV6 */ -#define ip_output(isipv6, p, src, dest, ttl, tos, proto) \ +#define ip_output(p, src, dest, ttl, tos, proto) \ ip4_output(p, src, dest, ttl, tos, proto) -#define ip_output_if(isipv6, p, src, dest, ttl, tos, proto, netif) \ +#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ ip4_output_if(p, src, dest, ttl, tos, proto, netif) -#define ip_output_if_src(isipv6, p, src, dest, ttl, tos, proto, netif) \ +#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ ip4_output_if_src(p, src, dest, ttl, tos, proto, netif) -#define ip_output_hinted(isipv6, p, src, dest, ttl, tos, proto, addr_hint) \ +#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ ip4_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) -#define ip_route(isipv6, src, dest) \ +#define ip_route(src, dest) \ ip4_route_src(dest, src) -#define ip_netif_get_local_ip(isipv6, netif, dest) \ +#define ip_netif_get_local_ip(netif, dest) \ ip4_netif_get_local_ip(netif) #define ip_debug_print(is_ipv6, p) ip4_debug_print(p) #elif LWIP_IPV6 /* LWIP_IPV4 && LWIP_IPV6 */ -#define ip_output(isipv6, p, src, dest, ttl, tos, proto) \ +#define ip_output(p, src, dest, ttl, tos, proto) \ ip6_output(p, src, dest, ttl, tos, proto) -#define ip_output_if(isipv6, p, src, dest, ttl, tos, proto, netif) \ +#define ip_output_if(p, src, dest, ttl, tos, proto, netif) \ ip6_output_if(p, src, dest, ttl, tos, proto, netif) -#define ip_output_if_src(isipv6, p, src, dest, ttl, tos, proto, netif) \ +#define ip_output_if_src(p, src, dest, ttl, tos, proto, netif) \ ip6_output_if_src(p, src, dest, ttl, tos, proto, netif) -#define ip_output_hinted(isipv6, p, src, dest, ttl, tos, proto, addr_hint) \ +#define ip_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) \ ip6_output_hinted(p, src, dest, ttl, tos, proto, addr_hint) -#define ip_route(isipv6, src, dest) \ +#define ip_route(src, dest) \ ip6_route(src, dest) -#define ip_netif_get_local_ip(isipv6, netif, dest) \ +#define ip_netif_get_local_ip(netif, dest) \ ip6_netif_get_local_ip(netif, dest) #define ip_debug_print(is_ipv6, p) ip6_debug_print(p) #endif /* LWIP_IPV6 */ -#define ip_route_get_local_ip(isipv6, src, dest, netif, ipaddr) do { \ - (netif) = ip_route(isipv6, src, dest); \ - (ipaddr) = ip_netif_get_local_ip(isipv6, netif, dest); \ +#define ip_route_get_local_ip(src, dest, netif, ipaddr) do { \ + (netif) = ip_route(src, dest); \ + (ipaddr) = ip_netif_get_local_ip(netif, dest); \ }while(0) err_t ip_input(struct pbuf *p, struct netif *inp); diff --git a/src/include/lwip/priv/tcp_priv.h b/src/include/lwip/priv/tcp_priv.h index 0ed616e2..b5261b44 100644 --- a/src/include/lwip/priv/tcp_priv.h +++ b/src/include/lwip/priv/tcp_priv.h @@ -502,17 +502,12 @@ u16_t tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest #if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING , const ip_addr_t *src #endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ -#if LWIP_IPV6 && LWIP_IPV4 - , u8_t isipv6 -#endif /* LWIP_IPV6 && LWIP_IPV4 */ ); -#if LWIP_IPV4 && LWIP_IPV6 -#define tcp_eff_send_mss(sendmss, src, dest, isipv6) tcp_eff_send_mss_impl(sendmss, dest, src, isipv6) -#elif LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING -#define tcp_eff_send_mss(sendmss, src, dest, isipv6) tcp_eff_send_mss_impl(sendmss, dest, src) -#else /* LWIP_IPV4 && LWIP_IPV6 */ -#define tcp_eff_send_mss(sendmss, src, dest, isipv6) tcp_eff_send_mss_impl(sendmss, dest) -#endif /* LWIP_IPV4 && LWIP_IPV6 */ +#if LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING +#define tcp_eff_send_mss(sendmss, src, dest) tcp_eff_send_mss_impl(sendmss, dest, src) +#else /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ +#define tcp_eff_send_mss(sendmss, src, dest) tcp_eff_send_mss_impl(sendmss, dest) +#endif /* LWIP_IPV6 || LWIP_IPV4_SRC_ROUTING */ #endif /* TCP_CALCULATE_EFF_SEND_MSS */ #if LWIP_CALLBACK_API