<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="tcp_8h" kind="file" language="C++">
    <compoundname>tcp.h</compoundname>
    <includes refid="opt_8h" local="yes">net/opt.h</includes>
    <includedby refid="memp_8c" local="yes">C:/Dev/git/UbixOS/sys/net/core/memp.c</includedby>
    <includedby refid="loopif_8c" local="yes">C:/Dev/git/UbixOS/sys/net/netif/loopif.c</includedby>
    <includedby refid="tcpdump_8c" local="yes">C:/Dev/git/UbixOS/sys/net/netif/tcpdump.c</includedby>
    <incdepgraph>
      <node id="17">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="18">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="15">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="8">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>net/arch/cc.h</label>
        <link refid="cc_8h"/>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/include/net/tcp.h</label>
        <link refid="tcp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="6">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="14">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="10">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="3">
        <label>C:/Dev/git/UbixOS/sys/net/netif/loopif.c</label>
        <link refid="loopif_8c"/>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/include/net/tcp.h</label>
        <link refid="tcp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>C:/Dev/git/UbixOS/sys/net/core/memp.c</label>
        <link refid="memp_8c"/>
      </node>
      <node id="4">
        <label>C:/Dev/git/UbixOS/sys/net/netif/tcpdump.c</label>
        <link refid="tcpdump_8c"/>
      </node>
    </invincdepgraph>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
<para>TCP API (to be used from TCPIP thread)<linebreak/>
See also <ref refid="group__tcp__raw" kindref="compound">TCP</ref> </para>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"></codeline>
<codeline lineno="7"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2001-2004<sp/>Swedish<sp/>Institute<sp/>of<sp/>Computer<sp/>Science.</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>are<sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/>1.<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer.</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/>2.<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer<sp/>in<sp/>the<sp/>documentation</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>and/or<sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>3.<sp/>The<sp/>name<sp/>of<sp/>the<sp/>author<sp/>may<sp/>not<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>``AS<sp/>IS&apos;&apos;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>SHALL<sp/>THE<sp/>AUTHOR<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS</highlight></codeline>
<codeline lineno="28"><highlight class="comment"><sp/>*<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="29"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING</highlight></codeline>
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY</highlight></codeline>
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="32"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>the<sp/>lwIP<sp/>TCP/IP<sp/>stack.</highlight></codeline>
<codeline lineno="34"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="35"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Adam<sp/>Dunkels<sp/>&lt;adam@sics.se&gt;</highlight></codeline>
<codeline lineno="36"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="37"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>LWIP_HDR_TCP_H</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_HDR_TCP_H</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="opt_8h" kindref="compound">net/opt.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCP<sp/></highlight><highlight class="comment">/*<sp/>don&apos;t<sp/>build<sp/>if<sp/>not<sp/>configured<sp/>for<sp/>use<sp/>in<sp/>lwipopts.h<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="mem_8h" kindref="compound">net/mem.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="pbuf_8h" kindref="compound">net/pbuf.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip_8h" kindref="compound">net/ip.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="icmp_8h" kindref="compound">net/icmp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="err_8h" kindref="compound">net/err.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip6_8h" kindref="compound">net/ip6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip6__addr_8h" kindref="compound">net/ip6_addr.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="keyword">extern</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">&quot;C&quot;</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>(*tcp_accept_fn)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*newpcb,<sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>err);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>(*tcp_recv_fn)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*tpcb,</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>err);</highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>(*tcp_sent_fn)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*tpcb,</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>len);</highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>(*tcp_poll_fn)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*tpcb);</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>void<sp/><sp/>(*tcp_err_fn)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>err);</highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>(*tcp_connected_fn)(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*tpcb,<sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>err);</highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_WND_SCALE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>RCV_WND_SCALE(pcb,<sp/>wnd)<sp/>(((wnd)<sp/>&gt;&gt;<sp/>(pcb)-&gt;rcv_scale))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>SND_WND_SCALE(pcb,<sp/>wnd)<sp/>(((wnd)<sp/>&lt;&lt;<sp/>(pcb)-&gt;snd_scale))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPWND16(x)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((u16_t)LWIP_MIN((x),<sp/>0xFFFF))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_WND_MAX(pcb)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((tcpwnd_size_t)(((pcb)-&gt;flags<sp/>&amp;<sp/>TF_WND_SCALE)<sp/>?<sp/>TCP_WND<sp/>:<sp/>TCPWND16(TCP_WND)))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="139"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>tcpwnd_size_t;</highlight></codeline>
<codeline lineno="140"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>RCV_WND_SCALE(pcb,<sp/>wnd)<sp/>(wnd)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="142"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>SND_WND_SCALE(pcb,<sp/>wnd)<sp/>(wnd)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPWND16(x)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(x)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_WND_MAX(pcb)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>TCP_WND</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>tcpwnd_size_t;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"></highlight></codeline>
<codeline lineno="148"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_WND_SCALE<sp/>||<sp/>TCP_LISTEN_BACKLOG<sp/>||<sp/>LWIP_TCP_TIMESTAMPS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="149"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>tcpflags_t;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight><highlight class="preprocessor">#else</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>tcpflags_t;</highlight></codeline>
<codeline lineno="152"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="153"><highlight class="normal"></highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight><highlight class="keyword">enum</highlight><highlight class="normal"><sp/>tcp_state<sp/>{</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/>CLOSED<sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0,</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/>LISTEN<sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>1,</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/>SYN_SENT<sp/><sp/><sp/><sp/>=<sp/>2,</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/>SYN_RCVD<sp/><sp/><sp/><sp/>=<sp/>3,</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/>ESTABLISHED<sp/>=<sp/>4,</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/>FIN_WAIT_1<sp/><sp/>=<sp/>5,</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/>FIN_WAIT_2<sp/><sp/>=<sp/>6,</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/>CLOSE_WAIT<sp/><sp/>=<sp/>7,</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/>CLOSING<sp/><sp/><sp/><sp/><sp/>=<sp/>8,</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/>LAST_ACK<sp/><sp/><sp/><sp/>=<sp/>9,</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/>TIME_WAIT<sp/><sp/><sp/>=<sp/>10</highlight></codeline>
<codeline lineno="166"><highlight class="normal">};</highlight></codeline>
<codeline lineno="167"><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="preprocessor">#define<sp/>TCP_PCB_COMMON(type)<sp/>\</highlight></codeline>
<codeline lineno="172"><highlight class="preprocessor"><sp/><sp/>type<sp/>*next;<sp/></highlight><highlight class="comment">/*<sp/>for<sp/>the<sp/>linked<sp/>list<sp/>*/</highlight><highlight class="preprocessor"><sp/>\</highlight></codeline>
<codeline lineno="173"><highlight class="preprocessor"><sp/><sp/>void<sp/>*callback_arg;<sp/>\</highlight></codeline>
<codeline lineno="174"><highlight class="preprocessor"><sp/><sp/>enum<sp/>tcp_state<sp/>state;<sp/></highlight><highlight class="comment">/*<sp/>TCP<sp/>state<sp/>*/</highlight><highlight class="preprocessor"><sp/>\</highlight></codeline>
<codeline lineno="175"><highlight class="preprocessor"><sp/><sp/>u8_t<sp/>prio;<sp/>\</highlight></codeline>
<codeline lineno="176"><highlight class="preprocessor"><sp/><sp/></highlight><highlight class="comment">/*<sp/>ports<sp/>are<sp/>in<sp/>host<sp/>byte<sp/>order<sp/>*/</highlight><highlight class="preprocessor"><sp/>\</highlight></codeline>
<codeline lineno="177"><highlight class="preprocessor"><sp/><sp/>u16_t<sp/>local_port</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="178"><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb_listen<sp/>{</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1a8bdf4b5f674375e76cdd968826d80e53" kindref="member">IP_PCB</ref>;</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/>TCP_PCB_COMMON(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb_listen);</highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_CALLBACK_API</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Function<sp/>to<sp/>call<sp/>when<sp/>a<sp/>listener<sp/>has<sp/>been<sp/>connected.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/>tcp_accept_fn<sp/>accept;</highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CALLBACK_API<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"></highlight></codeline>
<codeline lineno="192"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>TCP_LISTEN_BACKLOG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>backlog;</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>accepts_pending;</highlight></codeline>
<codeline lineno="195"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>TCP_LISTEN_BACKLOG<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal">};</highlight></codeline>
<codeline lineno="197"><highlight class="normal"></highlight></codeline>
<codeline lineno="198"><highlight class="normal"></highlight></codeline>
<codeline lineno="200"><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>{</highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1a8bdf4b5f674375e76cdd968826d80e53" kindref="member">IP_PCB</ref>;</highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/>TCP_PCB_COMMON(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb);</highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>ports<sp/>are<sp/>in<sp/>host<sp/>byte<sp/>order<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>remote_port;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"></highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/>tcpflags_t<sp/>flags;</highlight></codeline>
<codeline lineno="210"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_ACK_DELAY<sp/><sp/><sp/>0x01U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Delayed<sp/>ACK.<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="211"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_ACK_NOW<sp/><sp/><sp/><sp/><sp/>0x02U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Immediate<sp/>ACK.<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_INFR<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>0x04U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>In<sp/>fast<sp/>recovery.<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_CLOSEPEND<sp/><sp/><sp/>0x08U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>this<sp/>is<sp/>set,<sp/>tcp_close<sp/>failed<sp/>to<sp/>enqueue<sp/>the<sp/>FIN<sp/>(retried<sp/>in<sp/>tcp_tmr)<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="214"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_RXCLOSED<sp/><sp/><sp/><sp/>0x10U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>rx<sp/>closed<sp/>by<sp/>tcp_shutdown<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_FIN<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>0x20U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Connection<sp/>was<sp/>closed<sp/>locally<sp/>(FIN<sp/>segment<sp/>enqueued).<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="216"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_NODELAY<sp/><sp/><sp/><sp/><sp/>0x40U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Disable<sp/>Nagle<sp/>algorithm<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_NAGLEMEMERR<sp/>0x80U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>nagle<sp/>enabled,<sp/>memerr,<sp/>try<sp/>to<sp/>output<sp/>to<sp/>prevent<sp/>delayed<sp/>ACK<sp/>to<sp/>happen<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="218"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_WND_SCALE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="219"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_WND_SCALE<sp/><sp/><sp/>0x0100U<sp/></highlight><highlight class="comment">/*<sp/>Window<sp/>Scale<sp/>option<sp/>enabled<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="221"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>TCP_LISTEN_BACKLOG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_BACKLOGPEND<sp/>0x0200U<sp/></highlight><highlight class="comment">/*<sp/>If<sp/>this<sp/>is<sp/>set,<sp/>a<sp/>connection<sp/>pcb<sp/>has<sp/>increased<sp/>the<sp/>backlog<sp/>on<sp/>its<sp/>listener<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="223"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="224"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCP_TIMESTAMPS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TF_TIMESTAMP<sp/><sp/><sp/>0x0400U<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Timestamp<sp/>option<sp/>enabled<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="227"><highlight class="normal"></highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>the<sp/>rest<sp/>of<sp/>the<sp/>fields<sp/>are<sp/>in<sp/>host<sp/>byte<sp/>order</highlight></codeline>
<codeline lineno="229"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>as<sp/>we<sp/>have<sp/>to<sp/>do<sp/>some<sp/>math<sp/>with<sp/>them<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="230"><highlight class="normal"></highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Timers<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>polltmr,<sp/>pollinterval;</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>last_timer;</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>tmr;</highlight></codeline>
<codeline lineno="235"><highlight class="normal"></highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>receiver<sp/>variables<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>rcv_nxt;<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>next<sp/>seqno<sp/>expected<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/>tcpwnd_size_t<sp/>rcv_wnd;<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>receiver<sp/>window<sp/>available<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/>tcpwnd_size_t<sp/>rcv_ann_wnd;<sp/></highlight><highlight class="comment">/*<sp/>receiver<sp/>window<sp/>to<sp/>announce<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>rcv_ann_right_edge;<sp/></highlight><highlight class="comment">/*<sp/>announced<sp/>right<sp/>edge<sp/>of<sp/>window<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="241"><highlight class="normal"></highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Retransmission<sp/>timer.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref><sp/>rtime;</highlight></codeline>
<codeline lineno="244"><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>mss;<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>maximum<sp/>segment<sp/>size<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="246"><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>RTT<sp/>(round<sp/>trip<sp/>time)<sp/>estimation<sp/>variables<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>rttest;<sp/></highlight><highlight class="comment">/*<sp/>RTT<sp/>estimate<sp/>in<sp/>500ms<sp/>ticks<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>rtseq;<sp/><sp/></highlight><highlight class="comment">/*<sp/>sequence<sp/>number<sp/>being<sp/>timed<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref><sp/>sa,<sp/>sv;<sp/></highlight><highlight class="comment">/*<sp/>@todo<sp/>document<sp/>this<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="251"><highlight class="normal"></highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref><sp/>rto;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>retransmission<sp/>time-out<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>nrtx;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>number<sp/>of<sp/>retransmissions<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"></highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>fast<sp/>retransmit/recovery<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>dupacks;</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>lastack;<sp/></highlight><highlight class="comment">/*<sp/>Highest<sp/>acknowledged<sp/>seqno.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="258"><highlight class="normal"></highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>congestion<sp/>avoidance/control<sp/>variables<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/>tcpwnd_size_t<sp/>cwnd;</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/>tcpwnd_size_t<sp/>ssthresh;</highlight></codeline>
<codeline lineno="262"><highlight class="normal"></highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>sender<sp/>variables<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>snd_nxt;<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>next<sp/>new<sp/>seqno<sp/>to<sp/>be<sp/>sent<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>snd_wl1,<sp/>snd_wl2;<sp/></highlight><highlight class="comment">/*<sp/>Sequence<sp/>and<sp/>acknowledgement<sp/>numbers<sp/>of<sp/>last</highlight></codeline>
<codeline lineno="266"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>window<sp/>update.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>snd_lbb;<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Sequence<sp/>number<sp/>of<sp/>next<sp/>byte<sp/>to<sp/>be<sp/>buffered.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/>tcpwnd_size_t<sp/>snd_wnd;<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>sender<sp/>window<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/>tcpwnd_size_t<sp/>snd_wnd_max;<sp/></highlight><highlight class="comment">/*<sp/>the<sp/>maximum<sp/>sender<sp/>window<sp/>announced<sp/>by<sp/>the<sp/>remote<sp/>host<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="270"><highlight class="normal"></highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/>tcpwnd_size_t<sp/>snd_buf;<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Available<sp/>buffer<sp/>space<sp/>for<sp/>sending<sp/>(in<sp/>bytes).<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="272"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_SNDQUEUELEN_OVERFLOW<sp/>(0xffffU-3)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>snd_queuelen;<sp/></highlight><highlight class="comment">/*<sp/>Number<sp/>of<sp/>pbufs<sp/>currently<sp/>in<sp/>the<sp/>send<sp/>buffer.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="274"><highlight class="normal"></highlight></codeline>
<codeline lineno="275"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>TCP_OVERSIZE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Extra<sp/>bytes<sp/>available<sp/>at<sp/>the<sp/>end<sp/>of<sp/>the<sp/>last<sp/>pbuf<sp/>in<sp/>unsent.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>unsent_oversize;</highlight></codeline>
<codeline lineno="278"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>TCP_OVERSIZE<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="279"><highlight class="normal"></highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>These<sp/>are<sp/>ordered<sp/>by<sp/>sequence<sp/>number:<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_seg<sp/>*unsent;<sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Unsent<sp/>(queued)<sp/>segments.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_seg<sp/>*unacked;<sp/><sp/></highlight><highlight class="comment">/*<sp/>Sent<sp/>but<sp/>unacknowledged<sp/>segments.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="283"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>TCP_QUEUE_OOSEQ</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_seg<sp/>*ooseq;<sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Received<sp/>out<sp/>of<sp/>sequence<sp/>segments.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="285"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>TCP_QUEUE_OOSEQ<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="286"><highlight class="normal"></highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*refused_data;<sp/></highlight><highlight class="comment">/*<sp/>Data<sp/>previously<sp/>received<sp/>but<sp/>not<sp/>yet<sp/>taken<sp/>by<sp/>upper<sp/>layer<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="normal"></highlight></codeline>
<codeline lineno="289"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_CALLBACK_API<sp/>||<sp/>TCP_LISTEN_BACKLOG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb_listen*<sp/>listener;</highlight></codeline>
<codeline lineno="291"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CALLBACK_API<sp/>||<sp/>TCP_LISTEN_BACKLOG<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="292"><highlight class="normal"></highlight></codeline>
<codeline lineno="293"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_CALLBACK_API</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Function<sp/>to<sp/>be<sp/>called<sp/>when<sp/>more<sp/>send<sp/>buffer<sp/>space<sp/>is<sp/>available.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/>tcp_sent_fn<sp/>sent;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Function<sp/>to<sp/>be<sp/>called<sp/>when<sp/>(in-sequence)<sp/>data<sp/>has<sp/>arrived.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/>tcp_recv_fn<sp/>recv;</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Function<sp/>to<sp/>be<sp/>called<sp/>when<sp/>a<sp/>connection<sp/>has<sp/>been<sp/>set<sp/>up.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/>tcp_connected_fn<sp/>connected;</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Function<sp/>which<sp/>is<sp/>called<sp/>periodically.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/>tcp_poll_fn<sp/>poll;</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Function<sp/>to<sp/>be<sp/>called<sp/>whenever<sp/>a<sp/>fatal<sp/>error<sp/>occurs.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/>tcp_err_fn<sp/>errf;</highlight></codeline>
<codeline lineno="304"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CALLBACK_API<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="305"><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCP_TIMESTAMPS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>ts_lastacksent;</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>ts_recent;</highlight></codeline>
<codeline lineno="309"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCP_TIMESTAMPS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="310"><highlight class="normal"></highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>idle<sp/>time<sp/>before<sp/>KEEPALIVE<sp/>is<sp/>sent<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>keep_idle;</highlight></codeline>
<codeline lineno="313"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCP_KEEPALIVE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>keep_intvl;</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>keep_cnt;</highlight></codeline>
<codeline lineno="316"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCP_KEEPALIVE<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="317"><highlight class="normal"></highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Persist<sp/>timer<sp/>counter<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>persist_cnt;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Persist<sp/>timer<sp/>back-off<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>persist_backoff;</highlight></codeline>
<codeline lineno="322"><highlight class="normal"></highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>KEEPALIVE<sp/>counter<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>keep_cnt_sent;</highlight></codeline>
<codeline lineno="325"><highlight class="normal"></highlight></codeline>
<codeline lineno="326"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_WND_SCALE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>snd_scale;</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>rcv_scale;</highlight></codeline>
<codeline lineno="329"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="330"><highlight class="normal">};</highlight></codeline>
<codeline lineno="331"><highlight class="normal"></highlight></codeline>
<codeline lineno="332"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_EVENT_API</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="333"><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"></highlight><highlight class="keyword">enum</highlight><highlight class="normal"><sp/>lwip_event<sp/>{</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/>LWIP_EVENT_ACCEPT,</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/>LWIP_EVENT_SENT,</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/>LWIP_EVENT_RECV,</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/>LWIP_EVENT_CONNECTED,</highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/>LWIP_EVENT_POLL,</highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/>LWIP_EVENT_ERR</highlight></codeline>
<codeline lineno="341"><highlight class="normal">};</highlight></codeline>
<codeline lineno="342"><highlight class="normal"></highlight></codeline>
<codeline lineno="343"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>lwip_tcp_event(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">enum</highlight><highlight class="normal"><sp/>lwip_event,</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,</highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>size,</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>err);</highlight></codeline>
<codeline lineno="348"><highlight class="normal"></highlight></codeline>
<codeline lineno="349"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_EVENT_API<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="350"><highlight class="normal"></highlight></codeline>
<codeline lineno="351"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Application<sp/>program&apos;s<sp/>interface:<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="352"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*<sp/>tcp_new<sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="353"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*<sp/>tcp_new_ip_type<sp/>(<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>type);</highlight></codeline>
<codeline lineno="354"><highlight class="normal"></highlight></codeline>
<codeline lineno="355"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_arg<sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg);</highlight></codeline>
<codeline lineno="356"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_CALLBACK_API</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="357"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_recv<sp/><sp/><sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/>tcp_recv_fn<sp/>recv);</highlight></codeline>
<codeline lineno="358"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_sent<sp/><sp/><sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/>tcp_sent_fn<sp/>sent);</highlight></codeline>
<codeline lineno="359"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_err<sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/>tcp_err_fn<sp/>err);</highlight></codeline>
<codeline lineno="360"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_accept<sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/>tcp_accept_fn<sp/>accept);</highlight></codeline>
<codeline lineno="361"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CALLBACK_API<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="362"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_poll<sp/><sp/><sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/>tcp_poll_fn<sp/>poll,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>interval);</highlight></codeline>
<codeline lineno="363"><highlight class="normal"></highlight></codeline>
<codeline lineno="364"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCP_TIMESTAMPS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="365"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_mss(pcb)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(((pcb)-&gt;flags<sp/>&amp;<sp/>TF_TIMESTAMP)<sp/>?<sp/>((pcb)-&gt;mss<sp/>-<sp/>12)<sp/><sp/>:<sp/>(pcb)-&gt;mss)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="366"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCP_TIMESTAMPS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="367"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_mss(pcb)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((pcb)-&gt;mss)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="368"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCP_TIMESTAMPS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="369"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_sndbuf(pcb)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(TCPWND16((pcb)-&gt;snd_buf))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="370"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_sndqueuelen(pcb)<sp/><sp/><sp/><sp/><sp/>((pcb)-&gt;snd_queuelen)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="371"><highlight class="normal"></highlight></codeline>
<codeline lineno="372"><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_nagle_disable(pcb)<sp/><sp/><sp/>((pcb)-&gt;flags<sp/>|=<sp/>TF_NODELAY)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="373"><highlight class="normal"></highlight></codeline>
<codeline lineno="374"><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_nagle_enable(pcb)<sp/><sp/><sp/><sp/>((pcb)-&gt;flags<sp/>=<sp/>(tcpflags_t)((pcb)-&gt;flags<sp/>&amp;<sp/>~TF_NODELAY))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="375"><highlight class="normal"></highlight></codeline>
<codeline lineno="376"><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_nagle_disabled(pcb)<sp/><sp/>(((pcb)-&gt;flags<sp/>&amp;<sp/>TF_NODELAY)<sp/>!=<sp/>0)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="377"><highlight class="normal"></highlight></codeline>
<codeline lineno="378"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>TCP_LISTEN_BACKLOG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="379"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_backlog_set(pcb,<sp/>new_backlog)<sp/>do<sp/>{<sp/>\</highlight></codeline>
<codeline lineno="380"><highlight class="preprocessor"><sp/><sp/>LWIP_ASSERT(&quot;pcb-&gt;state<sp/>==<sp/>LISTEN<sp/>(called<sp/>for<sp/>wrong<sp/>pcb?)&quot;,<sp/>(pcb)-&gt;state<sp/>==<sp/>LISTEN);<sp/>\</highlight></codeline>
<codeline lineno="381"><highlight class="preprocessor"><sp/><sp/>((struct<sp/>tcp_pcb_listen<sp/>*)(pcb))-&gt;backlog<sp/>=<sp/>((new_backlog)<sp/>?<sp/>(new_backlog)<sp/>:<sp/>1);<sp/>}<sp/>while(0)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="382"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_backlog_delayed(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb*<sp/>pcb);</highlight></codeline>
<codeline lineno="383"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_backlog_accepted(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb*<sp/>pcb);</highlight></codeline>
<codeline lineno="384"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/><sp/></highlight><highlight class="comment">/*<sp/>TCP_LISTEN_BACKLOG<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="385"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_backlog_set(pcb,<sp/>new_backlog)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="386"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_backlog_delayed(pcb)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="387"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_backlog_accepted(pcb)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="388"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>TCP_LISTEN_BACKLOG<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="389"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_accepted(pcb)<sp/></highlight><highlight class="comment">/*<sp/>compatibility<sp/>define,<sp/>not<sp/>needed<sp/>any<sp/>more<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="390"><highlight class="normal"></highlight></codeline>
<codeline lineno="391"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_recved<sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>len);</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_bind<sp/><sp/><sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref><sp/>*ipaddr,</highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>port);</highlight></codeline>
<codeline lineno="394"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_connect<sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref><sp/>*ipaddr,</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>port,<sp/>tcp_connected_fn<sp/>connected);</highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
<codeline lineno="397"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*<sp/>tcp_listen_with_backlog_and_err(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>backlog,<sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>*err);</highlight></codeline>
<codeline lineno="398"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcp_pcb<sp/>*<sp/>tcp_listen_with_backlog(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>backlog);</highlight></codeline>
<codeline lineno="400"><highlight class="preprocessor">#define<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_listen(pcb)<sp/>tcp_listen_with_backlog(pcb,<sp/>TCP_DEFAULT_LISTEN_BACKLOG)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="401"><highlight class="normal"></highlight></codeline>
<codeline lineno="402"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_abort<sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb);</highlight></codeline>
<codeline lineno="403"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_close<sp/><sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb);</highlight></codeline>
<codeline lineno="404"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_shutdown(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>shut_rx,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>shut_tx);</highlight></codeline>
<codeline lineno="405"><highlight class="normal"></highlight></codeline>
<codeline lineno="406"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Flags<sp/>for<sp/>&quot;apiflags&quot;<sp/>parameter<sp/>in<sp/>tcp_write<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="407"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_WRITE_FLAG_COPY<sp/>0x01</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="408"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_WRITE_FLAG_MORE<sp/>0x02</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="409"><highlight class="normal"></highlight></codeline>
<codeline lineno="410"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_write<sp/><sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*dataptr,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>len,</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>apiflags);</highlight></codeline>
<codeline lineno="412"><highlight class="normal"></highlight></codeline>
<codeline lineno="413"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_setprio<sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>prio);</highlight></codeline>
<codeline lineno="414"><highlight class="normal"></highlight></codeline>
<codeline lineno="415"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_PRIO_MIN<sp/><sp/><sp/><sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="416"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_PRIO_NORMAL<sp/>64</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="417"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_PRIO_MAX<sp/><sp/><sp/><sp/>127</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="418"><highlight class="normal"></highlight></codeline>
<codeline lineno="419"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tcp_output<sp/><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcp_pcb<sp/>*pcb);</highlight></codeline>
<codeline lineno="420"><highlight class="normal"></highlight></codeline>
<codeline lineno="421"><highlight class="normal"></highlight></codeline>
<codeline lineno="422"><highlight class="normal"></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>tcp_debug_state_str(</highlight><highlight class="keyword">enum</highlight><highlight class="normal"><sp/>tcp_state<sp/>s);</highlight></codeline>
<codeline lineno="423"><highlight class="normal"></highlight></codeline>
<codeline lineno="424"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>for<sp/>compatibility<sp/>with<sp/>older<sp/>implementation<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="425"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>tcp_new_ip6()<sp/>tcp_new_ip_type(IPADDR_TYPE_V6)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="426"><highlight class="normal"></highlight></codeline>
<codeline lineno="427"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="428"><highlight class="normal">}</highlight></codeline>
<codeline lineno="429"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="430"><highlight class="normal"></highlight></codeline>
<codeline lineno="431"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="432"><highlight class="normal"></highlight></codeline>
<codeline lineno="433"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HDR_TCP_H<sp/>*/</highlight><highlight class="preprocessor"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/include/net/tcp.h"/>
  </compounddef>
</doxygen>
