<?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__msg_8c" kind="file"> <compoundname>api_msg.c</compoundname> <includes refid="types_8h" local="no">ubixos/types.h</includes> <includes refid="debug_8h" local="yes">net/debug.h</includes> <includes refid="arch_8h" local="yes">net/arch.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="sys_8h" local="yes">net/sys.h</includes> <includes refid="tcpip_8h" local="yes">net/tcpip.h</includes> <incdepgraph> <node id="3852"> <label>net/ipv4/ip.h</label> <link refid="ipv4_2ip_8h"/> <childnode refid="3843" relation="include"> </childnode> <childnode refid="3853" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> <childnode refid="3855" relation="include"> </childnode> <childnode refid="3856" relation="include"> </childnode> <childnode refid="3857" relation="include"> </childnode> </node> <node id="3854"> <label>arch/lib.h</label> <link refid="lib_8h"/> </node> <node id="3856"> <label>net/netif.h</label> <link refid="netif_8h"/> <childnode refid="3847" relation="include"> </childnode> <childnode refid="3857" relation="include"> </childnode> <childnode refid="3855" relation="include"> </childnode> <childnode refid="3858" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> </node> <node id="3859"> <label>net/udp.h</label> <link refid="udp_8h"/> <childnode refid="3843" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> <childnode refid="3858" relation="include"> </childnode> <childnode refid="3852" relation="include"> </childnode> <childnode refid="3857" relation="include"> </childnode> </node> <node id="3844"> <label>arch/cpu.h</label> <link refid="cpu_8h"/> </node> <node id="3851"> <label>arch/sys_arch.h</label> <link refid="sys__arch_8h"/> </node> <node id="3860"> <label>net/tcp.h</label> <link refid="tcp_8h"/> <childnode refid="3850" relation="include"> </childnode> <childnode refid="3861" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> <childnode refid="3847" relation="include"> </childnode> <childnode refid="3852" relation="include"> </childnode> <childnode refid="3862" relation="include"> </childnode> <childnode refid="3857" relation="include"> </childnode> </node> <node id="3840"> <label>ubixos/types.h</label> <link refid="types_8h"/> <childnode refid="3841" relation="include"> </childnode> </node> <node id="3841"> <label>sys/_types.h</label> <link refid="__types_8h"/> </node> <node id="3843"> <label>net/arch.h</label> <link refid="arch_8h"/> <childnode refid="3844" relation="include"> </childnode> <childnode refid="3845" relation="include"> </childnode> </node> <node id="3862"> <label>net/ipv4/icmp.h</label> <link refid="ipv4_2icmp_8h"/> <childnode refid="3843" relation="include"> </childnode> <childnode refid="3847" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> <childnode refid="3856" relation="include"> </childnode> </node> <node id="3848"> <label>net/lwipopts.h</label> <link refid="lwipopts_8h"/> </node> <node id="3865"> <label>net/tcpip.h</label> <link refid="tcpip_8h"/> <childnode refid="3846" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> </node> <node id="3846"> <label>net/api_msg.h</label> <link refid="api__msg_8h"/> <childnode refid="3847" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> <childnode refid="3850" relation="include"> </childnode> <childnode refid="3852" relation="include"> </childnode> <childnode refid="3859" relation="include"> </childnode> <childnode refid="3860" relation="include"> </childnode> <childnode refid="3863" relation="include"> </childnode> </node> <node id="3853"> <label>net/def.h</label> <link refid="def_8h"/> <childnode refid="3854" relation="include"> </childnode> </node> <node id="3861"> <label>net/mem.h</label> <link refid="mem_8h"/> <childnode refid="3840" relation="include"> </childnode> <childnode refid="3842" relation="include"> </childnode> <childnode refid="3847" relation="include"> </childnode> <childnode refid="3843" relation="include"> </childnode> </node> <node id="3864"> <label>net/memp.h</label> <link refid="memp_8h"/> <childnode refid="3840" relation="include"> </childnode> <childnode refid="3842" relation="include"> </childnode> <childnode refid="3845" relation="include"> </childnode> <childnode refid="3848" relation="include"> </childnode> </node> <node id="3855"> <label>net/ipv4/ip_addr.h</label> <link refid="ipv4_2ip__addr_8h"/> <childnode refid="3843" relation="include"> </childnode> </node> <node id="3857"> <label>net/err.h</label> <link refid="err_8h"/> <childnode refid="3840" relation="include"> </childnode> <childnode refid="3842" relation="include"> </childnode> <childnode refid="3845" relation="include"> </childnode> </node> <node id="3863"> <label>net/api.h</label> <link refid="api_8h"/> <childnode refid="3847" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> <childnode refid="3850" relation="include"> </childnode> <childnode refid="3852" relation="include"> </childnode> <childnode refid="3859" relation="include"> </childnode> <childnode refid="3860" relation="include"> </childnode> <childnode refid="3857" relation="include"> </childnode> </node> <node id="3847"> <label>net/opt.h</label> <link refid="opt_8h"/> <childnode refid="3848" relation="include"> </childnode> </node> <node id="3850"> <label>net/sys.h</label> <link refid="sys_8h"/> <childnode refid="3845" relation="include"> </childnode> <childnode refid="3851" relation="include"> </childnode> </node> <node id="3839"> <label>src/sys/net/api/api_msg.c</label> <link refid="api_msg.c"/> <childnode refid="3840" relation="include"> </childnode> <childnode refid="3842" relation="include"> </childnode> <childnode refid="3843" relation="include"> </childnode> <childnode refid="3846" relation="include"> </childnode> <childnode refid="3864" relation="include"> </childnode> <childnode refid="3850" relation="include"> </childnode> <childnode refid="3865" relation="include"> </childnode> </node> <node id="3849"> <label>net/pbuf.h</label> <link refid="pbuf_8h"/> <childnode refid="3842" relation="include"> </childnode> <childnode refid="3843" relation="include"> </childnode> </node> <node id="3842"> <label>net/debug.h</label> <link refid="debug_8h"/> </node> <node id="3858"> <label>net/ipv4/inet.h</label> <link refid="ipv4_2inet_8h"/> <childnode refid="3843" relation="include"> </childnode> <childnode refid="3847" relation="include"> </childnode> <childnode refid="3849" relation="include"> </childnode> <childnode refid="3855" relation="include"> </childnode> </node> <node id="3845"> <label>arch/cc.h</label> <link refid="cc_8h"/> </node> </incdepgraph> <sectiondef kind="typedef"> <memberdef kind="typedef" id="api__msg_8c_1c0ed3339275e6c978ce477841f55124f" prot="public" static="no"> <type>void(*)</type> <definition>typedef void(* ) api_msg_decode(struct api_msg_msg *msg)</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>api_msg_decode</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="503" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="503" bodyend="-1"/> </memberdef> </sectiondef> <sectiondef kind="func"> <memberdef kind="function" id="api__msg_8c_1c34376c05c2532858367dbdc2eec6ba0" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <definition>static err_t accept_function</definition> <argsstring>(void *arg, struct tcp_pcb *newpcb, err_t err)</argsstring> <name>accept_function</name> <param> <type>void *</type> <declname>arg</declname> </param> <param> <type>struct <ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref> *</type> <declname>newpcb</declname> </param> <param> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <declname>err</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="161" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="160" bodyend="200"/> <references refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" compoundref="api_8h" startline="85">netconn::acceptmbox</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="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references> <references refid="tcpip_8c_1189da3fa172ad9c1b0491dcb4857fee6" compoundref="tcpip_8c" startline="56">mbox</references> <references refid="memp_8h_1ecd94926b7c2a0e23ae195f4ae97581f">memp_free</references> <references refid="memp_8h_18fd5bd978dc56399e1649381cc2a1aeb">memp_mallocp</references> <references refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1">MEMP_NETCONN</references> <references refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a">NETCONN_TCP</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="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" compoundref="api__msg_8c" startline="147" endline="157">setup_tcp</references> <references refid="structtcp__pcb_1f5fed23770a314eabbad7225fbf09ade" compoundref="tcp_8h" startline="178">tcp_pcb::state</references> <references refid="sys_8h_166160e039d0222f4dd8534cd3ab84699">sys_mbox_free</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_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</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="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references> <referencedby refid="api__msg_8c_1c5f93428ba9863cd9b438edfd8715626" compoundref="api__msg_8c" startline="368" endline="398">do_listen</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_1b15a981fb41b53567d7a4e9412c6f4c1" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>void api_msg_input</definition> <argsstring>(struct api_msg *msg)</argsstring> <name>api_msg_input</name> <param> <type>struct <ref refid="structapi__msg" kindref="compound">api_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="518" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="517" bodyend="520"/> <references refid="api__msg_8c_18db33774784c3abb518e237539b106e4" compoundref="api__msg_8c" startline="504">decode</references> <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references> <referencedby refid="tcpip_8c_161474ad2c2c25ba58cc774e2bcc4ef5f" compoundref="tcpip_8c" startline="68" endline="98">tcpip_thread</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_1ee039fae0c665f1372f4a3ff8395ffeb" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>void api_msg_post</definition> <argsstring>(struct api_msg *msg)</argsstring> <name>api_msg_post</name> <param> <type>struct <ref refid="structapi__msg" kindref="compound">api_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="524" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="523" bodyend="526"/> <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</references> <references refid="tcpip_8h_1d72ca05f74e20244cd26a8828711e9f2" compoundref="tcpip_8c" startline="121" endline="132">tcpip_apimsg</references> <referencedby refid="api__lib_8c_1dc842fc0f1de512895ef3cc9c657272a" compoundref="api__lib_8c" startline="325" endline="352">netconn_bind</referencedby> <referencedby refid="api__lib_8c_125bb1c1c9928f91f53149a026e2e2624" compoundref="api__lib_8c" startline="612" endline="637">netconn_close</referencedby> <referencedby refid="api__lib_8c_140e08b372ad246ec7d2a7c9b1a2bd8fb" compoundref="api__lib_8c" startline="355" endline="386">netconn_connect</referencedby> <referencedby refid="api__lib_8c_1b411221f912a6d9e4c82ac3963989403" compoundref="api__lib_8c" startline="227" endline="278">netconn_delete</referencedby> <referencedby refid="api__lib_8c_1b917e0fc541447d966e5cf712ce24e58" compoundref="api__lib_8c" startline="389" endline="413">netconn_listen</referencedby> <referencedby refid="api__lib_8c_1cbd0b5a0344c2c3fffe5a02445a2c2b3" compoundref="api__lib_8c" startline="430" endline="506">netconn_recv</referencedby> <referencedby refid="api__lib_8c_1c4d4d10153d47c80a783c34b27c66238" compoundref="api__lib_8c" startline="509" endline="534">netconn_send</referencedby> <referencedby refid="api__lib_8c_19363929b6c680bc1dd3f302885128959" compoundref="api__lib_8c" startline="537" endline="609">netconn_write</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_119262c4096bf0c095d44e08596d59fbf" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_accept</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_accept</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="402" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="401" bodyend="416"/> <references refid="debug_8h_14279d7ff9f986b2ff3eb068bb012b697" compoundref="debug_8h" startline="106">API_MSG_DEBUG</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="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="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</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> </memberdef> <memberdef kind="function" id="api__msg_8c_1cab3f82cc16d96db0db1f17b872613a4" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_bind</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_bind</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="244" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="243" bodyend="281"/> <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="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references> <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</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="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references> <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references> <references refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" compoundref="api__msg_8c" startline="66" endline="93">recv_udp</references> <references refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" compoundref="api__msg_8c" startline="147" endline="157">setup_tcp</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="tcp_8h_19c6755fabde07b48e59cb98d6102fbfc">tcp_bind</references> <references refid="tcp_8h_17427c5d237fe66a8097bfa8d24ceb943">tcp_new</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> <references refid="udp_8h_1aec0b34185f62a12ad61ba5b43b60360">udp_bind</references> <references refid="udp_8h_13f1f7350e351cf43afc1cb92361539b7" compoundref="udp_8h" startline="57">UDP_FLAGS_NOCHKSUM</references> <references refid="udp_8h_17bf6b42d94a2249626fd730c52a65cb2" compoundref="udp_8h" startline="58">UDP_FLAGS_UDPLITE</references> <references refid="udp_8h_1a6d6430499acae43d342f0e68ddbb209">udp_new</references> <references refid="udp_8h_1e6e4e0150998bb6e38359418c7461eb1">udp_recv</references> <references refid="udp_8h_19981d8c2b536c2d7051382c9cf27e5b1" compoundref="udp_8h" startline="91">udp_setflags</references> </memberdef> <memberdef kind="function" id="api__msg_8c_19b56a6c9fb571348291027f09471890a" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_close</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_close</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="480" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="479" bodyend="501"/> <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="tcp_8h_1aad63c28ec94587c99838bd52424d634331ec9878c0ed22e62de969d4b96b5bb">LISTEN</references> <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</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="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references> <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references> <references refid="structtcp__pcb_1f5fed23770a314eabbad7225fbf09ade" compoundref="tcp_8h" startline="178">tcp_pcb::state</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="tcp_8h_187093e137fcc53ea82a134a3f5b33623">tcp_close</references> <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references> </memberdef> <memberdef kind="function" id="api__msg_8c_18ad3068b45627dbe48440d4d6e1607d1" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_connect</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_connect</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="306" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="305" bodyend="365"/> <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="api__msg_8c_117dd70d363c3f70a12d629bfdae64f97" compoundref="api__msg_8c" startline="284" endline="302">do_connected</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="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references> <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</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="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references> <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references> <references refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" compoundref="api__msg_8c" startline="66" endline="93">recv_udp</references> <references refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" compoundref="api__msg_8c" startline="147" endline="157">setup_tcp</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="tcp_8h_1e444a97cf28a0f6b644550ab77e9dfb7">tcp_connect</references> <references refid="tcp_8h_17427c5d237fe66a8097bfa8d24ceb943">tcp_new</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> <references refid="udp_8h_187dbe1b8435cb7f2e2dbfb34e952ccc0">udp_connect</references> <references refid="udp_8h_13f1f7350e351cf43afc1cb92361539b7" compoundref="udp_8h" startline="57">UDP_FLAGS_NOCHKSUM</references> <references refid="udp_8h_17bf6b42d94a2249626fd730c52a65cb2" compoundref="udp_8h" startline="58">UDP_FLAGS_UDPLITE</references> <references refid="udp_8h_1a6d6430499acae43d342f0e68ddbb209">udp_new</references> <references refid="udp_8h_1e6e4e0150998bb6e38359418c7461eb1">udp_recv</references> <references refid="udp_8h_19981d8c2b536c2d7051382c9cf27e5b1" compoundref="udp_8h" startline="91">udp_setflags</references> </memberdef> <memberdef kind="function" id="api__msg_8c_117dd70d363c3f70a12d629bfdae64f97" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <definition>static err_t do_connected</definition> <argsstring>(void *arg, struct tcp_pcb *pcb, err_t err)</argsstring> <name>do_connected</name> <param> <type>void *</type> <declname>arg</declname> </param> <param> <type>struct <ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref> *</type> <declname>pcb</declname> </param> <param> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <declname>err</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="285" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="284" bodyend="302"/> <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="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="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a">NETCONN_TCP</references> <references refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references> <references refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" compoundref="api__msg_8c" startline="147" endline="157">setup_tcp</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references> <referencedby refid="api__msg_8c_18ad3068b45627dbe48440d4d6e1607d1" compoundref="api__msg_8c" startline="305" endline="365">do_connect</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_1351ca82b3580d84ee0d70f7ab033a236" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_delconn</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_delconn</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="209" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="208" bodyend="240"/> <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references> <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references> <references refid="tcp_8h_1aad63c28ec94587c99838bd52424d634331ec9878c0ed22e62de969d4b96b5bb">LISTEN</references> <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</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="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references> <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references> <references refid="structudp__pcb_111e4c40b8868aa40d923756a60598cab" compoundref="udp_8h" startline="71">udp_pcb::recv_arg</references> <references refid="structtcp__pcb_1f5fed23770a314eabbad7225fbf09ade" compoundref="tcp_8h" startline="178">tcp_pcb::state</references> <references refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="tcp_8h_1468c2260ddb01582e966ddcf3c25ce61">tcp_abort</references> <references refid="tcp_8h_1e77434b264a469ee4124ff945feac490">tcp_accept</references> <references refid="tcp_8h_1c10926e6f76f73e17c0d37aaab3e56b6">tcp_arg</references> <references refid="tcp_8h_187093e137fcc53ea82a134a3f5b33623">tcp_close</references> <references refid="tcp_8h_1fe31e32503125886e9174d1aa132310a">tcp_err</references> <references refid="tcp_8h_1305113b53237aa7c6ab87234e9a1e441">tcp_poll</references> <references refid="tcp_8h_1f58be9006b4ddb720113f03d56bc6e52">tcp_recv</references> <references refid="tcp_8h_13df9afd68d4aca2fe5113c67eacb8b7a">tcp_sent</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> <references refid="udp_8h_13aed8e469f74f960837ebf9f34acf646">udp_remove</references> </memberdef> <memberdef kind="function" id="api__msg_8c_1c5f93428ba9863cd9b438edfd8715626" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_listen</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_listen</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="369" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="368" bodyend="398"/> <references refid="api__msg_8c_1c34376c05c2532858367dbdc2eec6ba0" compoundref="api__msg_8c" startline="160" endline="200">accept_function</references> <references refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" compoundref="api_8h" startline="85">netconn::acceptmbox</references> <references refid="debug_8h_14279d7ff9f986b2ff3eb068bb012b697" compoundref="debug_8h" startline="106">API_MSG_DEBUG</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="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</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="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references> <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</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_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="tcp_8h_1e77434b264a469ee4124ff945feac490">tcp_accept</references> <references refid="tcp_8h_1c10926e6f76f73e17c0d37aaab3e56b6">tcp_arg</references> <references refid="tcp_8h_1d756bca9bf3258d2df5df16fd8ed26ad">tcp_listen</references> <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references> </memberdef> <memberdef kind="function" id="api__msg_8c_16130d87d8aeed24a9ef702cdc8bae188" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_newconn</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_newconn</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="204" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="203" bodyend="205"/> </memberdef> <memberdef kind="function" id="api__msg_8c_1e2a8fddd0b0f2a2b50c6e52281d37a67" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_recv</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_recv</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="439" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="438" bodyend="446"/> <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references> <references refid="structapi__msg__msg_1430df6234ff9e241deaa7a951cbf9e81" compoundref="api__msg_8h" startline="79">api_msg_msg::len</references> <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references> <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_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_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="tcp_8h_16b6b2d7993a2b4e1ef7e0f9425a2870d">tcp_recved</references> <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references> </memberdef> <memberdef kind="function" id="api__msg_8c_1c47e25770a5c135b4ef043b8f9608d95" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_send</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_send</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="420" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="419" bodyend="435"/> <references refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" compoundref="api__msg_8h" startline="69">api_msg_msg::conn</references> <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</references> <references refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</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="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="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</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> <references refid="udp_8h_1a4546c43981f043c0ae4514d625cc3fc">udp_send</references> </memberdef> <memberdef kind="function" id="api__msg_8c_1ad9b6e185b705c42c144f849b54fbf0e" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void do_write</definition> <argsstring>(struct api_msg_msg *msg)</argsstring> <name>do_write</name> <param> <type>struct <ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref> *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="450" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="449" bodyend="476"/> <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_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="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70">api_msg_msg::msg</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="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="def_8h" startline="41">NULL</references> <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="tcp_8h_10cbcc6d628f644a530daf629fa3e5f7f">tcp_output</references> <references refid="tcp_8h_1212607f48aaac1e91a2f09b7880b7c3f">tcp_write</references> <references refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" compoundref="api_8h" startline="76">netconn::type</references> <references refid="structtcp__pcb_19e6ed24ec0f8e5855c3b34fa361bfd5a" compoundref="tcp_8h" startline="258">tcp_pcb::unacked</references> <references refid="structapi__msg__msg_14f071675ee5451c073396ee03a5bb78f">api_msg_msg::w</references> </memberdef> <memberdef kind="function" id="api__msg_8c_14d2f6663cc266c48f4de67e730d7ea32" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void err_tcp</definition> <argsstring>(void *arg, err_t err)</argsstring> <name>err_tcp</name> <param> <type>void *</type> <declname>arg</declname> </param> <param> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <declname>err</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="123" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="122" bodyend="144"/> <references refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" compoundref="api_8h" startline="85">netconn::acceptmbox</references> <references refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" compoundref="api_8h" startline="82">netconn::err</references> <references refid="structnetconn_1d54529e379763409dae48a191c401def" compoundref="api_8h" startline="83">netconn::mbox</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="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <references refid="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" compoundref="sys__arch_8h" startline="39">SYS_SEM_NULL</references> <references refid="sys_8h_1dcdd78b22487e983e7636c636292fbfa">sys_sem_signal</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <referencedby refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" compoundref="api__msg_8c" startline="147" endline="157">setup_tcp</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_1cfa8c3089ec7810a74fea8d004197343" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <definition>static err_t poll_tcp</definition> <argsstring>(void *arg, struct tcp_pcb *pcb)</argsstring> <name>poll_tcp</name> <param> <type>void *</type> <declname>arg</declname> </param> <param> <type>struct <ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref> *</type> <declname>pcb</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="97" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="96" bodyend="107"/> <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</references> <references refid="api_8h_12c6c9c1869f443c5ec7b31180a44fada575b2bcec88c95abac43cb5e8cce2f17">NETCONN_CLOSE</references> <references refid="api_8h_12c6c9c1869f443c5ec7b31180a44fada572747ecfd262085e0dace9156f60d2e">NETCONN_WRITE</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__arch_8h_1c66fcad3bfe79589054eb31765031544" compoundref="sys__arch_8h" startline="39">SYS_SEM_NULL</references> <references refid="sys_8h_1dcdd78b22487e983e7636c636292fbfa">sys_sem_signal</references> <referencedby refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" compoundref="api__msg_8c" startline="147" endline="157">setup_tcp</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_15271a23a432de3322f8fa228a3f3a11f" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <definition>static err_t recv_tcp</definition> <argsstring>(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)</argsstring> <name>recv_tcp</name> <param> <type>void *</type> <declname>arg</declname> </param> <param> <type>struct <ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref> *</type> <declname>pcb</declname> </param> <param> <type>struct <ref refid="structpbuf" kindref="compound">pbuf</ref> *</type> <declname>p</declname> </param> <param> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <declname>err</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="48" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="47" bodyend="63"/> <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="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" compoundref="err_8h" startline="58">ERR_VAL</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="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <referencedby refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" compoundref="api__msg_8c" startline="147" endline="157">setup_tcp</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void recv_udp</definition> <argsstring>(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, uInt16 port)</argsstring> <name>recv_udp</name> <param> <type>void *</type> <declname>arg</declname> </param> <param> <type>struct <ref refid="structudp__pcb" kindref="compound">udp_pcb</ref> *</type> <declname>pcb</declname> </param> <param> <type>struct <ref refid="structpbuf" kindref="compound">pbuf</ref> *</type> <declname>p</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_msg.c" line="68" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="66" bodyend="93"/> <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="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="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746">pbuf_free</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="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" compoundref="sys__arch_8h" startline="38">SYS_MBOX_NULL</references> <references refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f">sys_mbox_post</references> <referencedby refid="api__msg_8c_1cab3f82cc16d96db0db1f17b872613a4" compoundref="api__msg_8c" startline="243" endline="281">do_bind</referencedby> <referencedby refid="api__msg_8c_18ad3068b45627dbe48440d4d6e1607d1" compoundref="api__msg_8c" startline="305" endline="365">do_connect</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_1603b715a121557dc45c821caab18efc2" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></type> <definition>static err_t sent_tcp</definition> <argsstring>(void *arg, struct tcp_pcb *pcb, uInt16 len)</argsstring> <name>sent_tcp</name> <param> <type>void *</type> <declname>arg</declname> </param> <param> <type>struct <ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref> *</type> <declname>pcb</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_msg.c" line="111" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="110" bodyend="119"/> <references refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" compoundref="err_8h" startline="48">ERR_OK</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="sys__arch_8h_1c66fcad3bfe79589054eb31765031544" compoundref="sys__arch_8h" startline="39">SYS_SEM_NULL</references> <references refid="sys_8h_1dcdd78b22487e983e7636c636292fbfa">sys_sem_signal</references> <referencedby refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" compoundref="api__msg_8c" startline="147" endline="157">setup_tcp</referencedby> </memberdef> <memberdef kind="function" id="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void setup_tcp</definition> <argsstring>(struct netconn *conn)</argsstring> <name>setup_tcp</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_msg.c" line="148" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="147" bodyend="157"/> <references refid="api__msg_8c_14d2f6663cc266c48f4de67e730d7ea32" compoundref="api__msg_8c" startline="122" endline="144">err_tcp</references> <references refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23">netconn::pcb</references> <references refid="api__msg_8c_1cfa8c3089ec7810a74fea8d004197343" compoundref="api__msg_8c" startline="96" endline="107">poll_tcp</references> <references refid="api__msg_8c_15271a23a432de3322f8fa228a3f3a11f" compoundref="api__msg_8c" startline="47" endline="63">recv_tcp</references> <references refid="api__msg_8c_1603b715a121557dc45c821caab18efc2" compoundref="api__msg_8c" startline="110" endline="119">sent_tcp</references> <references refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" compoundref="api_8h" startline="79">netconn::tcp</references> <references refid="tcp_8h_1c10926e6f76f73e17c0d37aaab3e56b6">tcp_arg</references> <references refid="tcp_8h_1fe31e32503125886e9174d1aa132310a">tcp_err</references> <references refid="tcp_8h_1305113b53237aa7c6ab87234e9a1e441">tcp_poll</references> <references refid="tcp_8h_1f58be9006b4ddb720113f03d56bc6e52">tcp_recv</references> <references refid="tcp_8h_13df9afd68d4aca2fe5113c67eacb8b7a">tcp_sent</references> <referencedby refid="api__msg_8c_1c34376c05c2532858367dbdc2eec6ba0" compoundref="api__msg_8c" startline="160" endline="200">accept_function</referencedby> <referencedby refid="api__msg_8c_1cab3f82cc16d96db0db1f17b872613a4" compoundref="api__msg_8c" startline="243" endline="281">do_bind</referencedby> <referencedby refid="api__msg_8c_18ad3068b45627dbe48440d4d6e1607d1" compoundref="api__msg_8c" startline="305" endline="365">do_connect</referencedby> <referencedby refid="api__msg_8c_117dd70d363c3f70a12d629bfdae64f97" compoundref="api__msg_8c" startline="284" endline="302">do_connected</referencedby> </memberdef> </sectiondef> <sectiondef kind="var"> <memberdef kind="variable" id="api__msg_8c_18db33774784c3abb518e237539b106e4" prot="public" static="yes" mutable="no"> <type><ref refid="api__msg_8c_1c0ed3339275e6c978ce477841f55124f" kindref="member">api_msg_decode</ref></type> <definition>api_msg_decode decode[API_MSG_MAX]</definition> <argsstring>[API_MSG_MAX]</argsstring> <name>decode</name> <initializer> { do_newconn, do_delconn, do_bind, do_connect, do_listen, do_accept, do_send, do_recv, do_write, do_close }</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" line="515" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c" bodystart="504" bodyend="-1"/> <referencedby refid="api__msg_8c_1b15a981fb41b53567d7a4e9412c6f4c1" compoundref="api__msg_8c" startline="517" endline="520">api_msg_input</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''<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/><adam@sics.se></highlight></codeline> <codeline lineno="32"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="33"><highlight class="comment"><sp/>*<sp/>$Id: api__msg_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="preprocessor">#include<sp/><<ref refid="types_8h" kindref="compound">ubixos/types.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="37"><highlight class="normal"></highlight></codeline> <codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="debug_8h" kindref="compound">net/debug.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="39"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="arch_8h" kindref="compound">net/arch.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="40"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="api__msg_8h" kindref="compound">net/api_msg.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="memp_8h" kindref="compound">net/memp.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="sys_8h" kindref="compound">net/sys.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="43"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="tcpip_8h" kindref="compound">net/tcpip.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="44"><highlight class="normal"></highlight></codeline> <codeline lineno="45"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="46"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline> <codeline lineno="47" refid="api__msg_8c_15271a23a432de3322f8fa228a3f3a11f" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_15271a23a432de3322f8fa228a3f3a11f" kindref="member">recv_tcp</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref><sp/>*pcb,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref><sp/>err)</highlight></codeline> <codeline lineno="48"><highlight class="normal">{</highlight></codeline> <codeline lineno="49"><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="50"><highlight class="normal"></highlight></codeline> <codeline lineno="51"><highlight class="normal"><sp/><sp/>conn<sp/>=<sp/>arg;</highlight></codeline> <codeline lineno="52"><highlight class="normal"></highlight></codeline> <codeline lineno="53"><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="54"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746" kindref="member">pbuf_free</ref>(p);</highlight></codeline> <codeline lineno="55"><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="56"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="57"><highlight class="normal"><sp/><sp/></highlight></codeline> <codeline lineno="58"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-><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="59"><highlight class="normal"><sp/><sp/><sp/><sp/>conn-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/>err;</highlight></codeline> <codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(conn-><ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>,<sp/>p);</highlight></codeline> <codeline lineno="61"><highlight class="normal"><sp/><sp/>}<sp/><sp/></highlight></codeline> <codeline lineno="62"><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="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="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="66" refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" kindref="member">recv_udp</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structudp__pcb" kindref="compound">udp_pcb</ref><sp/>*<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,</highlight></codeline> <codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structip__addr" kindref="compound">ip_addr</ref><sp/>*addr,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>port)</highlight></codeline> <codeline lineno="68"><highlight class="normal">{</highlight></codeline> <codeline lineno="69"><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="70"><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="71"><highlight class="normal"></highlight></codeline> <codeline lineno="72"><highlight class="normal"><sp/><sp/>conn<sp/>=<sp/>arg;</highlight></codeline> <codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight></codeline> <codeline lineno="74"><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="75"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746" kindref="member">pbuf_free</ref>(p);</highlight></codeline> <codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="77"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="78"><highlight class="normal"></highlight></codeline> <codeline lineno="79"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-><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="80"><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="81"><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="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1334112aa2ac402c254d604c0dbbbb746" kindref="member">pbuf_free</ref>(p);</highlight></codeline> <codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>buf-><ref refid="structnetbuf_1e0c3ba45f7e26a90585c8d79d59c41bd" kindref="member">p</ref><sp/>=<sp/>p;</highlight></codeline> <codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>buf-><ref refid="structnetbuf_12301ad2b03edfb74049a2b0ef6cd2cd5" kindref="member">ptr</ref><sp/>=<sp/>p;</highlight></codeline> <codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>buf-><ref refid="structnetbuf_149224185e32ceccf52327cf1f97408d6" kindref="member">fromaddr</ref><sp/>=<sp/>addr;</highlight></codeline> <codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>buf-><ref refid="structnetbuf_1e14783033660f4975f99dcd6c57e1c7b" kindref="member">fromport</ref><sp/>=<sp/>port;</highlight></codeline> <codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline> <codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(conn-><ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>,<sp/>buf);</highlight></codeline> <codeline lineno="92"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="93"><highlight class="normal">}</highlight></codeline> <codeline lineno="94"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="95"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline> <codeline lineno="96" refid="api__msg_8c_1cfa8c3089ec7810a74fea8d004197343" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1cfa8c3089ec7810a74fea8d004197343" kindref="member">poll_tcp</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref><sp/>*<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>)</highlight></codeline> <codeline lineno="97"><highlight class="normal">{</highlight></codeline> <codeline lineno="98"><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="99"><highlight class="normal"></highlight></codeline> <codeline lineno="100"><highlight class="normal"><sp/><sp/>conn<sp/>=<sp/>arg;</highlight></codeline> <codeline lineno="101"><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="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>(conn-><ref refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" kindref="member">state</ref><sp/>==<sp/><ref refid="api_8h_12c6c9c1869f443c5ec7b31180a44fada572747ecfd262085e0dace9156f60d2e" kindref="member">NETCONN_WRITE</ref><sp/>||<sp/>conn-><ref refid="structnetconn_1936c33090ec35e5e8c0011be5515a589" kindref="member">state</ref><sp/>==<sp/><ref refid="api_8h_12c6c9c1869f443c5ec7b31180a44fada575b2bcec88c95abac43cb5e8cce2f17" kindref="member">NETCONN_CLOSE</ref>)<sp/>&&</highlight></codeline> <codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>conn-><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="104"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1dcdd78b22487e983e7636c636292fbfa" kindref="member">sys_sem_signal</ref>(conn-><ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref>);</highlight></codeline> <codeline lineno="105"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="106"><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="107"><highlight class="normal">}</highlight></codeline> <codeline lineno="108"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="109"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline> <codeline lineno="110" refid="api__msg_8c_1603b715a121557dc45c821caab18efc2" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1603b715a121557dc45c821caab18efc2" kindref="member">sent_tcp</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref><sp/>*<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>,<sp/><ref refid="types_8h_13b65128d2644e9b80cec9a69bfa7e094" kindref="member">uInt16</ref><sp/>len)</highlight></codeline> <codeline lineno="111"><highlight class="normal">{</highlight></codeline> <codeline lineno="112"><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="113"><highlight class="normal"></highlight></codeline> <codeline lineno="114"><highlight class="normal"><sp/><sp/>conn<sp/>=<sp/>arg;</highlight></codeline> <codeline lineno="115"><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/>&&<sp/>conn-><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="116"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1dcdd78b22487e983e7636c636292fbfa" kindref="member">sys_sem_signal</ref>(conn-><ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref>);</highlight></codeline> <codeline lineno="117"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="118"><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="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"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="122" refid="api__msg_8c_14d2f6663cc266c48f4de67e730d7ea32" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_14d2f6663cc266c48f4de67e730d7ea32" kindref="member">err_tcp</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref><sp/><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>)</highlight></codeline> <codeline lineno="123"><highlight class="normal">{</highlight></codeline> <codeline lineno="124"><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="125"><highlight class="normal"></highlight></codeline> <codeline lineno="126"><highlight class="normal"><sp/><sp/>conn<sp/>=<sp/>arg;</highlight></codeline> <codeline lineno="127"><highlight class="normal"></highlight></codeline> <codeline lineno="128"><highlight class="normal"><sp/><sp/>conn-><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="129"><highlight class="normal"></highlight></codeline> <codeline lineno="130"><highlight class="normal"><sp/><sp/></highlight></codeline> <codeline lineno="131"><highlight class="normal"><sp/><sp/>conn-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/>err;</highlight></codeline> <codeline lineno="132"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-><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="133"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(conn-><ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="134"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="135"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref><sp/>!=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(conn-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="137"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="138"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-><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="139"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(conn-><ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="140"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="141"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-><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="142"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1dcdd78b22487e983e7636c636292fbfa" kindref="member">sys_sem_signal</ref>(conn-><ref refid="structnetconn_12524a19c868ae15196e6aab1141e8885" kindref="member">sem</ref>);</highlight></codeline> <codeline lineno="143"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="144"><highlight class="normal">}</highlight></codeline> <codeline lineno="145"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="146"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="147" refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" kindref="member">setup_tcp</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetconn" kindref="compound">netconn</ref><sp/>*conn)</highlight></codeline> <codeline lineno="148"><highlight class="normal">{</highlight></codeline> <codeline lineno="149"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref><sp/>*pcb;</highlight></codeline> <codeline lineno="150"><highlight class="normal"><sp/><sp/></highlight></codeline> <codeline lineno="151"><highlight class="normal"><sp/><sp/>pcb<sp/>=<sp/>conn-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>;</highlight></codeline> <codeline lineno="152"><highlight class="normal"><sp/><sp/><ref refid="tcp_8h_1c10926e6f76f73e17c0d37aaab3e56b6" kindref="member">tcp_arg</ref>(pcb,<sp/>conn);</highlight></codeline> <codeline lineno="153"><highlight class="normal"><sp/><sp/><ref refid="tcp_8h_1f58be9006b4ddb720113f03d56bc6e52" kindref="member">tcp_recv</ref>(pcb,<sp/><ref refid="api__msg_8c_15271a23a432de3322f8fa228a3f3a11f" kindref="member">recv_tcp</ref>);</highlight></codeline> <codeline lineno="154"><highlight class="normal"><sp/><sp/><ref refid="tcp_8h_13df9afd68d4aca2fe5113c67eacb8b7a" kindref="member">tcp_sent</ref>(pcb,<sp/><ref refid="api__msg_8c_1603b715a121557dc45c821caab18efc2" kindref="member">sent_tcp</ref>);</highlight></codeline> <codeline lineno="155"><highlight class="normal"><sp/><sp/><ref refid="tcp_8h_1305113b53237aa7c6ab87234e9a1e441" kindref="member">tcp_poll</ref>(pcb,<sp/><ref refid="api__msg_8c_1cfa8c3089ec7810a74fea8d004197343" kindref="member">poll_tcp</ref>,<sp/>4);</highlight></codeline> <codeline lineno="156"><highlight class="normal"><sp/><sp/><ref refid="tcp_8h_1fe31e32503125886e9174d1aa132310a" kindref="member">tcp_err</ref>(pcb,<sp/><ref refid="api__msg_8c_14d2f6663cc266c48f4de67e730d7ea32" kindref="member">err_tcp</ref>);</highlight></codeline> <codeline lineno="157"><highlight class="normal">}</highlight></codeline> <codeline lineno="158"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="159"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline> <codeline lineno="160" refid="api__msg_8c_1c34376c05c2532858367dbdc2eec6ba0" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1c34376c05c2532858367dbdc2eec6ba0" kindref="member">accept_function</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref><sp/>*newpcb,<sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref><sp/>err)</highlight></codeline> <codeline lineno="161"><highlight class="normal">{</highlight></codeline> <codeline lineno="162"><highlight class="normal"><sp/><sp/><ref refid="structsys__mbox" kindref="compound">sys_mbox_t</ref><sp/>*<ref refid="tcpip_8c_1189da3fa172ad9c1b0491dcb4857fee6" kindref="member">mbox</ref>;</highlight></codeline> <codeline lineno="163"><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="164"><highlight class="normal"><sp/><sp/></highlight></codeline> <codeline lineno="165"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>API_MSG_DEBUG</highlight></codeline> <codeline lineno="166"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#if<sp/>TCP_DEBUG</highlight></codeline> <codeline lineno="167"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/>tcp_debug_print_state(newpcb-><ref refid="structtcp__pcb_1f5fed23770a314eabbad7225fbf09ade" kindref="member">state</ref>);</highlight></codeline> <codeline lineno="168"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>TCP_DEBUG<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="169"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>API_MSG_DEBUG<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="170"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1189da3fa172ad9c1b0491dcb4857fee6" kindref="member">mbox</ref><sp/>=<sp/>(<ref refid="structsys__mbox" kindref="compound">sys_mbox_t</ref><sp/>*)arg;</highlight></codeline> <codeline lineno="171"><highlight class="normal"><sp/><sp/>newconn<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="172"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(newconn<sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="173"><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="174"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="175"><highlight class="normal"><sp/><sp/>newconn-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref><sp/>=<sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref>;</highlight></codeline> <codeline lineno="176"><highlight class="normal"><sp/><sp/>newconn-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref><sp/>=<sp/>newpcb;</highlight></codeline> <codeline lineno="177"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" kindref="member">setup_tcp</ref>(newconn);</highlight></codeline> <codeline lineno="178"><highlight class="normal"><sp/><sp/>newconn-><ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref><sp/>=<sp/><ref refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" kindref="member">sys_mbox_new</ref>();</highlight></codeline> <codeline lineno="179"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(newconn-><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="180"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memp_8h_1ecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1" kindref="member">MEMP_NETCONN</ref>,<sp/>newconn);</highlight></codeline> <codeline lineno="181"><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="182"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="183"><highlight class="normal"><sp/><sp/>newconn-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref><sp/>=<sp/><ref refid="sys_8h_13b766e6df37d63d5f1144c5089c2af94" kindref="member">sys_mbox_new</ref>();</highlight></codeline> <codeline lineno="184"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(newconn-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref><sp/>==<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_166160e039d0222f4dd8534cd3ab84699" kindref="member">sys_mbox_free</ref>(newconn-><ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>);</highlight></codeline> <codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memp_8h_1ecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1" kindref="member">MEMP_NETCONN</ref>,<sp/>newconn);</highlight></codeline> <codeline lineno="187"><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="188"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="189"><highlight class="normal"><sp/><sp/>newconn-><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="190"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(newconn-><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="191"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_166160e039d0222f4dd8534cd3ab84699" kindref="member">sys_mbox_free</ref>(newconn-><ref refid="structnetconn_19f2bf6a3865b6a22a8a71ec2f3e770da" kindref="member">recvmbox</ref>);</highlight></codeline> <codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_166160e039d0222f4dd8534cd3ab84699" kindref="member">sys_mbox_free</ref>(newconn-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>);</highlight></codeline> <codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memp_8h_1ecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(<ref refid="memp_8h_185a164b1f7764951cc685ea525114e57c734c3ec027353cbb98cd72fa986f5f1" kindref="member">MEMP_NETCONN</ref>,<sp/>newconn);</highlight></codeline> <codeline lineno="194"><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="195"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="196"><highlight class="normal"><sp/><sp/>newconn-><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="197"><highlight class="normal"><sp/><sp/>newconn-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/>err;</highlight></codeline> <codeline lineno="198"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(*<ref refid="tcpip_8c_1189da3fa172ad9c1b0491dcb4857fee6" kindref="member">mbox</ref>,<sp/>newconn);</highlight></codeline> <codeline lineno="199"><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="200"><highlight class="normal">}</highlight></codeline> <codeline lineno="201"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="202"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="203" refid="api__msg_8c_16130d87d8aeed24a9ef702cdc8bae188" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_16130d87d8aeed24a9ef702cdc8bae188" kindref="member">do_newconn</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="204"><highlight class="normal">{</highlight></codeline> <codeline lineno="205"><highlight class="normal">}</highlight></codeline> <codeline lineno="206"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="207"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="208" refid="api__msg_8c_1351ca82b3580d84ee0d70f7ab033a236" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1351ca82b3580d84ee0d70f7ab033a236" kindref="member">do_delconn</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="209"><highlight class="normal">{</highlight></codeline> <codeline lineno="210"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="212"><highlight class="normal"><sp/><sp/><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="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="214"><highlight class="normal"><sp/><sp/><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="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="216"><highlight class="normal"><sp/><sp/><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="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>-><ref refid="structudp__pcb_111e4c40b8868aa40d923756a60598cab" kindref="member">recv_arg</ref><sp/>=<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline> <codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_13aed8e469f74f960837ebf9f34acf646" kindref="member">udp_remove</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>);</highlight></codeline> <codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="220"><highlight class="normal"><sp/><sp/><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="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1c10926e6f76f73e17c0d37aaab3e56b6" kindref="member">tcp_arg</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_13df9afd68d4aca2fe5113c67eacb8b7a" kindref="member">tcp_sent</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1f58be9006b4ddb720113f03d56bc6e52" kindref="member">tcp_recv</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1e77434b264a469ee4124ff945feac490" kindref="member">tcp_accept</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1305113b53237aa7c6ab87234e9a1e441" kindref="member">tcp_poll</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/>0);</highlight></codeline> <codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1fe31e32503125886e9174d1aa132310a" kindref="member">tcp_err</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>-><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="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_187093e137fcc53ea82a134a3f5b33623" kindref="member">tcp_close</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>);</highlight></codeline> <codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(<ref refid="tcp_8h_187093e137fcc53ea82a134a3f5b33623" kindref="member">tcp_close</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>)<sp/>!=<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline> <codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1468c2260ddb01582e966ddcf3c25ce61" kindref="member">tcp_abort</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>);</highlight></codeline> <codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="236"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="237"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref><sp/>!=<sp/><ref refid="sys__arch_8h_1151f190d8a41cf6e2a02e0eec2b75355" kindref="member">SYS_MBOX_NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="239"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="240"><highlight class="normal">}</highlight></codeline> <codeline lineno="241"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="242"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="243" refid="api__msg_8c_1cab3f82cc16d96db0db1f17b872613a4" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1cab3f82cc16d96db0db1f17b872613a4" kindref="member">do_bind</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="244"><highlight class="normal">{</highlight></codeline> <codeline lineno="245"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="247"><highlight class="normal"><sp/><sp/><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="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>=<sp/><ref refid="udp_8h_1a6d6430499acae43d342f0e68ddbb209" kindref="member">udp_new</ref>();</highlight></codeline> <codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_19981d8c2b536c2d7051382c9cf27e5b1" kindref="member">udp_setflags</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="udp_8h_17bf6b42d94a2249626fd730c52a65cb2" kindref="member">UDP_FLAGS_UDPLITE</ref>);</highlight></codeline> <codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_1e6e4e0150998bb6e38359418c7461eb1" kindref="member">udp_recv</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" kindref="member">recv_udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>);</highlight></codeline> <codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="252"><highlight class="normal"><sp/><sp/><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="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>=<sp/><ref refid="udp_8h_1a6d6430499acae43d342f0e68ddbb209" kindref="member">udp_new</ref>();</highlight></codeline> <codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_19981d8c2b536c2d7051382c9cf27e5b1" kindref="member">udp_setflags</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="udp_8h_13f1f7350e351cf43afc1cb92361539b7" kindref="member">UDP_FLAGS_NOCHKSUM</ref>);</highlight></codeline> <codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_1e6e4e0150998bb6e38359418c7461eb1" kindref="member">udp_recv</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" kindref="member">recv_udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>);</highlight></codeline> <codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="257"><highlight class="normal"><sp/><sp/><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="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>=<sp/><ref refid="udp_8h_1a6d6430499acae43d342f0e68ddbb209" kindref="member">udp_new</ref>();</highlight></codeline> <codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_1e6e4e0150998bb6e38359418c7461eb1" kindref="member">udp_recv</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" kindref="member">recv_udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>);</highlight></codeline> <codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="261"><highlight class="normal"><sp/><sp/><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="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref><sp/>=<sp/><ref refid="tcp_8h_17427c5d237fe66a8097bfa8d24ceb943" kindref="member">tcp_new</ref>();</highlight></codeline> <codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" kindref="member">setup_tcp</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>);</highlight></codeline> <codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="266"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="267"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="268"><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="269"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="270"><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="271"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="272"><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="273"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="udp_8h_1aec0b34185f62a12ad61ba5b43b60360" kindref="member">udp_bind</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.ipaddr,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.port);</highlight></codeline> <codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="275"><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="276"><highlight class="normal"><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="tcp_8h_19c6755fabde07b48e59cb98d6102fbfc" kindref="member">tcp_bind</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,</highlight></codeline> <codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.ipaddr,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.port);</highlight></codeline> <codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="279"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="280"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="281"><highlight class="normal">}</highlight></codeline> <codeline lineno="282"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="283"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref></highlight></codeline> <codeline lineno="284" refid="api__msg_8c_117dd70d363c3f70a12d629bfdae64f97" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_117dd70d363c3f70a12d629bfdae64f97" kindref="member">do_connected</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structtcp__pcb" kindref="compound">tcp_pcb</ref><sp/>*<ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>,<sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref><sp/><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>)</highlight></codeline> <codeline lineno="285"><highlight class="normal">{</highlight></codeline> <codeline lineno="286"><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="287"><highlight class="normal"></highlight></codeline> <codeline lineno="288"><highlight class="normal"><sp/><sp/>conn<sp/>=<sp/>arg;</highlight></codeline> <codeline lineno="289"><highlight class="normal"></highlight></codeline> <codeline lineno="290"><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="291"><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="292"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight></codeline> <codeline lineno="294"><highlight class="normal"><sp/><sp/>conn-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/>err;</highlight></codeline> <codeline lineno="295"><highlight class="normal"></highlight></codeline> <codeline lineno="296"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(conn-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref><sp/>==<sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref><sp/>&&<sp/>err<sp/>==<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline> <codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" kindref="member">setup_tcp</ref>(conn);</highlight></codeline> <codeline lineno="298"><highlight class="normal"><sp/><sp/>}<sp/><sp/><sp/><sp/></highlight></codeline> <codeline lineno="299"><highlight class="normal"><sp/><sp/></highlight></codeline> <codeline lineno="300"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(conn-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="301"><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="302"><highlight class="normal">}</highlight></codeline> <codeline lineno="303"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="304"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="305" refid="api__msg_8c_18ad3068b45627dbe48440d4d6e1607d1" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_18ad3068b45627dbe48440d4d6e1607d1" kindref="member">do_connect</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="306"><highlight class="normal">{</highlight></codeline> <codeline lineno="307"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="309"><highlight class="normal"><sp/><sp/><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="310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>=<sp/><ref refid="udp_8h_1a6d6430499acae43d342f0e68ddbb209" kindref="member">udp_new</ref>();</highlight></codeline> <codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_19981d8c2b536c2d7051382c9cf27e5b1" kindref="member">udp_setflags</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="udp_8h_17bf6b42d94a2249626fd730c52a65cb2" kindref="member">UDP_FLAGS_UDPLITE</ref>);</highlight></codeline> <codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_1e6e4e0150998bb6e38359418c7461eb1" kindref="member">udp_recv</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" kindref="member">recv_udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>);</highlight></codeline> <codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="319"><highlight class="normal"><sp/><sp/><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="320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>=<sp/><ref refid="udp_8h_1a6d6430499acae43d342f0e68ddbb209" kindref="member">udp_new</ref>();</highlight></codeline> <codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_19981d8c2b536c2d7051382c9cf27e5b1" kindref="member">udp_setflags</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="udp_8h_13f1f7350e351cf43afc1cb92361539b7" kindref="member">UDP_FLAGS_NOCHKSUM</ref>);</highlight></codeline> <codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_1e6e4e0150998bb6e38359418c7461eb1" kindref="member">udp_recv</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" kindref="member">recv_udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>);</highlight></codeline> <codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="329"><highlight class="normal"><sp/><sp/><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="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>=<sp/><ref refid="udp_8h_1a6d6430499acae43d342f0e68ddbb209" kindref="member">udp_new</ref>();</highlight></codeline> <codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref><sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_1e6e4e0150998bb6e38359418c7461eb1" kindref="member">udp_recv</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/><ref refid="api__msg_8c_19920c045f07d61ccb1022a0af7feb0ed" kindref="member">recv_udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>);</highlight></codeline> <codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="338"><highlight class="normal"><sp/><sp/><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="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref><sp/>=<sp/><ref refid="tcp_8h_17427c5d237fe66a8097bfa8d24ceb943" kindref="member">tcp_new</ref>();<sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> <codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="347"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="348"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="349"><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="350"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="351"><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="352"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="353"><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="354"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="udp_8h_187dbe1b8435cb7f2e2dbfb34e952ccc0" kindref="member">udp_connect</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.ipaddr,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.port);</highlight></codeline> <codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="357"><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="358"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/>tcp_arg(msg->conn->pcb.tcp,<sp/>msg->conn);*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="api__msg_8c_1b5d697e0acb9e92139f177233cb42fbd" kindref="member">setup_tcp</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>);</highlight></codeline> <codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1e444a97cf28a0f6b644550ab77e9dfb7" kindref="member">tcp_connect</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.ipaddr,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_197ea2d17aa6bc11e99cb6bd6b563e094" kindref="member">bc</ref>.port,</highlight></codeline> <codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="api__msg_8c_117dd70d363c3f70a12d629bfdae64f97" kindref="member">do_connected</ref>);</highlight></codeline> <codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*tcp_output(msg->conn->pcb.tcp);*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="364"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="365"><highlight class="normal">}</highlight></codeline> <codeline lineno="366"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="367"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="368" refid="api__msg_8c_1c5f93428ba9863cd9b438edfd8715626" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1c5f93428ba9863cd9b438edfd8715626" kindref="member">do_listen</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="369"><highlight class="normal">{</highlight></codeline> <codeline lineno="370"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="372"><highlight class="normal"><sp/><sp/><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="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="374"><highlight class="normal"><sp/><sp/><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="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="376"><highlight class="normal"><sp/><sp/><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="377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_18b52c1fca5671ffbfe068c8d50ca0065" kindref="member">DEBUGF</ref>(<ref refid="debug_8h_14279d7ff9f986b2ff3eb068bb012b697" kindref="member">API_MSG_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"api_msg:<sp/>listen<sp/>UDP:<sp/>cannot<sp/>listen<sp/>for<sp/>UDP.\n"</highlight><highlight class="normal">));</highlight></codeline> <codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="379"><highlight class="normal"><sp/><sp/><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="380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref><sp/>=<sp/><ref refid="tcp_8h_1d756bca9bf3258d2df5df16fd8ed26ad" kindref="member">tcp_listen</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>);</highlight></codeline> <codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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="385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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="386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_16ab63185cc5dff3c50c61d99bdf98369" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1c10926e6f76f73e17c0d37aaab3e56b6" kindref="member">tcp_arg</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)&(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_19b59188f300828d2b5814e27ab27cad0" kindref="member">acceptmbox</ref>));</highlight></codeline> <codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_1e77434b264a469ee4124ff945feac490" kindref="member">tcp_accept</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/><ref refid="api__msg_8c_1c34376c05c2532858367dbdc2eec6ba0" kindref="member">accept_function</ref>);</highlight></codeline> <codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="396"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="397"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="398"><highlight class="normal">}</highlight></codeline> <codeline lineno="399"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="400"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="401" refid="api__msg_8c_119262c4096bf0c095d44e08596d59fbf" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_119262c4096bf0c095d44e08596d59fbf" kindref="member">do_accept</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="402"><highlight class="normal">{</highlight></codeline> <codeline lineno="403"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="405"><highlight class="normal"><sp/><sp/><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="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="407"><highlight class="normal"><sp/><sp/><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="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d916b8ec191d69f7e639f4ab40779069636" kindref="member">NETCONN_UDP</ref>:<sp/><sp/><sp/><sp/></highlight></codeline> <codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_18b52c1fca5671ffbfe068c8d50ca0065" kindref="member">DEBUGF</ref>(<ref refid="debug_8h_14279d7ff9f986b2ff3eb068bb012b697" kindref="member">API_MSG_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"api_msg:<sp/>accept<sp/>UDP:<sp/>cannot<sp/>accept<sp/>for<sp/>UDP.\n"</highlight><highlight class="normal">));</highlight></codeline> <codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="412"><highlight class="normal"><sp/><sp/><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="413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="415"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="416"><highlight class="normal">}</highlight></codeline> <codeline lineno="417"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="418"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="419" refid="api__msg_8c_1c47e25770a5c135b4ef043b8f9608d95" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1c47e25770a5c135b4ef043b8f9608d95" kindref="member">do_send</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="420"><highlight class="normal">{</highlight></codeline> <codeline lineno="421"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="423"><highlight class="normal"><sp/><sp/><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="424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="425"><highlight class="normal"><sp/><sp/><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="426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="427"><highlight class="normal"><sp/><sp/><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="428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="udp_8h_1a4546c43981f043c0ae4514d625cc3fc" kindref="member">udp_send</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1ffb33f27be14689a2fc9aa04a9dfa016" kindref="member">udp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_14fc5229c85bb1b1928871733dfdf0f3d" kindref="member">p</ref>);</highlight></codeline> <codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="430"><highlight class="normal"><sp/><sp/><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="431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="433"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="434"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="435"><highlight class="normal">}</highlight></codeline> <codeline lineno="436"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="437"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="438" refid="api__msg_8c_1e2a8fddd0b0f2a2b50c6e52281d37a67" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1e2a8fddd0b0f2a2b50c6e52281d37a67" kindref="member">do_recv</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="439"><highlight class="normal">{</highlight></codeline> <codeline lineno="440"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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="442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_16b6b2d7993a2b4e1ef7e0f9425a2870d" kindref="member">tcp_recved</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_1430df6234ff9e241deaa7a951cbf9e81" kindref="member">len</ref>);</highlight></codeline> <codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="444"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="445"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="446"><highlight class="normal">}</highlight></codeline> <codeline lineno="447"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="448"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="449" refid="api__msg_8c_1ad9b6e185b705c42c144f849b54fbf0e" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_1ad9b6e185b705c42c144f849b54fbf0e" kindref="member">do_write</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="450"><highlight class="normal">{</highlight></codeline> <codeline lineno="451"><highlight class="normal"><sp/><sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref><sp/><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline> <codeline lineno="452"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="454"><highlight class="normal"><sp/><sp/><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="455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="456"><highlight class="normal"><sp/><sp/><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="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="458"><highlight class="normal"><sp/><sp/><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="459"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/><ref refid="err_8h_1a803bb0b2c462e8b1f60459dd1f54bc9" kindref="member">ERR_VAL</ref>;</highlight></codeline> <codeline lineno="460"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="461"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="api_8h_1aba260d28d105fb4bce9185fd0300d9175d14318b91af7a452230189f47e5e1a" kindref="member">NETCONN_TCP</ref>:<sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> <codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>err<sp/>=<sp/><ref refid="tcp_8h_1212607f48aaac1e91a2f09b7880b7c3f" kindref="member">tcp_write</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_14f071675ee5451c073396ee03a5bb78f" kindref="member">w</ref>.dataptr,</highlight></codeline> <codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_14f071675ee5451c073396ee03a5bb78f" kindref="member">w</ref>.len,<sp/>msg-><ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>.<ref refid="structapi__msg__msg_14f071675ee5451c073396ee03a5bb78f" kindref="member">w</ref>.copy);</highlight></codeline> <codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>This<sp/>is<sp/>the<sp/>Nagle<sp/>algorithm:<sp/>inhibit<sp/>the<sp/>sending<sp/>of<sp/>new<sp/>TCP</highlight></codeline> <codeline lineno="465"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>segments<sp/>when<sp/>new<sp/>outgoing<sp/>data<sp/>arrives<sp/>from<sp/>the<sp/>user<sp/>if<sp/>any</highlight></codeline> <codeline lineno="466"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>previously<sp/>transmitted<sp/>data<sp/>on<sp/>the<sp/>connection<sp/>remains</highlight></codeline> <codeline lineno="467"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>unacknowledged.<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(err<sp/>==<sp/><ref refid="err_8h_198c763adfeea8e9831c46ec269e47ae9" kindref="member">ERR_OK</ref><sp/>&&<sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>-><ref refid="structtcp__pcb_19e6ed24ec0f8e5855c3b34fa361bfd5a" kindref="member">unacked</ref><sp/>==<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcp_8h_10cbcc6d628f644a530daf629fa3e5f7f" kindref="member">tcp_output</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>);</highlight></codeline> <codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/>err;</highlight></codeline> <codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="473"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="474"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="475"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="476"><highlight class="normal">}</highlight></codeline> <codeline lineno="477"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="478"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="479" refid="api__msg_8c_19b56a6c9fb571348291027f09471890a" refkind="member"><highlight class="normal"><ref refid="api__msg_8c_19b56a6c9fb571348291027f09471890a" kindref="member">do_close</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*msg)</highlight></codeline> <codeline lineno="480"><highlight class="normal">{</highlight></codeline> <codeline lineno="481"><highlight class="normal"><sp/><sp/><ref refid="err_8h_1b7190f3da5c85931fc059e0312bc1407" kindref="member">err_t</ref><sp/><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref>;</highlight></codeline> <codeline lineno="482"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><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>)<sp/>{</highlight></codeline> <codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_161af908d1d2e4e7345ac65d3b390d7b6" kindref="member">type</ref>)<sp/>{</highlight></codeline> <codeline lineno="484"><highlight class="normal"><sp/><sp/><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="485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="486"><highlight class="normal"><sp/><sp/><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="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>FALLTHROUGH<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="488"><highlight class="normal"><sp/><sp/><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="489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="490"><highlight class="normal"><sp/><sp/><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="491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>-><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="492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>err<sp/>=<sp/><ref refid="tcp_8h_187093e137fcc53ea82a134a3f5b33623" kindref="member">tcp_close</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>);</highlight></codeline> <codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>err<sp/>=<sp/><ref refid="tcp_8h_187093e137fcc53ea82a134a3f5b33623" kindref="member">tcp_close</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1182f4ff8950c8818ef67db1ff64e9c23" kindref="member">pcb</ref>.<ref refid="structnetconn_1d0c827630fdb7e427170600b5f177c95" kindref="member">tcp</ref>);</highlight></codeline> <codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="496"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_15da7386a373d51b886f0f6e5bbe50adb" kindref="member">err</ref><sp/>=<sp/>err;<sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> <codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="499"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="500"><highlight class="normal"><sp/><sp/><ref refid="sys_8h_1217a9af37c5dd7c3fc16daddaacb976f" kindref="member">sys_mbox_post</ref>(msg-><ref refid="structapi__msg__msg_1c023c82b96e9db5e8ff36f25049618b7" kindref="member">conn</ref>-><ref refid="structnetconn_1d54529e379763409dae48a191c401def" kindref="member">mbox</ref>,<sp/><ref refid="def_8h_1070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline> <codeline lineno="501"><highlight class="normal">}</highlight></codeline> <codeline lineno="502"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="503" refid="api__msg_8c_1c0ed3339275e6c978ce477841f55124f" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>void<sp/>(*<sp/><ref refid="api__msg_8c_1c0ed3339275e6c978ce477841f55124f" kindref="member">api_msg_decode</ref>)(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structapi__msg__msg" kindref="compound">api_msg_msg</ref><sp/>*<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="504" refid="api__msg_8c_18db33774784c3abb518e237539b106e4" refkind="member"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="api__msg_8c_1c0ed3339275e6c978ce477841f55124f" kindref="member">api_msg_decode</ref><sp/><ref refid="api__msg_8c_18db33774784c3abb518e237539b106e4" kindref="member">decode</ref>[<ref refid="api__msg_8h_1f578a5487f9a3b529ed4617e52cad76dda4368b873d948c0965e76c5450c6843" kindref="member">API_MSG_MAX</ref>]<sp/>=<sp/>{</highlight></codeline> <codeline lineno="505"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_16130d87d8aeed24a9ef702cdc8bae188" kindref="member">do_newconn</ref>,</highlight></codeline> <codeline lineno="506"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_1351ca82b3580d84ee0d70f7ab033a236" kindref="member">do_delconn</ref>,</highlight></codeline> <codeline lineno="507"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_1cab3f82cc16d96db0db1f17b872613a4" kindref="member">do_bind</ref>,</highlight></codeline> <codeline lineno="508"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_18ad3068b45627dbe48440d4d6e1607d1" kindref="member">do_connect</ref>,</highlight></codeline> <codeline lineno="509"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_1c5f93428ba9863cd9b438edfd8715626" kindref="member">do_listen</ref>,</highlight></codeline> <codeline lineno="510"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_119262c4096bf0c095d44e08596d59fbf" kindref="member">do_accept</ref>,</highlight></codeline> <codeline lineno="511"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_1c47e25770a5c135b4ef043b8f9608d95" kindref="member">do_send</ref>,</highlight></codeline> <codeline lineno="512"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_1e2a8fddd0b0f2a2b50c6e52281d37a67" kindref="member">do_recv</ref>,</highlight></codeline> <codeline lineno="513"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_1ad9b6e185b705c42c144f849b54fbf0e" kindref="member">do_write</ref>,</highlight></codeline> <codeline lineno="514"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_19b56a6c9fb571348291027f09471890a" kindref="member">do_close</ref></highlight></codeline> <codeline lineno="515"><highlight class="normal"><sp/><sp/>};</highlight></codeline> <codeline lineno="516"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="517" refid="api__msg_8c_1b15a981fb41b53567d7a4e9412c6f4c1" refkind="member"><highlight class="normal"><ref refid="api__msg_8h_1b15a981fb41b53567d7a4e9412c6f4c1" kindref="member">api_msg_input</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>)</highlight></codeline> <codeline lineno="518"><highlight class="normal">{<sp/><sp/></highlight></codeline> <codeline lineno="519"><highlight class="normal"><sp/><sp/><ref refid="api__msg_8c_18db33774784c3abb518e237539b106e4" kindref="member">decode</ref>[<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>->type](&(<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>->msg));</highlight></codeline> <codeline lineno="520"><highlight class="normal">}</highlight></codeline> <codeline lineno="521"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="522"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="523" refid="api__msg_8c_1ee039fae0c665f1372f4a3ff8395ffeb" refkind="member"><highlight class="normal"><ref refid="api__msg_8h_1ee039fae0c665f1372f4a3ff8395ffeb" kindref="member">api_msg_post</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structapi__msg" kindref="compound">api_msg</ref><sp/>*<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>)</highlight></codeline> <codeline lineno="524"><highlight class="normal">{</highlight></codeline> <codeline lineno="525"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8h_1d72ca05f74e20244cd26a8828711e9f2" kindref="member">tcpip_apimsg</ref>(<ref refid="structapi__msg__msg_1005b17bdb25aec7db177517b29a4bf70" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="526"><highlight class="normal">}</highlight></codeline> <codeline lineno="527"><highlight class="normal"></highlight><highlight class="comment">/*-----------------------------------------------------------------------------------*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="528"><highlight class="normal"></highlight></codeline> <codeline lineno="529"><highlight class="normal"></highlight></codeline> </programlisting> <location file="/usr/home/reddawg/source/ubix2/src/sys/net/api/api_msg.c"/> </compounddef> </doxygen>