<?xml version='1.0' encoding='iso-8859-1' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.4.7">
  <compounddef id="api__lib_8c" kind="file">
    <compoundname>api_lib.c</compoundname>
    <includes refid="types_8h" local="no">ubixos/types.h</includes>
    <includes refid="debug_8h" local="yes">net/debug.h</includes>
    <includes refid="api_8h" local="yes">net/api.h</includes>
    <includes refid="api__msg_8h" local="yes">net/api_msg.h</includes>
    <includes refid="memp_8h" local="yes">net/memp.h</includes>
    <includes refid="kprintf_8h" local="yes">lib/kprintf.h</includes>
    <incdepgraph>
      <node id="3824">
        <label>net/ipv4/ip.h</label>
        <link refid="ipv4_2ip_8h"/>
        <childnode refid="3819" relation="include">
        </childnode>
        <childnode refid="3825" relation="include">
        </childnode>
        <childnode refid="3818" relation="include">
        </childnode>
        <childnode refid="3827" relation="include">
        </childnode>
        <childnode refid="3828" relation="include">
        </childnode>
        <childnode refid="3829" relation="include">
        </childnode>
      </node>
      <node id="3826">
        <label>arch/lib.h</label>
        <link refid="lib_8h"/>
      </node>
      <node id="3828">
        <label>net/netif.h</label>
        <link refid="netif_8h"/>
        <childnode refid="3816" relation="include">
        </childnode>
        <childnode refid="3829" relation="include">
        </childnode>
        <childnode refid="3827" relation="include">
        </childnode>
        <childnode refid="3830" relation="include">
        </childnode>
        <childnode refid="3818" relation="include">
        </childnode>
      </node>
      <node id="3831">
        <label>net/udp.h</label>
        <link refid="udp_8h"/>
        <childnode refid="3819" relation="include">
        </childnode>
        <childnode refid="3818" relation="include">
        </childnode>
        <childnode refid="3830" relation="include">
        </childnode>
        <childnode refid="3824" relation="include">
        </childnode>
        <childnode refid="3829" relation="include">
        </childnode>
      </node>
      <node id="3820">
        <label>arch/cpu.h</label>
        <link refid="cpu_8h"/>
      </node>
      <node id="3823">
        <label>arch/sys_arch.h</label>
        <link refid="sys__arch_8h"/>
      </node>
      <node id="3832">
        <label>net/tcp.h</label>
        <link refid="tcp_8h"/>
        <childnode refid="3822" relation="include">
        </childnode>
        <childnode refid="3833" relation="include">
        </childnode>
        <childnode refid="3818" relation="include">
        </childnode>
        <childnode refid="3816" relation="include">
        </childnode>
        <childnode refid="3824" relation="include">
        </childnode>
        <childnode refid="3834" relation="include">
        </childnode>
        <childnode refid="3829" relation="include">
        </childnode>
      </node>
      <node id="3812">
        <label>ubixos/types.h</label>
        <link refid="types_8h"/>
        <childnode refid="3813" relation="include">
        </childnode>
      </node>
      <node id="3813">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="3819">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="3820" relation="include">
        </childnode>
        <childnode refid="3821" relation="include">
        </childnode>
      </node>
      <node id="3834">
        <label>net/ipv4/icmp.h</label>
        <link refid="ipv4_2icmp_8h"/>
        <childnode refid="3819" relation="include">
        </childnode>
        <childnode refid="3816" relation="include">
        </childnode>
        <childnode refid="3818" relation="include">
        </childnode>
        <childnode refid="3828" relation="include">
        </childnode>
      </node>
      <node id="3817">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="3835">
        <label>net/api_msg.h</label>
        <link refid="api__msg_8h"/>
        <childnode refid="3816" relation="include">
        </childnode>
        <childnode refid="3818" relation="include">
        </childnode>
        <childnode refid="3822" relation="include">
        </childnode>
        <childnode refid="3824" relation="include">
        </childnode>
        <childnode refid="3831" relation="include">
        </childnode>
        <childnode refid="3832" relation="include">
        </childnode>
        <childnode refid="3815" relation="include">
        </childnode>
      </node>
      <node id="3811">
        <label>src/sys/net/api/api_lib.c</label>
        <link refid="api_lib.c"/>
        <childnode refid="3812" relation="include">
        </childnode>
        <childnode refid="3814" relation="include">
        </childnode>
        <childnode refid="3815" relation="include">
        </childnode>
        <childnode refid="3835" relation="include">
        </childnode>
        <childnode refid="3836" relation="include">
        </childnode>
        <childnode refid="3837" relation="include">
        </childnode>
      </node>
      <node id="3825">
        <label>net/def.h</label>
        <link refid="def_8h"/>
        <childnode refid="3826" relation="include">
        </childnode>
      </node>
      <node id="3833">
        <label>net/mem.h</label>
        <link refid="mem_8h"/>
        <childnode refid="3812" relation="include">
        </childnode>
        <childnode refid="3814" relation="include">
        </childnode>
        <childnode refid="3816" relation="include">
        </childnode>
        <childnode refid="3819" relation="include">
        </childnode>
      </node>
      <node id="3836">
        <label>net/memp.h</label>
        <link refid="memp_8h"/>
        <childnode refid="3812" relation="include">
        </childnode>
        <childnode refid="3814" relation="include">
        </childnode>
        <childnode refid="3821" relation="include">
        </childnode>
        <childnode refid="3817" relation="include">
        </childnode>
      </node>
      <node id="3837">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3812" relation="include">
        </childnode>
      </node>
      <node id="3827">
        <label>net/ipv4/ip_addr.h</label>
        <link refid="ipv4_2ip__addr_8h"/>
        <childnode refid="3819" relation="include">
        </childnode>
      </node>
      <node id="3829">
        <label>net/err.h</label>
        <link refid="err_8h"/>
        <childnode refid="3812" relation="include">
        </childnode>
        <childnode refid="3814" relation="include">
        </childnode>
        <childnode refid="3821" relation="include">
        </childnode>
      </node>
      <node id="3815">
        <label>net/api.h</label>
        <link refid="api_8h"/>
        <childnode refid="3816" relation="include">
        </childnode>
        <childnode refid="3818" relation="include">
        </childnode>
        <childnode refid="3822" relation="include">
        </childnode>
        <childnode refid="3824" relation="include">
        </childnode>
        <childnode refid="3831" relation="include">
        </childnode>
        <childnode refid="3832" relation="include">
        </childnode>
        <childnode refid="3829" relation="include">
        </childnode>
      </node>
      <node id="3816">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="3817" relation="include">
        </childnode>
      </node>
      <node id="3822">
        <label>net/sys.h</label>
        <link refid="sys_8h"/>
        <childnode refid="3821" relation="include">
        </childnode>
        <childnode refid="3823" relation="include">
        </childnode>
      </node>
      <node id="3818">
        <label>net/pbuf.h</label>
        <link refid="pbuf_8h"/>
        <childnode refid="3814" relation="include">
        </childnode>
        <childnode refid="3819" relation="include">
        </childnode>
      </node>
      <node id="3814">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
      </node>
      <node id="3830">
        <label>net/ipv4/inet.h</label>
        <link refid="ipv4_2inet_8h"/>
        <childnode refid="3819" relation="include">
        </childnode>
        <childnode refid="3816" relation="include">
        </childnode>
        <childnode refid="3818" relation="include">
        </childnode>
        <childnode refid="3827" relation="include">
        </childnode>
      </node>
      <node id="3821">
        <label>arch/cc.h</label>
        <link refid="cc_8h"/>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="api__lib_8c_17770b72b0ae9e741fbb81f222e334a1a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void *</type>
        <definition>void* netbuf_alloc</definition>
        <argsstring>(struct netbuf *buf, uInt16 size)</argsstring>
        <name>netbuf_alloc</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
          <declname>size</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="79" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="78" bodyend="90"/>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="structpbuf_18d32dc3e964369d4eec638fc37fbc460" compoundref="pbuf_8h" startline="71">pbuf::payload</references>
        <references refid="pbuf_8h_1bb6c8efa7f7739e71cb286c6dd4a47ef">pbuf_alloc</references>
        <references refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746">pbuf_free</references>
        <references refid="pbuf_8h_1b3c589840cc5a202e7278f41463f97e7c5e9f28455bca98944a030d4b84ecfab">PBUF_RAM</references>
        <references refid="pbuf_8h_1ee1baa59bb2f85ba575b5a8619ac1ebf2ded3594a3977f8bf9cf09552be327b5">PBUF_TRANSPORT</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1631e8bddd99b2397cd0b26973c659602" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void netbuf_chain</definition>
        <argsstring>(struct netbuf *head, struct netbuf *tail)</argsstring>
        <name>netbuf_chain</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>head</declname>
        </param>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>tail</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="115" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="114" bodyend="119"/>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e">MEMP_NETBUF</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="pbuf_8h_1831c9a72bda1d3bd4c7b96f5a0e3b891">pbuf_chain</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_17c70594658105835086ed6fe19aa8067" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void netbuf_copy</definition>
        <argsstring>(struct netbuf *buf, void *dataptr, uInt16 len)</argsstring>
        <name>netbuf_copy</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>dataptr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
          <declname>len</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="187" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="186" bodyend="189"/>
        <references refid="api_8h_19a5f4f669674daa2f3b7b303d7cea915" compoundref="api__lib_8c" startline="158" endline="183">netbuf_copy_partial</references>
        <referencedby refid="bot_8c_1ab86e03f8301aa7da6924fe6120e0d31" compoundref="bot_8c" startline="56" endline="81">bot_thread</referencedby>
        <referencedby refid="shell_8c_1ac82cf7e63df29786725f476f0fbbe1b" compoundref="shell_8c" startline="66" endline="92">shell_main</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_19a5f4f669674daa2f3b7b303d7cea915" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void netbuf_copy_partial</definition>
        <argsstring>(struct netbuf *buf, void *dataptr, uInt16 len, uInt16 offset)</argsstring>
        <name>netbuf_copy_partial</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>dataptr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
          <declname>len</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
          <declname>offset</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="159" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="158" bodyend="183"/>
        <references refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" compoundref="pbuf_8h" startline="76">pbuf::len</references>
        <references refid="structpbuf_15e5763c94fd18d78937b0b58ce7df341" compoundref="pbuf_8h" startline="67">pbuf::next</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="structpbuf_18d32dc3e964369d4eec638fc37fbc460" compoundref="pbuf_8h" startline="71">pbuf::payload</references>
        <referencedby refid="sockets_8c_1a433d1ebe9c87f57160c0d260e225705" compoundref="sockets_8c" startline="216" endline="290">lwip_recvfrom</referencedby>
        <referencedby refid="api__lib_8c_17c70594658105835086ed6fe19aa8067" compoundref="api__lib_8c" startline="186" endline="189">netbuf_copy</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1b47d915f31d9e5d1218ed238f0428386" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netbuf_data</definition>
        <argsstring>(struct netbuf *buf, void **dataptr, uInt16 *len)</argsstring>
        <name>netbuf_data</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type>void **</type>
          <declname>dataptr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref> *</type>
          <declname>len</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="129" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="128" bodyend="136"/>
        <references refid="err_8h_1e1dcf352601ec4d3b700910df24f863d" compoundref="err_8h" startline="50">ERR_BUF</references>
        <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references>
        <references refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" compoundref="pbuf_8h" startline="76">pbuf::len</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structpbuf_18d32dc3e964369d4eec638fc37fbc460" compoundref="pbuf_8h" startline="71">pbuf::payload</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_19dfd3ddfe0ec65009cb140c68404b09d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void netbuf_delete</definition>
        <argsstring>(struct netbuf *buf)</argsstring>
        <name>netbuf_delete</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="67" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="66" bodyend="75"/>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e">MEMP_NETBUF</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746">pbuf_free</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
        <referencedby refid="bot_8c_1ab86e03f8301aa7da6924fe6120e0d31" compoundref="bot_8c" startline="56" endline="81">bot_thread</referencedby>
        <referencedby refid="sockets_8c_1fd0897a2e23d99a5dffcc976c7e5d72c" compoundref="sockets_8c" startline="147" endline="166">lwip_close</referencedby>
        <referencedby refid="sockets_8c_1a433d1ebe9c87f57160c0d260e225705" compoundref="sockets_8c" startline="216" endline="290">lwip_recvfrom</referencedby>
        <referencedby refid="sockets_8c_1cb3ba0c7f21116c629f116e15e40ce2b" compoundref="sockets_8c" startline="305" endline="351">lwip_send</referencedby>
        <referencedby refid="api__lib_8c_1b411221f912a6d9e4c82ac3963989403" compoundref="api__lib_8c" startline="227" endline="278">netconn_delete</referencedby>
        <referencedby refid="shell_8c_1ac82cf7e63df29786725f476f0fbbe1b" compoundref="shell_8c" startline="66" endline="92">shell_main</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1222ad2a2eb871d603b216a87e9f9be51" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void netbuf_first</definition>
        <argsstring>(struct netbuf *buf)</argsstring>
        <name>netbuf_first</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="153" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="152" bodyend="155"/>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_102f82348ac23431a4b1512feae25f26b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void netbuf_free</definition>
        <argsstring>(struct netbuf *buf)</argsstring>
        <name>netbuf_free</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="94" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="93" bodyend="99"/>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746">pbuf_free</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_18dd3c0551aa79d162b224ea5cd815b55" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="structip__addr" kindref="compound">ip_addr</ref> *</type>
        <definition>struct ip_addr* netbuf_fromaddr</definition>
        <argsstring>(struct netbuf *buf)</argsstring>
        <name>netbuf_fromaddr</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="193" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="192" bodyend="195"/>
        <references refid="structnetbuf_149224185e32ceccf52327cf1f97408d6" compoundref="api_8h" startline="70">netbuf::fromaddr</references>
        <referencedby refid="sockets_8c_1a433d1ebe9c87f57160c0d260e225705" compoundref="sockets_8c" startline="216" endline="290">lwip_recvfrom</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_16294b37d1aba1478329e1f084f39db5d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
        <definition>uInt16 netbuf_fromport</definition>
        <argsstring>(struct netbuf *buf)</argsstring>
        <name>netbuf_fromport</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="199" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="198" bodyend="201"/>
        <references refid="structnetbuf_1e14783033660f4975f99dcd6c57e1c7b" compoundref="api_8h" startline="71">netbuf::fromport</references>
        <referencedby refid="sockets_8c_1a433d1ebe9c87f57160c0d260e225705" compoundref="sockets_8c" startline="216" endline="290">lwip_recvfrom</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_16d20eca8f0316e4e71980108c1563581" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
        <definition>uInt16 netbuf_len</definition>
        <argsstring>(struct netbuf *buf)</argsstring>
        <name>netbuf_len</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="123" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="122" bodyend="125"/>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="structpbuf_13b42932c0b26c9ff2b8fe88bd25fb127" compoundref="pbuf_8h" startline="74">pbuf::tot_len</references>
        <referencedby refid="bot_8c_1ab86e03f8301aa7da6924fe6120e0d31" compoundref="bot_8c" startline="56" endline="81">bot_thread</referencedby>
        <referencedby refid="sockets_8c_1a433d1ebe9c87f57160c0d260e225705" compoundref="sockets_8c" startline="216" endline="290">lwip_recvfrom</referencedby>
        <referencedby refid="shell_8c_1ac82cf7e63df29786725f476f0fbbe1b" compoundref="shell_8c" startline="66" endline="92">shell_main</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1aba704cd963e35e71145de9f5112991d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
        <definition>struct netbuf* netbuf_new</definition>
        <argsstring>(void)</argsstring>
        <name>netbuf_new</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="52" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="51" bodyend="63"/>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e">MEMP_NETBUF</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
        <referencedby refid="sockets_8c_1cb3ba0c7f21116c629f116e15e40ce2b" compoundref="sockets_8c" startline="305" endline="351">lwip_send</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_169b35485702388475866d2ee07b158cb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="types_8h_13832cc814f0e7129add9a1cf7201c7ca" kindref="member">Int8</ref></type>
        <definition>Int8 netbuf_next</definition>
        <argsstring>(struct netbuf *buf)</argsstring>
        <name>netbuf_next</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="140" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="139" bodyend="149"/>
        <references refid="structpbuf_15e5763c94fd18d78937b0b58ce7df341" compoundref="pbuf_8h" startline="67">pbuf::next</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1f038b56dbdd67a6e48bf0125c8ef61ba" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void netbuf_ref</definition>
        <argsstring>(struct netbuf *buf, void *dataptr, uInt16 size)</argsstring>
        <name>netbuf_ref</name>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>dataptr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
          <declname>size</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="103" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="102" bodyend="111"/>
        <references refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" compoundref="pbuf_8h" startline="76">pbuf::len</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="structpbuf_18d32dc3e964369d4eec638fc37fbc460" compoundref="pbuf_8h" startline="71">pbuf::payload</references>
        <references refid="pbuf_8h_1bb6c8efa7f7739e71cb286c6dd4a47ef">pbuf_alloc</references>
        <references refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746">pbuf_free</references>
        <references refid="pbuf_8h_1b3c589840cc5a202e7278f41463f97e7c120b0fe39efe35bb682e4aa3b82e2c9">PBUF_ROM</references>
        <references refid="pbuf_8h_1ee1baa59bb2f85ba575b5a8619ac1ebf2ded3594a3977f8bf9cf09552be327b5">PBUF_TRANSPORT</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
        <references refid="structpbuf_13b42932c0b26c9ff2b8fe88bd25fb127" compoundref="pbuf_8h" startline="74">pbuf::tot_len</references>
        <referencedby refid="sockets_8c_1cb3ba0c7f21116c629f116e15e40ce2b" compoundref="sockets_8c" startline="305" endline="351">lwip_send</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1b1ef5f260ad8147a3b5b70b317b489d2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
        <definition>struct netconn* netconn_accept</definition>
        <argsstring>(struct netconn *conn)</argsstring>
        <name>netconn_accept</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="417" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="416" bodyend="427"/>
        <references refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" compoundref="api_8h" startline="85">netconn::acceptmbox</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <referencedby refid="sockets_8c_1f32c7d1377562b7b35fdd0535f6fa952" compoundref="sockets_8c" startline="91" endline="118">lwip_accept</referencedby>
        <referencedby refid="shell_8c_1e3226909e3db2e0b07a909a852e8c8ab" compoundref="shell_8c" startline="94" endline="112">shell_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1fcf7f4195b699c039de37b4dd3f563b7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_addr</definition>
        <argsstring>(struct netconn *conn, struct ip_addr **addr, uInt16 *port)</argsstring>
        <name>netconn_addr</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <param>
          <type>struct <ref refid="structip__addr" kindref="compound">ip_addr</ref> **</type>
          <declname>addr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref> *</type>
          <declname>port</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="308" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="306" bodyend="322"/>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references>
        <references refid="structtcp__pcb_19f625ba7c954031759a87b09f9d3bf66" compoundref="tcp_8h" startline="185">tcp_pcb::local_ip</references>
        <references refid="structtcp__pcb_1ea74c25566d8d5f965ec9458dc5a4f59" compoundref="tcp_8h" startline="186">tcp_pcb::local_port</references>
        <references refid="structudp__pcb_1189bcb0abce9e46de6ec7115d11d439a" compoundref="udp_8h" startline="64">udp_pcb::local_port</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a">NETCONN_TCP</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d916b8ec191d69f7e639f4ab40779069636">NETCONN_UDP</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d91655e1625cc7e6a93f1e3d2646f56a1e4">NETCONN_UDPLITE</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d917e0c3f566b3d4321b36b711b6b1ad6de">NETCONN_UDPNOCHKSUM</references>
        <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references>
        <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references>
        <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references>
        <references refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" compoundref="api_8h" startline="80">netconn::udp</references>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1dc842fc0f1de512895ef3cc9c657272a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_bind</definition>
        <argsstring>(struct netconn *conn, struct ip_addr *addr, uInt16 port)</argsstring>
        <name>netconn_bind</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <param>
          <type>struct <ref refid="structip__addr" kindref="compound">ip_addr</ref> *</type>
          <declname>addr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
          <declname>port</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="327" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="325" bodyend="352"/>
        <references refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76df07bc566f5626f8189745bca07e94a31">API_MSG_BIND</references>
        <references refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" compoundref="api__msg_8c" startline="523" endline="526">api_msg_post</references>
        <references refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094">api_msg_msg::bc</references>
        <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" compoundref="err_8h" startline="49">ERR_MEM</references>
        <references refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" compoundref="err_8h" startline="58">ERR_VAL</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea">MEMP_API_MSG</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references>
        <references refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" compoundref="api__msg_8h" startline="89">api_msg::msg</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a">NETCONN_TCP</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" compoundref="api_8h" startline="84">netconn::recvmbox</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <references refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" compoundref="sys__arch_8c" startline="204" endline="213">sys_mbox_new</references>
        <references refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references>
        <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references>
        <referencedby refid="sockets_8c_11675042812d3bc6d5f9eeaa28c8f37a7" compoundref="sockets_8c" startline="121" endline="144">lwip_bind</referencedby>
        <referencedby refid="shell_8c_1e3226909e3db2e0b07a909a852e8c8ab" compoundref="shell_8c" startline="94" endline="112">shell_thread</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_125bb1c1c9928f91f53149a026e2e2624" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_close</definition>
        <argsstring>(struct netconn *conn)</argsstring>
        <name>netconn_close</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="613" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="612" bodyend="637"/>
        <references refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d69663c2a794daeda40e795407074d588">API_MSG_CLOSE</references>
        <references refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" compoundref="api__msg_8c" startline="523" endline="526">api_msg_post</references>
        <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" compoundref="err_8h" startline="49">ERR_MEM</references>
        <references refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" compoundref="err_8h" startline="58">ERR_VAL</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea">MEMP_API_MSG</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references>
        <references refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" compoundref="api__msg_8h" startline="89">api_msg::msg</references>
        <references refid="api_8h_12c6c9c1869f443c5ec7b31180a44fada575b2bcec88c95abac43cb5e8cce2f17">NETCONN_CLOSE</references>
        <references refid="api_8h_12c6c9c1869f443c5ec7b31180a44fadabf6d2818cd3f8ac1abe824234fe8dfa0">NETCONN_NONE</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetconn_12524a19c868ae15196e6aab1141e8885" compoundref="api_8h" startline="86">netconn::sem</references>
        <references refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" compoundref="api_8h" startline="77">netconn::state</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <references refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" compoundref="sys__arch_8h" startline="39">SYS_SEM_NULL</references>
        <references refid="sys_8h_16c4530613bd616e719a295779b87ae5c">sys_sem_wait</references>
        <referencedby refid="shell_8c_1ac82cf7e63df29786725f476f0fbbe1b" compoundref="shell_8c" startline="66" endline="92">shell_main</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_140e08b372ad246ec7d2a7c9b1a2bd8fb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_connect</definition>
        <argsstring>(struct netconn *conn, struct ip_addr *addr, uInt16 port)</argsstring>
        <name>netconn_connect</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <param>
          <type>struct <ref refid="structip__addr" kindref="compound">ip_addr</ref> *</type>
          <declname>addr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
          <declname>port</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="357" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="355" bodyend="386"/>
        <references refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d384f86fe3736b156b8d16df7e355e571">API_MSG_CONNECT</references>
        <references refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" compoundref="api__msg_8c" startline="523" endline="526">api_msg_post</references>
        <references refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094">api_msg_msg::bc</references>
        <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" compoundref="err_8h" startline="49">ERR_MEM</references>
        <references refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" compoundref="err_8h" startline="58">ERR_VAL</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea">MEMP_API_MSG</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references>
        <references refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" compoundref="api__msg_8h" startline="89">api_msg::msg</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" compoundref="api_8h" startline="84">netconn::recvmbox</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <references refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" compoundref="sys__arch_8c" startline="204" endline="213">sys_mbox_new</references>
        <references refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references>
        <referencedby refid="bot_8c_1ab86e03f8301aa7da6924fe6120e0d31" compoundref="bot_8c" startline="56" endline="81">bot_thread</referencedby>
        <referencedby refid="sockets_8c_19688d733f4d571cef85948fe74e0f6c7" compoundref="sockets_8c" startline="169" endline="192">lwip_connect</referencedby>
        <referencedby refid="sockets_8c_18dba95d254d6cb221ba4039ad8f3337b" compoundref="sockets_8c" startline="354" endline="380">lwip_sendto</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1b411221f912a6d9e4c82ac3963989403" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_delete</definition>
        <argsstring>(struct netconn *conn)</argsstring>
        <name>netconn_delete</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="228" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="227" bodyend="278"/>
        <references refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" compoundref="api_8h" startline="85">netconn::acceptmbox</references>
        <references refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76dda53fbecc71f69bfd0b98622b20f0c58">API_MSG_DELCONN</references>
        <references refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" compoundref="api__msg_8c" startline="523" endline="526">api_msg_post</references>
        <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references>
        <references refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" compoundref="err_8h" startline="49">ERR_MEM</references>
        <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea">MEMP_API_MSG</references>
        <references refid="memp_8h_1ecd94926b7c2a0e23ae195f4ae97581f">memp_free</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1">MEMP_NETCONN</references>
        <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references>
        <references refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" compoundref="api__msg_8h" startline="89">api_msg::msg</references>
        <references refid="api_8h_19dfd3ddfe0ec65009cb140c68404b09d" compoundref="api__lib_8c" startline="66" endline="75">netbuf_delete</references>
        <references refid="api_8h_1b411221f912a6d9e4c82ac3963989403" compoundref="api__lib_8c" startline="227" endline="278">netconn_delete</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a">NETCONN_TCP</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746">pbuf_free</references>
        <references refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" compoundref="api_8h" startline="84">netconn::recvmbox</references>
        <references refid="structnetconn_12524a19c868ae15196e6aab1141e8885" compoundref="api_8h" startline="86">netconn::sem</references>
        <references refid="sys_8h_194ffa3f15cc0eda6dae85c6ccb88da6e">sys_arch_mbox_fetch</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <references refid="sys_8h_166160e039d0222f4dd8534cd3ab84699">sys_mbox_free</references>
        <references refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references>
        <references refid="sys_8h_1f36773453b6a4db5ae71afef8bb77184">sys_sem_free</references>
        <references refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" compoundref="sys__arch_8h" startline="39">SYS_SEM_NULL</references>
        <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references>
        <referencedby refid="sockets_8c_1f32c7d1377562b7b35fdd0535f6fa952" compoundref="sockets_8c" startline="91" endline="118">lwip_accept</referencedby>
        <referencedby refid="sockets_8c_1fd0897a2e23d99a5dffcc976c7e5d72c" compoundref="sockets_8c" startline="147" endline="166">lwip_close</referencedby>
        <referencedby refid="sockets_8c_1d1afafec89b608d54649d7d02117d17c" compoundref="sockets_8c" startline="383" endline="414">lwip_socket</referencedby>
        <referencedby refid="api__lib_8c_1b411221f912a6d9e4c82ac3963989403" compoundref="api__lib_8c" startline="227" endline="278">netconn_delete</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1b9eccae90351eb6c3d2ca690068445d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_err</definition>
        <argsstring>(struct netconn *conn)</argsstring>
        <name>netconn_err</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="641" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="640" bodyend="643"/>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1b917e0fc541447d966e5cf712ce24e58" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_listen</definition>
        <argsstring>(struct netconn *conn)</argsstring>
        <name>netconn_listen</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="390" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="389" bodyend="413"/>
        <references refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" compoundref="api_8h" startline="85">netconn::acceptmbox</references>
        <references refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d46f2e21faec2f5d2773c8bb7db2d7aaa">API_MSG_LISTEN</references>
        <references refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" compoundref="api__msg_8c" startline="523" endline="526">api_msg_post</references>
        <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" compoundref="err_8h" startline="49">ERR_MEM</references>
        <references refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" compoundref="err_8h" startline="58">ERR_VAL</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea">MEMP_API_MSG</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references>
        <references refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" compoundref="api__msg_8h" startline="89">api_msg::msg</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <references refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" compoundref="sys__arch_8c" startline="204" endline="213">sys_mbox_new</references>
        <references refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references>
        <referencedby refid="sockets_8c_1bee6ee286147cf334a1ba19f19b2e08b" compoundref="sockets_8c" startline="195" endline="213">lwip_listen</referencedby>
        <referencedby refid="shell_8c_1e3226909e3db2e0b07a909a852e8c8ab" compoundref="shell_8c" startline="94" endline="112">shell_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1b30ead34944094913a666250896ae95e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
        <definition>struct netconn* netconn_new</definition>
        <argsstring>(enum netconn_type t)</argsstring>
        <name>netconn_new</name>
        <param>
          <type>enum <ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d91" kindref="member">netconn_type</ref></type>
          <declname>t</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="205" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="204" bodyend="224"/>
        <references refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" compoundref="api_8h" startline="85">netconn::acceptmbox</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1">MEMP_NETCONN</references>
        <references refid="api_8h_12c6c9c1869f443c5ec7b31180a44fadabf6d2818cd3f8ac1abe824234fe8dfa0">NETCONN_NONE</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references>
        <references refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" compoundref="api_8h" startline="84">netconn::recvmbox</references>
        <references refid="structnetconn_12524a19c868ae15196e6aab1141e8885" compoundref="api_8h" startline="86">netconn::sem</references>
        <references refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" compoundref="api_8h" startline="77">netconn::state</references>
        <references refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" compoundref="sys__arch_8c" startline="204" endline="213">sys_mbox_new</references>
        <references refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references>
        <references refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" compoundref="sys__arch_8h" startline="39">SYS_SEM_NULL</references>
        <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references>
        <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references>
        <referencedby refid="bot_8c_1ab86e03f8301aa7da6924fe6120e0d31" compoundref="bot_8c" startline="56" endline="81">bot_thread</referencedby>
        <referencedby refid="sockets_8c_1d1afafec89b608d54649d7d02117d17c" compoundref="sockets_8c" startline="383" endline="414">lwip_socket</referencedby>
        <referencedby refid="shell_8c_1e3226909e3db2e0b07a909a852e8c8ab" compoundref="shell_8c" startline="94" endline="112">shell_thread</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1afa4042fd63fd78a440006eb4da36eeb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_peer</definition>
        <argsstring>(struct netconn *conn, struct ip_addr **addr, uInt16 *port)</argsstring>
        <name>netconn_peer</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <param>
          <type>struct <ref refid="structip__addr" kindref="compound">ip_addr</ref> **</type>
          <declname>addr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref> *</type>
          <declname>port</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="289" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="287" bodyend="303"/>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a">NETCONN_TCP</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d916b8ec191d69f7e639f4ab40779069636">NETCONN_UDP</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d91655e1625cc7e6a93f1e3d2646f56a1e4">NETCONN_UDPLITE</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d917e0c3f566b3d4321b36b711b6b1ad6de">NETCONN_UDPNOCHKSUM</references>
        <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references>
        <references refid="structtcp__pcb_1104f8c50bb00edff11df71133ac76fd7" compoundref="tcp_8h" startline="188">tcp_pcb::remote_ip</references>
        <references refid="structudp__pcb_1719ac802c8824c1f64bb0d337b590b58" compoundref="udp_8h" startline="63">udp_pcb::remote_ip</references>
        <references refid="structtcp__pcb_13f779fa78a77818fc8f6210a17c52e81" compoundref="tcp_8h" startline="189">tcp_pcb::remote_port</references>
        <references refid="structudp__pcb_1c1831887907d6cb95e5784c87278136c" compoundref="udp_8h" startline="64">udp_pcb::remote_port</references>
        <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references>
        <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references>
        <references refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" compoundref="api_8h" startline="80">netconn::udp</references>
        <referencedby refid="sockets_8c_1f32c7d1377562b7b35fdd0535f6fa952" compoundref="sockets_8c" startline="91" endline="118">lwip_accept</referencedby>
        <referencedby refid="sockets_8c_18dba95d254d6cb221ba4039ad8f3337b" compoundref="sockets_8c" startline="354" endline="380">lwip_sendto</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1cbd0b5a0344c2c3fffe5a02445a2c2b3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
        <definition>struct netbuf* netconn_recv</definition>
        <argsstring>(struct netconn *conn)</argsstring>
        <name>netconn_recv</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="431" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="430" bodyend="506"/>
        <references refid="debug_8h_1671009550216f7dc03e67ba5751e3160" compoundref="debug_8h" startline="105">API_LIB_DEBUG</references>
        <references refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" compoundref="api__msg_8c" startline="523" endline="526">api_msg_post</references>
        <references refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d7d2d29f00e09ebb6212968006c259307">API_MSG_RECV</references>
        <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references>
        <references refid="debug_8h_18b52c1fca5671ffbfe068c8d50ca0065" compoundref="debug_8h" startline="92">DEBUGF</references>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_188c4da0bf5d6a4410f6cfb864a5f04ce" compoundref="err_8h" startline="56">ERR_CONN</references>
        <references refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" compoundref="err_8h" startline="49">ERR_MEM</references>
        <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references>
        <references refid="structnetbuf_149224185e32ceccf52327cf1f97408d6" compoundref="api_8h" startline="70">netbuf::fromaddr</references>
        <references refid="structnetbuf_1e14783033660f4975f99dcd6c57e1c7b" compoundref="api_8h" startline="71">netbuf::fromport</references>
        <references refid="structapi__msg__msg_1430df6234ff9e241deaa7a951cbf9e81" compoundref="api__msg_8h" startline="79">api_msg_msg::len</references>
        <references refid="tcp_8h_1aad63c28ec94587c99838bd52424d634331ec9878c0ed22e62de969d4b96b5bb">LISTEN</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea">MEMP_API_MSG</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e">MEMP_NETBUF</references>
        <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references>
        <references refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" compoundref="api__msg_8h" startline="89">api_msg::msg</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a">NETCONN_TCP</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references>
        <references refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" compoundref="api_8h" startline="69">netbuf::ptr</references>
        <references refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" compoundref="api_8h" startline="84">netconn::recvmbox</references>
        <references refid="structtcp__pcb_1f5fed23770a314eabbad7225fbf09ade" compoundref="tcp_8h" startline="178">tcp_pcb::state</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <references refid="sys_8h_166160e039d0222f4dd8534cd3ab84699">sys_mbox_free</references>
        <references refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references>
        <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references>
        <references refid="structpbuf_13b42932c0b26c9ff2b8fe88bd25fb127" compoundref="pbuf_8h" startline="74">pbuf::tot_len</references>
        <references refid="structapi__msg_14b35b792fdec3605f27155b9db84a0bc" compoundref="api__msg_8h" startline="88">api_msg::type</references>
        <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references>
        <referencedby refid="bot_8c_1ab86e03f8301aa7da6924fe6120e0d31" compoundref="bot_8c" startline="56" endline="81">bot_thread</referencedby>
        <referencedby refid="sockets_8c_1a433d1ebe9c87f57160c0d260e225705" compoundref="sockets_8c" startline="216" endline="290">lwip_recvfrom</referencedby>
        <referencedby refid="shell_8c_1ac82cf7e63df29786725f476f0fbbe1b" compoundref="shell_8c" startline="66" endline="92">shell_main</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_1c4d4d10153d47c80a783c34b27c66238" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_send</definition>
        <argsstring>(struct netconn *conn, struct netbuf *buf)</argsstring>
        <name>netconn_send</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <param>
          <type>struct <ref refid="structnetbuf" kindref="compound">netbuf</ref> *</type>
          <declname>buf</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="510" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="509" bodyend="534"/>
        <references refid="debug_8h_1671009550216f7dc03e67ba5751e3160" compoundref="debug_8h" startline="105">API_LIB_DEBUG</references>
        <references refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" compoundref="api__msg_8c" startline="523" endline="526">api_msg_post</references>
        <references refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d951dbc12d5c7d0156077bd887fa7d36e">API_MSG_SEND</references>
        <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references>
        <references refid="debug_8h_18b52c1fca5671ffbfe068c8d50ca0065" compoundref="debug_8h" startline="92">DEBUGF</references>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" compoundref="err_8h" startline="49">ERR_MEM</references>
        <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references>
        <references refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" compoundref="err_8h" startline="58">ERR_VAL</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea">MEMP_API_MSG</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references>
        <references refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" compoundref="api__msg_8h" startline="89">api_msg::msg</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structapi__msg__msg_14fc5229c85bb1b1928871733dfdf0f3d" compoundref="api__msg_8h" startline="72">api_msg_msg::p</references>
        <references refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" compoundref="api_8h" startline="69">netbuf::p</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <references refid="structpbuf_13b42932c0b26c9ff2b8fe88bd25fb127" compoundref="pbuf_8h" startline="74">pbuf::tot_len</references>
        <referencedby refid="sockets_8c_1cb3ba0c7f21116c629f116e15e40ce2b" compoundref="sockets_8c" startline="305" endline="351">lwip_send</referencedby>
        <referencedby refid="udpecho_8c_1cd77ce4346d8d940f934ad6007214bf0" compoundref="udpecho_8c" startline="44" endline="75">udpecho_thread</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_15ab1d6bb5e45b28125312f1b3c840853" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>enum <ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d91" kindref="member">netconn_type</ref></type>
        <definition>enum netconn_type netconn_type</definition>
        <argsstring>(struct netconn *conn)</argsstring>
        <name>netconn_type</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="282" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="281" bodyend="284"/>
        <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references>
        <referencedby refid="sockets_8c_1a433d1ebe9c87f57160c0d260e225705" compoundref="sockets_8c" startline="216" endline="290">lwip_recvfrom</referencedby>
        <referencedby refid="sockets_8c_1cb3ba0c7f21116c629f116e15e40ce2b" compoundref="sockets_8c" startline="305" endline="351">lwip_send</referencedby>
        <referencedby refid="sockets_8c_1e3d92ccb1ddfafe7df89185dbc881ec2" compoundref="sockets_8c" startline="417" endline="445">lwip_write</referencedby>
      </memberdef>
      <memberdef kind="function" id="api__lib_8c_19363929b6c680bc1dd3f302885128959" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type>
        <definition>err_t netconn_write</definition>
        <argsstring>(struct netconn *conn, void *dataptr, uInt16 size, uInt8 copy)</argsstring>
        <name>netconn_write</name>
        <param>
          <type>struct <ref refid="structnetconn" kindref="compound">netconn</ref> *</type>
          <declname>conn</declname>
        </param>
        <param>
          <type>void *</type>
          <declname>dataptr</declname>
        </param>
        <param>
          <type><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></type>
          <declname>size</declname>
        </param>
        <param>
          <type><ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref></type>
          <declname>copy</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" line="538" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c" bodystart="537" bodyend="609"/>
        <references refid="debug_8h_1671009550216f7dc03e67ba5751e3160" compoundref="debug_8h" startline="105">API_LIB_DEBUG</references>
        <references refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" compoundref="api__msg_8c" startline="523" endline="526">api_msg_post</references>
        <references refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76db61d9c706d0cd2be9779e238553c9755">API_MSG_WRITE</references>
        <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references>
        <references refid="debug_8h_18b52c1fca5671ffbfe068c8d50ca0065" compoundref="debug_8h" startline="92">DEBUGF</references>
        <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references>
        <references refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" compoundref="err_8h" startline="49">ERR_MEM</references>
        <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references>
        <references refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" compoundref="err_8h" startline="58">ERR_VAL</references>
        <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references>
        <references refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea">MEMP_API_MSG</references>
        <references refid="memp_8h_1269bd926cd0413cf1948cf1992209451">memp_freep</references>
        <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references>
        <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references>
        <references refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" compoundref="api__msg_8h" startline="89">api_msg::msg</references>
        <references refid="api_8h_12c6c9c1869f443c5ec7b31180a44fadabf6d2818cd3f8ac1abe824234fe8dfa0">NETCONN_NONE</references>
        <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a">NETCONN_TCP</references>
        <references refid="api_8h_12c6c9c1869f443c5ec7b31180a44fada572747ecfd262085e0dace9156f60d2e">NETCONN_WRITE</references>
        <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references>
        <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references>
        <references refid="structnetconn_12524a19c868ae15196e6aab1141e8885" compoundref="api_8h" startline="86">netconn::sem</references>
        <references refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" compoundref="api_8h" startline="77">netconn::state</references>
        <references refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa">sys_mbox_fetch</references>
        <references refid="sys_8h_1f36773453b6a4db5ae71afef8bb77184">sys_sem_free</references>
        <references refid="sys_8h_1adf2563f342b33ff6033eaa12f642e9d" compoundref="sys__arch_8c" startline="295" endline="297">sys_sem_new</references>
        <references refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" compoundref="sys__arch_8h" startline="39">SYS_SEM_NULL</references>
        <references refid="sys_8h_16c4530613bd616e719a295779b87ae5c">sys_sem_wait</references>
        <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references>
        <references refid="tcp_8h_1d1a95f09deb49cd7341d35527d6d3e2f" compoundref="tcp_8h" startline="81">tcp_sndbuf</references>
        <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references>
        <references refid="structapi__msg__msg_14f071675ee5451c073396ee03a5bb78f">api_msg_msg::w</references>
        <referencedby refid="sockets_8c_1cb3ba0c7f21116c629f116e15e40ce2b" compoundref="sockets_8c" startline="305" endline="351">lwip_send</referencedby>
        <referencedby refid="sockets_8c_1e3d92ccb1ddfafe7df89185dbc881ec2" compoundref="sockets_8c" startline="417" endline="445">lwip_write</referencedby>
        <referencedby refid="shell_8c_1b5fde1c96ac74a036a6d6a80f4a934ab" compoundref="shell_8c" startline="58" endline="60">sendstr</referencedby>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2001,<sp/>Swedish<sp/>Institute<sp/>of<sp/>Computer<sp/>Science.</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.<sp/></highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="5"><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/></highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*<sp/>modification,<sp/>are<sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/></highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>are<sp/>met:<sp/></highlight></codeline>
<codeline lineno="8"><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/></highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>notice,<sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer.<sp/></highlight></codeline>
<codeline lineno="10"><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/></highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>notice,<sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer<sp/>in<sp/>the<sp/></highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>documentation<sp/>and/or<sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.<sp/></highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/>3.<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>Institute<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/></highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>may<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/></highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.<sp/></highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>INSTITUTE<sp/>AND<sp/>CONTRIBUTORS<sp/>``AS<sp/>IS&apos;&apos;<sp/>AND<sp/></highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/></highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/></highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/>ARE<sp/>DISCLAIMED.<sp/><sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>INSTITUTE<sp/>OR<sp/>CONTRIBUTORS<sp/>BE<sp/>LIABLE<sp/></highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/></highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/></highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/></highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>CONTRACT,<sp/>STRICT<sp/></highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/></highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<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<sp/>OF<sp/></highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*<sp/>SUCH<sp/>DAMAGE.<sp/></highlight></codeline>
<codeline lineno="28"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="29"><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="30"><highlight class="comment"><sp/>*<sp/></highlight></codeline>
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Adam<sp/>Dunkels<sp/>&lt;adam@sics.se&gt;</highlight></codeline>
<codeline lineno="32"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/>$Id: api__lib_8c.xml 88 2016-01-12 00:11:29Z reddawg $</highlight></codeline>
<codeline lineno="34"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>This<sp/>is<sp/>the<sp/>part<sp/>of<sp/>the<sp/>API<sp/>that<sp/>is<sp/>linked<sp/>with</highlight></codeline>
<codeline lineno="37"><highlight class="comment"><sp/><sp/><sp/>the<sp/>application<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="types_8h" kindref="compound">ubixos/types.h</ref>&gt;</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="debug_8h" kindref="compound">net/debug.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="api_8h" kindref="compound">net/api.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="api__msg_8h" kindref="compound">net/api_msg.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="memp_8h" kindref="compound">net/memp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="debug_8h" kindref="compound">net/debug.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight><highlight class="keyword">struct</highlight></codeline>
<codeline lineno="51" refid="api__lib_8c_1aba704cd963e35e71145de9f5112991d" refkind="member"><highlight class="keyword"></highlight><highlight class="normal"><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="api_8h_1aba704cd963e35e71145de9f5112991d" kindref="member">netbuf_new</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="52"><highlight class="normal">{</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>;</highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/>buf<sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e" kindref="member">MEMP_NETBUF</ref>);</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf<sp/>!=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>buf;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="63"><highlight class="normal">}</highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66" refid="api__lib_8c_19dfd3ddfe0ec65009cb140c68404b09d" refkind="member"><highlight class="normal"><ref refid="api_8h_19dfd3ddfe0ec65009cb140c68404b09d" kindref="member">netbuf_delete</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>)</highlight></codeline>
<codeline lineno="67"><highlight class="normal">{</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf<sp/>!=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>!=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746" kindref="member">pbuf_free</ref>(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>);</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e" kindref="member">MEMP_NETBUF</ref>,<sp/>buf);</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="75"><highlight class="normal">}</highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*</highlight></codeline>
<codeline lineno="78" refid="api__lib_8c_17770b72b0ae9e741fbb81f222e334a1a" refkind="member"><highlight class="normal"><ref refid="api_8h_17770b72b0ae9e741fbb81f222e334a1a" kindref="member">netbuf_alloc</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>size)</highlight></codeline>
<codeline lineno="79"><highlight class="normal">{</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Deallocate<sp/>any<sp/>previously<sp/>allocated<sp/>memory.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>!=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746" kindref="member">pbuf_free</ref>(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>);</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>=<sp/><ref refid="pbuf_8h_1bb6c8efa7f7739e71cb286c6dd4a47ef" kindref="member">pbuf_alloc</ref>(<ref refid="pbuf_8h_1ee1baa59bb2f85ba575b5a8619ac1ebf2ded3594a3977f8bf9cf09552be327b5" kindref="member">PBUF_TRANSPORT</ref>,<sp/>size,<sp/><ref refid="pbuf_8h_1b3c589840cc5a202e7278f41463f97e7c5e9f28455bca98944a030d4b84ecfab" kindref="member">PBUF_RAM</ref>);</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>-&gt;<ref refid="structpbuf_18d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="90"><highlight class="normal">}</highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="93" refid="api__lib_8c_102f82348ac23431a4b1512feae25f26b" refkind="member"><highlight class="normal"><ref refid="api_8h_102f82348ac23431a4b1512feae25f26b" kindref="member">netbuf_free</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>)</highlight></codeline>
<codeline lineno="94"><highlight class="normal">{</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>!=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746" kindref="member">pbuf_free</ref>(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>);</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="99"><highlight class="normal">}</highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="102" refid="api__lib_8c_1f038b56dbdd67a6e48bf0125c8ef61ba" refkind="member"><highlight class="normal"><ref refid="api_8h_1f038b56dbdd67a6e48bf0125c8ef61ba" kindref="member">netbuf_ref</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*dataptr,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>size)</highlight></codeline>
<codeline lineno="103"><highlight class="normal">{</highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>!=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746" kindref="member">pbuf_free</ref>(buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>);</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="107"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>=<sp/><ref refid="pbuf_8h_1bb6c8efa7f7739e71cb286c6dd4a47ef" kindref="member">pbuf_alloc</ref>(<ref refid="pbuf_8h_1ee1baa59bb2f85ba575b5a8619ac1ebf2ded3594a3977f8bf9cf09552be327b5" kindref="member">PBUF_TRANSPORT</ref>,<sp/>0,<sp/><ref refid="pbuf_8h_1b3c589840cc5a202e7278f41463f97e7c120b0fe39efe35bb682e4aa3b82e2c9" kindref="member">PBUF_ROM</ref>);</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>-&gt;<ref refid="structpbuf_18d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref><sp/>=<sp/>dataptr;</highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>-&gt;<ref refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" kindref="member">len</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>-&gt;<ref refid="structpbuf_13b42932c0b26c9ff2b8fe88bd25fb127" kindref="member">tot_len</ref><sp/>=<sp/>size;</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>;</highlight></codeline>
<codeline lineno="111"><highlight class="normal">}</highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="113"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="114" refid="api__lib_8c_1631e8bddd99b2397cd0b26973c659602" refkind="member"><highlight class="normal"><ref refid="api_8h_1631e8bddd99b2397cd0b26973c659602" kindref="member">netbuf_chain</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*head,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*tail)</highlight></codeline>
<codeline lineno="115"><highlight class="normal">{</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><ref refid="pbuf_8h_1831c9a72bda1d3bd4c7b96f5a0e3b891" kindref="member">pbuf_chain</ref>(head-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>,<sp/>tail-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>);</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/>head-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/>head-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>;</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e" kindref="member">MEMP_NETBUF</ref>,<sp/>tail);</highlight></codeline>
<codeline lineno="119"><highlight class="normal">}</highlight></codeline>
<codeline lineno="120"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></highlight></codeline>
<codeline lineno="122" refid="api__lib_8c_16d20eca8f0316e4e71980108c1563581" refkind="member"><highlight class="normal"><ref refid="api_8h_16d20eca8f0316e4e71980108c1563581" kindref="member">netbuf_len</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>)</highlight></codeline>
<codeline lineno="123"><highlight class="normal">{</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>-&gt;<ref refid="structpbuf_13b42932c0b26c9ff2b8fe88bd25fb127" kindref="member">tot_len</ref>;</highlight></codeline>
<codeline lineno="125"><highlight class="normal">}</highlight></codeline>
<codeline lineno="126"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="128" refid="api__lib_8c_1b47d915f31d9e5d1218ed238f0428386" refkind="member"><highlight class="normal"><ref refid="api_8h_1b47d915f31d9e5d1218ed238f0428386" kindref="member">netbuf_data</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>**dataptr,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>*len)</highlight></codeline>
<codeline lineno="129"><highlight class="normal">{</highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_1e1dcf352601ec4d3b700910df24f863d" kindref="member">ERR_BUF</ref>;</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/>*dataptr<sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref>-&gt;<ref refid="structpbuf_18d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/>*len<sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref>-&gt;<ref refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" kindref="member">len</ref>;</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>;</highlight></codeline>
<codeline lineno="136"><highlight class="normal">}</highlight></codeline>
<codeline lineno="137"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"><ref refid="types_8h_13832cc814f0e7129add9a1cf7201c7ca" kindref="member">Int8</ref></highlight></codeline>
<codeline lineno="139" refid="api__lib_8c_169b35485702388475866d2ee07b158cb" refkind="member"><highlight class="normal"><ref refid="api_8h_169b35485702388475866d2ee07b158cb" kindref="member">netbuf_next</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>)</highlight></codeline>
<codeline lineno="140"><highlight class="normal">{</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref>-&gt;<ref refid="structpbuf_15e5763c94fd18d78937b0b58ce7df341" kindref="member">next</ref><sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>-1;</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref>-&gt;<ref refid="structpbuf_15e5763c94fd18d78937b0b58ce7df341" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref>-&gt;<ref refid="structpbuf_15e5763c94fd18d78937b0b58ce7df341" kindref="member">next</ref><sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>1;</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="149"><highlight class="normal">}</highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="152" refid="api__lib_8c_1222ad2a2eb871d603b216a87e9f9be51" refkind="member"><highlight class="normal"><ref refid="api_8h_1222ad2a2eb871d603b216a87e9f9be51" kindref="member">netbuf_first</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>)</highlight></codeline>
<codeline lineno="153"><highlight class="normal">{</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>;</highlight></codeline>
<codeline lineno="155"><highlight class="normal">}</highlight></codeline>
<codeline lineno="156"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="158" refid="api__lib_8c_19a5f4f669674daa2f3b7b303d7cea915" refkind="member"><highlight class="normal"><ref refid="api_8h_19a5f4f669674daa2f3b7b303d7cea915" kindref="member">netbuf_copy_partial</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*dataptr,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>len,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>offset)</highlight></codeline>
<codeline lineno="159"><highlight class="normal">{</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>i,<sp/>left;</highlight></codeline>
<codeline lineno="162"><highlight class="normal"></highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/>left<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="164"><highlight class="normal"></highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>This<sp/>implementation<sp/>is<sp/>bad.<sp/>It<sp/>should<sp/>use<sp/>bcopy</highlight></codeline>
<codeline lineno="170"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>instead.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(p<sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>;<sp/>left<sp/>&lt;<sp/>len<sp/>&amp;&amp;<sp/>p<sp/>!=<sp/>NULL;<sp/>p<sp/>=<sp/>p-&gt;<ref refid="structpbuf_15e5763c94fd18d78937b0b58ce7df341" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(offset<sp/>!=<sp/>0<sp/>&amp;&amp;<sp/>offset<sp/>&gt;=<sp/>p-&gt;<ref refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" kindref="member">len</ref>)<sp/>{</highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>offset<sp/>-=<sp/>p-&gt;<ref refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" kindref="member">len</ref>;</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{<sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal">(i<sp/>=<sp/>offset;<sp/>i<sp/>&lt;<sp/>p-&gt;<ref refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" kindref="member">len</ref>;<sp/>++i)<sp/>{</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)dataptr)[left]<sp/>=<sp/>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)p-&gt;<ref refid="structpbuf_18d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>)[i];</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(++left<sp/>&gt;=<sp/>len)<sp/>{</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="183"><highlight class="normal">}</highlight></codeline>
<codeline lineno="184"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="186" refid="api__lib_8c_17c70594658105835086ed6fe19aa8067" refkind="member"><highlight class="normal"><ref refid="api_8h_17c70594658105835086ed6fe19aa8067" kindref="member">netbuf_copy</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*dataptr,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/><ref refid="structpbuf_1238f00a0024a32992599c9d1abf9bb44" kindref="member">len</ref>)</highlight></codeline>
<codeline lineno="187"><highlight class="normal">{</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><ref refid="api_8h_19a5f4f669674daa2f3b7b303d7cea915" kindref="member">netbuf_copy_partial</ref>(buf,<sp/>dataptr,<sp/>len,<sp/>0);</highlight></codeline>
<codeline lineno="189"><highlight class="normal">}</highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip__addr" kindref="compound">ip_addr</ref><sp/>*</highlight></codeline>
<codeline lineno="192" refid="api__lib_8c_18dd3c0551aa79d162b224ea5cd815b55" refkind="member"><highlight class="normal"><ref refid="api_8h_18dd3c0551aa79d162b224ea5cd815b55" kindref="member">netbuf_fromaddr</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>)</highlight></codeline>
<codeline lineno="193"><highlight class="normal">{</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>buf-&gt;<ref refid="structnetbuf_149224185e32ceccf52327cf1f97408d6" kindref="member">fromaddr</ref>;</highlight></codeline>
<codeline lineno="195"><highlight class="normal">}</highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="197"><highlight class="normal"><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref></highlight></codeline>
<codeline lineno="198" refid="api__lib_8c_16294b37d1aba1478329e1f084f39db5d" refkind="member"><highlight class="normal"><ref refid="api_8h_16294b37d1aba1478329e1f084f39db5d" kindref="member">netbuf_fromport</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>)</highlight></codeline>
<codeline lineno="199"><highlight class="normal">{</highlight></codeline>
<codeline lineno="200"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>buf-&gt;<ref refid="structnetbuf_1e14783033660f4975f99dcd6c57e1c7b" kindref="member">fromport</ref>;</highlight></codeline>
<codeline lineno="201"><highlight class="normal">}</highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"></highlight><highlight class="keyword">struct</highlight></codeline>
<codeline lineno="204" refid="api__lib_8c_1b30ead34944094913a666250896ae95e" refkind="member"><highlight class="keyword"></highlight><highlight class="normal"><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*<ref refid="api_8h_1935860c5a91e85457369b6f558e638fd" kindref="member">netconn_new</ref>(</highlight><highlight class="keyword">enum</highlight><highlight class="normal"><sp/><ref refid="api_8h_15ab1d6bb5e45b28125312f1b3c840853" kindref="member">netconn_type</ref><sp/>t)</highlight></codeline>
<codeline lineno="205"><highlight class="normal">{</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn;</highlight></codeline>
<codeline lineno="207"><highlight class="normal"></highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/>conn<sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1" kindref="member">MEMP_NETCONN</ref>);</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref><sp/>=<sp/>t;</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref><sp/>=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="214"><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref><sp/>=<sp/><ref refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" kindref="member">sys_mbox_new</ref>())<sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1" kindref="member">MEMP_NETCONN</ref>,<sp/>conn);</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>;</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref><sp/>=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>;</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref><sp/>=<sp/><ref refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" kindref="member">SYS_SEM_NULL</ref>;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" kindref="member">state</ref><sp/>=<sp/><ref refid="api_8h_12c6c9c1869f443c5ec7b31180a44fadabf6d2818cd3f8ac1abe824234fe8dfa0" kindref="member">NETCONN_NONE</ref>;</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn;</highlight></codeline>
<codeline lineno="224"><highlight class="normal">}</highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="227" refid="api__lib_8c_1b411221f912a6d9e4c82ac3963989403" refkind="member"><highlight class="normal"><ref refid="api_8h_1b411221f912a6d9e4c82ac3963989403" kindref="member">netconn_delete</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn)</highlight></codeline>
<codeline lineno="228"><highlight class="normal">{</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>;</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*mem;</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>;</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref><sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>))<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;type<sp/>=<sp/><ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76dda53fbecc71f69bfd0b98622b20f0c58" kindref="member">API_MSG_DELCONN</ref>;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref><sp/>=<sp/>conn;</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);<sp/><sp/></highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>,<sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="245"><highlight class="normal"></highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Drain<sp/>the<sp/>recvmbox.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>!=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(<ref refid="sys_8h_194ffa3f15cc0eda6dae85c6ccb88da6e" kindref="member">sys_arch_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>,<sp/>&amp;mem,<sp/>1)<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref><sp/>==<sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref>)<sp/>{</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746" kindref="member">pbuf_free</ref>((</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*)mem);</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="api_8h_19dfd3ddfe0ec65009cb140c68404b09d" kindref="member">netbuf_delete</ref>((</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*)mem);</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_166160e039d0222f4dd8534cd3ab84699" kindref="member">sys_mbox_free</ref>(conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>);</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>;</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/></highlight></codeline>
<codeline lineno="259"><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Drain<sp/>the<sp/>acceptmbox.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref><sp/>!=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(<ref refid="sys_8h_194ffa3f15cc0eda6dae85c6ccb88da6e" kindref="member">sys_arch_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref>,<sp/>&amp;mem,<sp/>1)<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="api_8h_1b411221f912a6d9e4c82ac3963989403" kindref="member">netconn_delete</ref>((</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*)mem);</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_166160e039d0222f4dd8534cd3ab84699" kindref="member">sys_mbox_free</ref>(conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref>);</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref><sp/>=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>;</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="269"><highlight class="normal"></highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_166160e039d0222f4dd8534cd3ab84699" kindref="member">sys_mbox_free</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>);</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref><sp/>=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>;</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref><sp/>!=<sp/><ref refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" kindref="member">SYS_SEM_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1f36773453b6a4db5ae71afef8bb77184" kindref="member">sys_sem_free</ref>(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref>);</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/><sp/>conn-&gt;sem<sp/>=<sp/>SYS_SEM_NULL;*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1ecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1" kindref="member">MEMP_NETCONN</ref>,<sp/>conn);</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>;</highlight></codeline>
<codeline lineno="278"><highlight class="normal">}</highlight></codeline>
<codeline lineno="279"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="280"><highlight class="normal"></highlight><highlight class="keyword">enum</highlight><highlight class="normal"><sp/><ref refid="api_8h_15ab1d6bb5e45b28125312f1b3c840853" kindref="member">netconn_type</ref></highlight></codeline>
<codeline lineno="281" refid="api__lib_8c_15ab1d6bb5e45b28125312f1b3c840853" refkind="member"><highlight class="normal"><ref refid="api_8h_15ab1d6bb5e45b28125312f1b3c840853" kindref="member">netconn_type</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn)</highlight></codeline>
<codeline lineno="282"><highlight class="normal">{</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>;</highlight></codeline>
<codeline lineno="284"><highlight class="normal">}</highlight></codeline>
<codeline lineno="285"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="286"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="287" refid="api__lib_8c_1afa4042fd63fd78a440006eb4da36eeb" refkind="member"><highlight class="normal"><ref refid="api_8h_1afa4042fd63fd78a440006eb4da36eeb" kindref="member">netconn_peer</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structip__addr" kindref="compound">ip_addr</ref><sp/>**addr,</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>*port)</highlight></codeline>
<codeline lineno="289"><highlight class="normal">{</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d91655e1625cc7e6a93f1e3d2646f56a1e4" kindref="member">NETCONN_UDPLITE</ref>:</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d917e0c3f566b3d4321b36b711b6b1ad6de" kindref="member">NETCONN_UDPNOCHKSUM</ref>:</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d916b8ec191d69f7e639f4ab40779069636" kindref="member">NETCONN_UDP</ref>:</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/>*addr<sp/>=<sp/>&amp;(conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>-&gt;<ref refid="structudp__pcb_1719ac802c8824c1f64bb0d337b590b58" kindref="member">remote_ip</ref>);</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/>*port<sp/>=<sp/>conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>-&gt;<ref refid="structudp__pcb_1c1831887907d6cb95e5784c87278136c" kindref="member">remote_port</ref>;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref>:</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/>*addr<sp/>=<sp/>&amp;(conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>-&gt;<ref refid="structtcp__pcb_1104f8c50bb00edff11df71133ac76fd7" kindref="member">remote_ip</ref>);</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/>*port<sp/>=<sp/>conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>-&gt;<ref refid="structtcp__pcb_13f779fa78a77818fc8f6210a17c52e81" kindref="member">remote_port</ref>;</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>);</highlight></codeline>
<codeline lineno="303"><highlight class="normal">}</highlight></codeline>
<codeline lineno="304"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="305"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="306" refid="api__lib_8c_1fcf7f4195b699c039de37b4dd3f563b7" refkind="member"><highlight class="normal"><ref refid="api_8h_1fcf7f4195b699c039de37b4dd3f563b7" kindref="member">netconn_addr</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structip__addr" kindref="compound">ip_addr</ref><sp/>**addr,</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>*port)</highlight></codeline>
<codeline lineno="308"><highlight class="normal">{</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d91655e1625cc7e6a93f1e3d2646f56a1e4" kindref="member">NETCONN_UDPLITE</ref>:</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d917e0c3f566b3d4321b36b711b6b1ad6de" kindref="member">NETCONN_UDPNOCHKSUM</ref>:</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d916b8ec191d69f7e639f4ab40779069636" kindref="member">NETCONN_UDP</ref>:</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/>*addr<sp/>=<sp/>&amp;(conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>-&gt;local_ip);</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/>*port<sp/>=<sp/>conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>-&gt;<ref refid="structudp__pcb_1189bcb0abce9e46de6ec7115d11d439a" kindref="member">local_port</ref>;</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref>:</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/>*addr<sp/>=<sp/>&amp;(conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>-&gt;<ref refid="structtcp__pcb_19f625ba7c954031759a87b09f9d3bf66" kindref="member">local_ip</ref>);</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/>*port<sp/>=<sp/>conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>-&gt;<ref refid="structtcp__pcb_1ea74c25566d8d5f965ec9458dc5a4f59" kindref="member">local_port</ref>;</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>);</highlight></codeline>
<codeline lineno="322"><highlight class="normal">}</highlight></codeline>
<codeline lineno="323"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="324"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="325" refid="api__lib_8c_1dc842fc0f1de512895ef3cc9c657272a" refkind="member"><highlight class="normal"><ref refid="api_8h_1dc842fc0f1de512895ef3cc9c657272a" kindref="member">netconn_bind</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structip__addr" kindref="compound">ip_addr</ref><sp/>*addr,</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>port)</highlight></codeline>
<codeline lineno="327"><highlight class="normal">{</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>;</highlight></codeline>
<codeline lineno="329"><highlight class="normal"></highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" kindref="member">ERR_VAL</ref>;</highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="333"><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref><sp/>!=<sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref><sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>=<sp/><ref refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" kindref="member">sys_mbox_new</ref>())<sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref><sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>))<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>);</highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;type<sp/>=<sp/><ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76df07bc566f5626f8189745bca07e94a31" kindref="member">API_MSG_BIND</ref>;</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref><sp/>=<sp/>conn;</highlight></codeline>
<codeline lineno="346"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.ipaddr<sp/>=<sp/>addr;</highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.port<sp/>=<sp/>port;</highlight></codeline>
<codeline lineno="348"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>,<sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="352"><highlight class="normal">}</highlight></codeline>
<codeline lineno="353"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="354"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="355" refid="api__lib_8c_140e08b372ad246ec7d2a7c9b1a2bd8fb" refkind="member"><highlight class="normal"><ref refid="api_8h_140e08b372ad246ec7d2a7c9b1a2bd8fb" kindref="member">netconn_connect</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structip__addr" kindref="compound">ip_addr</ref><sp/>*addr,</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>port)</highlight></codeline>
<codeline lineno="357"><highlight class="normal">{</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>;</highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" kindref="member">ERR_VAL</ref>;</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="363"><highlight class="normal"></highlight></codeline>
<codeline lineno="364"><highlight class="normal"></highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>=<sp/><ref refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" kindref="member">sys_mbox_new</ref>())<sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="369"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref><sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>))<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;type<sp/>=<sp/><ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d384f86fe3736b156b8d16df7e355e571" kindref="member">API_MSG_CONNECT</ref>;</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref><sp/>=<sp/>conn;<sp/><sp/></highlight></codeline>
<codeline lineno="376"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.ipaddr<sp/>=<sp/>addr;</highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.port<sp/>=<sp/>port;</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;1&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="380"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;2:<sp/>[0x%X]&quot;</highlight><highlight class="normal">,conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>);</highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;3&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>,<sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;4&quot;</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="386"><highlight class="normal">}</highlight></codeline>
<codeline lineno="387"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="388"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="389" refid="api__lib_8c_1b917e0fc541447d966e5cf712ce24e58" refkind="member"><highlight class="normal"><ref refid="api_8h_1b917e0fc541447d966e5cf712ce24e58" kindref="member">netconn_listen</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn)</highlight></codeline>
<codeline lineno="390"><highlight class="normal">{</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>;</highlight></codeline>
<codeline lineno="392"><highlight class="normal"></highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" kindref="member">ERR_VAL</ref>;</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref><sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref><sp/>=<sp/><ref refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" kindref="member">sys_mbox_new</ref>();</highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref><sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="402"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref><sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>))<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>);</highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;type<sp/>=<sp/><ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d46f2e21faec2f5d2773c8bb7db2d7aaa" kindref="member">API_MSG_LISTEN</ref>;</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref><sp/>=<sp/>conn;</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>,<sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="413"><highlight class="normal">}</highlight></codeline>
<codeline lineno="414"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="415"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*</highlight></codeline>
<codeline lineno="416" refid="api__lib_8c_1b1ef5f260ad8147a3b5b70b317b489d2" refkind="member"><highlight class="normal"><ref refid="api_8h_1b1ef5f260ad8147a3b5b70b317b489d2" kindref="member">netconn_accept</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn)</highlight></codeline>
<codeline lineno="417"><highlight class="normal">{</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*newconn;</highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref>,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>**)&amp;newconn);</highlight></codeline>
<codeline lineno="425"><highlight class="normal"></highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>newconn;</highlight></codeline>
<codeline lineno="427"><highlight class="normal">}</highlight></codeline>
<codeline lineno="428"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="429"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*</highlight></codeline>
<codeline lineno="430" refid="api__lib_8c_1cbd0b5a0344c2c3fffe5a02445a2c2b3" refkind="member"><highlight class="normal"><ref refid="api_8h_1cbd0b5a0344c2c3fffe5a02445a2c2b3" kindref="member">netconn_recv</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn)</highlight></codeline>
<codeline lineno="431"><highlight class="normal">{</highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>;</highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>;</highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p;</highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_188c4da0bf5d6a4410f6cfb864a5f04ce" kindref="member">ERR_CONN</ref>;</highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="443"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="444"><highlight class="normal"></highlight></codeline>
<codeline lineno="445"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>!=<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="447"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="448"><highlight class="normal"></highlight></codeline>
<codeline lineno="449"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref><sp/>==<sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref>)<sp/>{</highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>-&gt;<ref refid="structtcp__pcb_1f5fed23770a314eabbad7225fbf09ade" kindref="member">state</ref><sp/>==<sp/><ref refid="tcp_8h_1aad63c28ec94587c99838bd52424d634331ec9878c0ed22e62de969d4b96b5bb" kindref="member">LISTEN</ref>)<sp/>{</highlight></codeline>
<codeline lineno="451"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_188c4da0bf5d6a4410f6cfb864a5f04ce" kindref="member">ERR_CONN</ref>;</highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="454"><highlight class="normal"></highlight></codeline>
<codeline lineno="455"><highlight class="normal"></highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/>buf<sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e" kindref="member">MEMP_NETBUF</ref>);</highlight></codeline>
<codeline lineno="457"><highlight class="normal"></highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>**)&amp;p);</highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>we<sp/>are<sp/>closed,<sp/>we<sp/>indicate<sp/>that<sp/>we<sp/>no<sp/>longer<sp/>wish<sp/>to<sp/>recieve</highlight></codeline>
<codeline lineno="466"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>data<sp/>by<sp/>setting<sp/>conn-&gt;recvmbox<sp/>to<sp/>SYS_MBOX_NULL.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(p<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c0bb141248dc601c118d1ec36170a04e" kindref="member">MEMP_NETBUF</ref>,<sp/>buf);</highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sys_8h_166160e039d0222f4dd8534cd3ab84699" kindref="member">sys_mbox_free</ref>(conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>);</highlight></codeline>
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>;</highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="473"><highlight class="normal"></highlight></codeline>
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>=<sp/>p;</highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/>buf-&gt;<ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/>p;</highlight></codeline>
<codeline lineno="476"><highlight class="normal"><sp/><sp/><sp/><sp/>buf-&gt;<ref refid="structnetbuf_1e14783033660f4975f99dcd6c57e1c7b" kindref="member">fromport</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/>buf-&gt;<ref refid="structnetbuf_149224185e32ceccf52327cf1f97408d6" kindref="member">fromaddr</ref><sp/>=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="478"><highlight class="normal"></highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Let<sp/>the<sp/>stack<sp/>know<sp/>that<sp/>we<sp/>have<sp/>taken<sp/>the<sp/>data.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="480"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((msg<sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>))<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>buf;</highlight></codeline>
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/>msg-&gt;<ref refid="structapi__msg_14b35b792fdec3605f27155b9db84a0bc" kindref="member">type</ref><sp/>=<sp/><ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d7d2d29f00e09ebb6212968006c259307" kindref="member">API_MSG_RECV</ref>;</highlight></codeline>
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/>msg-&gt;<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref><sp/>=<sp/>conn;</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(buf<sp/>!=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-&gt;<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1430df6234ff9e241deaa7a951cbf9e81" kindref="member">len</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>-&gt;<ref refid="structpbuf_13b42932c0b26c9ff2b8fe88bd25fb127" kindref="member">tot_len</ref>;</highlight></codeline>
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-&gt;<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1430df6234ff9e241deaa7a951cbf9e81" kindref="member">len</ref><sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(msg);</highlight></codeline>
<codeline lineno="492"><highlight class="normal"></highlight></codeline>
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>,<sp/>msg);</highlight></codeline>
<codeline lineno="495"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="496"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>**)&amp;buf);</highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="498"><highlight class="normal"></highlight></codeline>
<codeline lineno="499"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="500"><highlight class="normal"></highlight></codeline>
<codeline lineno="501"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="502"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_18b52c1fca5671ffbfe068c8d50ca0065" kindref="member">DEBUGF</ref>(<ref refid="debug_8h_1671009550216f7dc03e67ba5751e3160" kindref="member">API_LIB_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;netconn_recv:<sp/>received<sp/>%p<sp/>(err<sp/>%d)\n&quot;</highlight><highlight class="normal">,<sp/>buf,<sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>));</highlight></codeline>
<codeline lineno="503"><highlight class="normal"></highlight></codeline>
<codeline lineno="504"><highlight class="normal"></highlight></codeline>
<codeline lineno="505"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>buf;</highlight></codeline>
<codeline lineno="506"><highlight class="normal">}</highlight></codeline>
<codeline lineno="507"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="508"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="509" refid="api__lib_8c_1c4d4d10153d47c80a783c34b27c66238" refkind="member"><highlight class="normal"><ref refid="api_8h_1c4d4d10153d47c80a783c34b27c66238" kindref="member">netconn_send</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetbuf" kindref="compound">netbuf</ref><sp/>*<ref refid="structbuf" kindref="compound">buf</ref>)</highlight></codeline>
<codeline lineno="510"><highlight class="normal">{</highlight></codeline>
<codeline lineno="511"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>;</highlight></codeline>
<codeline lineno="512"><highlight class="normal"></highlight></codeline>
<codeline lineno="513"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="514"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" kindref="member">ERR_VAL</ref>;</highlight></codeline>
<codeline lineno="515"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="516"><highlight class="normal"></highlight></codeline>
<codeline lineno="517"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>!=<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline>
<codeline lineno="518"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="519"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="520"><highlight class="normal"></highlight></codeline>
<codeline lineno="521"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref><sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>))<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="522"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>);</highlight></codeline>
<codeline lineno="523"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="524"><highlight class="normal"></highlight></codeline>
<codeline lineno="525"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_18b52c1fca5671ffbfe068c8d50ca0065" kindref="member">DEBUGF</ref>(<ref refid="debug_8h_1671009550216f7dc03e67ba5751e3160" kindref="member">API_LIB_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;netconn_send:<sp/>sending<sp/>%d<sp/>bytes\n&quot;</highlight><highlight class="normal">,<sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>-&gt;<ref refid="structpbuf_13b42932c0b26c9ff2b8fe88bd25fb127" kindref="member">tot_len</ref>));</highlight></codeline>
<codeline lineno="526"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;type<sp/>=<sp/><ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d951dbc12d5c7d0156077bd887fa7d36e" kindref="member">API_MSG_SEND</ref>;</highlight></codeline>
<codeline lineno="527"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref><sp/>=<sp/>conn;</highlight></codeline>
<codeline lineno="528"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_14fc5229c85bb1b1928871733dfdf0f3d" kindref="member">p</ref><sp/>=<sp/>buf-&gt;<ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref>;</highlight></codeline>
<codeline lineno="529"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="530"><highlight class="normal"></highlight></codeline>
<codeline lineno="531"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="532"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>,<sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="533"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="534"><highlight class="normal">}</highlight></codeline>
<codeline lineno="535"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="536"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="537" refid="api__lib_8c_19363929b6c680bc1dd3f302885128959" refkind="member"><highlight class="normal"><ref refid="api_8h_19363929b6c680bc1dd3f302885128959" kindref="member">netconn_write</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*dataptr,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>size,<sp/><ref refid="types_8h_1a4e0f27a9aca905e340c06d2dcae843c" kindref="member">uInt8</ref><sp/>copy)</highlight></codeline>
<codeline lineno="538"><highlight class="normal">{</highlight></codeline>
<codeline lineno="539"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>;</highlight></codeline>
<codeline lineno="540"><highlight class="normal"><sp/><sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>len;</highlight></codeline>
<codeline lineno="541"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="542"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="543"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" kindref="member">ERR_VAL</ref>;</highlight></codeline>
<codeline lineno="544"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="545"><highlight class="normal"></highlight></codeline>
<codeline lineno="546"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>!=<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline>
<codeline lineno="547"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="548"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="549"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="550"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref><sp/>==<sp/><ref refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" kindref="member">SYS_SEM_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="551"><highlight class="normal"><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref><sp/>=<sp/><ref refid="sys_8h_1adf2563f342b33ff6033eaa12f642e9d" kindref="member">sys_sem_new</ref>(0);</highlight></codeline>
<codeline lineno="552"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref><sp/>==<sp/><ref refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" kindref="member">SYS_SEM_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="554"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="555"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="556"><highlight class="normal"></highlight></codeline>
<codeline lineno="557"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref><sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>))<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="558"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>);</highlight></codeline>
<codeline lineno="559"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="560"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;type<sp/>=<sp/><ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76db61d9c706d0cd2be9779e238553c9755" kindref="member">API_MSG_WRITE</ref>;</highlight></codeline>
<codeline lineno="561"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref><sp/>=<sp/>conn;</highlight></codeline>
<codeline lineno="562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="563"><highlight class="normal"></highlight></codeline>
<codeline lineno="564"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" kindref="member">state</ref><sp/>=<sp/><ref refid="api_8h_12c6c9c1869f443c5ec7b31180a44fada572747ecfd262085e0dace9156f60d2e" kindref="member">NETCONN_WRITE</ref>;</highlight></codeline>
<codeline lineno="565"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>==<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref><sp/>&amp;&amp;<sp/>size<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="566"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_14f071675ee5451c073396ee03a5bb78f" kindref="member">w</ref>.dataptr<sp/>=<sp/>dataptr;</highlight></codeline>
<codeline lineno="567"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_14f071675ee5451c073396ee03a5bb78f" kindref="member">w</ref>.copy<sp/>=<sp/>copy;</highlight></codeline>
<codeline lineno="568"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="569"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref><sp/>==<sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref>)<sp/>{</highlight></codeline>
<codeline lineno="570"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<ref refid="tcp_8h_1d1a95f09deb49cd7341d35527d6d3e2f" kindref="member">tcp_sndbuf</ref>(conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>)<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="571"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sys_8h_16c4530613bd616e719a295779b87ae5c" kindref="member">sys_sem_wait</ref>(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref>);</highlight></codeline>
<codeline lineno="572"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>!=<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline>
<codeline lineno="573"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="575"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(size<sp/>&gt;<sp/><ref refid="tcp_8h_1d1a95f09deb49cd7341d35527d6d3e2f" kindref="member">tcp_sndbuf</ref>(conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>))<sp/>{</highlight></codeline>
<codeline lineno="577"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>We<sp/>cannot<sp/>send<sp/>more<sp/>than<sp/>one<sp/>send<sp/>buffer&apos;s<sp/>worth<sp/>of<sp/>data<sp/>at<sp/>a</highlight></codeline>
<codeline lineno="578"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>time.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="579"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>len<sp/>=<sp/><ref refid="tcp_8h_1d1a95f09deb49cd7341d35527d6d3e2f" kindref="member">tcp_sndbuf</ref>(conn-&gt;<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>);</highlight></codeline>
<codeline lineno="580"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="581"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>len<sp/>=<sp/>size;</highlight></codeline>
<codeline lineno="582"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="583"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>len<sp/>=<sp/>size;</highlight></codeline>
<codeline lineno="585"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="586"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="587"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_18b52c1fca5671ffbfe068c8d50ca0065" kindref="member">DEBUGF</ref>(<ref refid="debug_8h_1671009550216f7dc03e67ba5751e3160" kindref="member">API_LIB_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;netconn_write:<sp/>writing<sp/>%d<sp/>bytes<sp/>(%d)\n&quot;</highlight><highlight class="normal">,<sp/>len,<sp/>copy));</highlight></codeline>
<codeline lineno="588"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_14f071675ee5451c073396ee03a5bb78f" kindref="member">w</ref>.len<sp/>=<sp/>len;</highlight></codeline>
<codeline lineno="589"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="590"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);<sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="591"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>==<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline>
<codeline lineno="592"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>dataptr<sp/>=<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)dataptr<sp/>+<sp/>len);</highlight></codeline>
<codeline lineno="593"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>size<sp/>-=<sp/>len;</highlight></codeline>
<codeline lineno="594"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>==<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>)<sp/>{</highlight></codeline>
<codeline lineno="595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>;</highlight></codeline>
<codeline lineno="596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sys_8h_16c4530613bd616e719a295779b87ae5c" kindref="member">sys_sem_wait</ref>(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref>);</highlight></codeline>
<codeline lineno="597"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="598"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ret;</highlight></codeline>
<codeline lineno="599"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="600"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="601"><highlight class="normal"><sp/>ret:</highlight></codeline>
<codeline lineno="602"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>,<sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="603"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" kindref="member">state</ref><sp/>=<sp/><ref refid="api_8h_12c6c9c1869f443c5ec7b31180a44fadabf6d2818cd3f8ac1abe824234fe8dfa0" kindref="member">NETCONN_NONE</ref>;</highlight></codeline>
<codeline lineno="604"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref><sp/>!=<sp/><ref refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" kindref="member">SYS_SEM_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="605"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1f36773453b6a4db5ae71afef8bb77184" kindref="member">sys_sem_free</ref>(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref>);</highlight></codeline>
<codeline lineno="606"><highlight class="normal"><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref><sp/>=<sp/><ref refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" kindref="member">SYS_SEM_NULL</ref>;</highlight></codeline>
<codeline lineno="607"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="608"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="609"><highlight class="normal">}</highlight></codeline>
<codeline lineno="610"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="611"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="612" refid="api__lib_8c_125bb1c1c9928f91f53149a026e2e2624" refkind="member"><highlight class="normal"><ref refid="api_8h_125bb1c1c9928f91f53149a026e2e2624" kindref="member">netconn_close</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn)</highlight></codeline>
<codeline lineno="613"><highlight class="normal">{</highlight></codeline>
<codeline lineno="614"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>;</highlight></codeline>
<codeline lineno="615"><highlight class="normal"></highlight></codeline>
<codeline lineno="616"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="617"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" kindref="member">ERR_VAL</ref>;</highlight></codeline>
<codeline lineno="618"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="619"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">((<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref><sp/>=<sp/><ref refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb" kindref="member">memp_mallocp</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>))<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="620"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>);</highlight></codeline>
<codeline lineno="621"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="622"><highlight class="normal"></highlight></codeline>
<codeline lineno="623"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" kindref="member">state</ref><sp/>=<sp/><ref refid="api_8h_12c6c9c1869f443c5ec7b31180a44fada575b2bcec88c95abac43cb5e8cce2f17" kindref="member">NETCONN_CLOSE</ref>;</highlight></codeline>
<codeline lineno="624"><highlight class="normal"><sp/>again:</highlight></codeline>
<codeline lineno="625"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;type<sp/>=<sp/><ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76d69663c2a794daeda40e795407074d588" kindref="member">API_MSG_CLOSE</ref>;</highlight></codeline>
<codeline lineno="626"><highlight class="normal"><sp/><sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>-&gt;<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref><sp/>=<sp/>conn;</highlight></codeline>
<codeline lineno="627"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(<ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="628"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1afce1f71c38e3d7d08ebf0654ec97dfa" kindref="member">sys_mbox_fetch</ref>(conn-&gt;<ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="629"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>==<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref><sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref><sp/>!=<sp/><ref refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" kindref="member">SYS_SEM_NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="631"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_16c4530613bd616e719a295779b87ae5c" kindref="member">sys_sem_wait</ref>(conn-&gt;<ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref>);</highlight></codeline>
<codeline lineno="632"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>again;</highlight></codeline>
<codeline lineno="633"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="634"><highlight class="normal"><sp/><sp/>conn-&gt;<ref refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" kindref="member">state</ref><sp/>=<sp/><ref refid="api_8h_12c6c9c1869f443c5ec7b31180a44fadabf6d2818cd3f8ac1abe824234fe8dfa0" kindref="member">NETCONN_NONE</ref>;</highlight></codeline>
<codeline lineno="635"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1269bd926cd0413cf1948cf1992209451" kindref="member">memp_freep</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e572decda39458fdeaa1921df20aa15f0ea" kindref="member">MEMP_API_MSG</ref>,<sp/><ref refid="structapi__msg_11f51adb48728605e630ee4fa986a5ff4" kindref="member">msg</ref>);</highlight></codeline>
<codeline lineno="636"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="637"><highlight class="normal">}</highlight></codeline>
<codeline lineno="638"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="639"><highlight class="normal"><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="640" refid="api__lib_8c_1b9eccae90351eb6c3d2ca690068445d4" refkind="member"><highlight class="normal"><ref refid="api_8h_1b9eccae90351eb6c3d2ca690068445d4" kindref="member">netconn_err</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn)</highlight></codeline>
<codeline lineno="641"><highlight class="normal">{</highlight></codeline>
<codeline lineno="642"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>conn-&gt;<ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline>
<codeline lineno="643"><highlight class="normal">}</highlight></codeline>
<codeline lineno="644"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="645"><highlight class="normal"></highlight></codeline>
<codeline lineno="646"><highlight class="normal"></highlight></codeline>
<codeline lineno="647"><highlight class="normal"></highlight></codeline>
<codeline lineno="648"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_lib.c"/>
  </compounddef>
</doxygen>
