<?xml version='1.0' encoding='UTF-8' standalone='no'?> <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16"> <compounddef id="tcpip_8c" kind="file" language="C++"> <compoundname>tcpip.c</compoundname> <includes refid="opt_8h" local="no">net/opt.h</includes> <includes refid="tcpip__priv_8h" local="no">net/priv/tcpip_priv.h</includes> <includes refid="sys_8h" local="no">net/sys.h</includes> <includes refid="memp_8h" local="no">net/memp.h</includes> <includes refid="mem_8h" local="no">net/mem.h</includes> <includes refid="net_2init_8h" local="no">net/init.h</includes> <includes refid="ip_8h" local="no">net/ip.h</includes> <includes refid="pbuf_8h" local="no">net/pbuf.h</includes> <includes refid="etharp_8h" local="no">net/etharp.h</includes> <includes refid="f_2ethernet_8h" local="no">netif/ethernet.h</includes> <incdepgraph> <node id="38"> <label>ufs/ufs.h</label> <link refid="ufs_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="39" relation="include"> </childnode> </node> <node id="17"> <label>stdarg.h</label> <link refid="stdarg_8h"/> </node> <node id="18"> <label>ubixos/kpanic.h</label> <link refid="kpanic_8h"/> </node> <node id="43"> <label>ubixos/sem.h</label> <link refid="sem_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="44" relation="include"> </childnode> <childnode refid="25" relation="include"> </childnode> </node> <node id="42"> <label>sys/tss.h</label> <link refid="tss_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="15"> <label>sys/io.h</label> <link refid="io_8h"/> </node> <node id="50"> <label>net/pbuf.h</label> <link refid="pbuf_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> </node> <node id="44"> <label>ubixos/errno.h</label> <link refid="ubixos_2errno_8h"/> </node> <node id="41"> <label>ubixos/tty.h</label> <link refid="tty_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="1"> <label>C:/Dev/git/UbixOS/sys/net/api/tcpip.c</label> <link refid="tcpip_8c"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="19" relation="include"> </childnode> <childnode refid="23" relation="include"> </childnode> <childnode refid="53" relation="include"> </childnode> <childnode refid="52" relation="include"> </childnode> <childnode refid="56" relation="include"> </childnode> <childnode refid="57" relation="include"> </childnode> <childnode refid="50" relation="include"> </childnode> <childnode refid="61" relation="include"> </childnode> <childnode refid="62" relation="include"> </childnode> </node> <node id="58"> <label>net/ip4.h</label> <link refid="ip4_8h"/> <childnode refid="2" relation="include"> </childnode> </node> <node id="55"> <label>net/priv/memp_priv.h</label> <link refid="memp__priv_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="52" relation="include"> </childnode> </node> <node id="31"> <label>i386/cpu.h</label> <link refid="i386_2cpu_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="8"> <label>sys/select.h</label> <link refid="select_8h"/> <childnode refid="9" relation="include"> </childnode> <childnode refid="7" relation="include"> </childnode> <childnode refid="10" relation="include"> </childnode> <childnode refid="11" relation="include"> </childnode> <childnode refid="12" relation="include"> </childnode> </node> <node id="34"> <label>vfs/inode.h</label> <link refid="inode_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="35" relation="include"> </childnode> <childnode refid="36" relation="include"> </childnode> <childnode refid="37" relation="include"> </childnode> <childnode refid="38" relation="include"> </childnode> </node> <node id="23"> <label>net/sys.h</label> <link refid="sys_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="24" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> </node> <node id="22"> <label>net/timeouts.h</label> <link refid="timeouts_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> <childnode refid="23" relation="include"> </childnode> </node> <node id="25"> <label>ubixos/ubthread.h</label> <link refid="ubthread_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="26" relation="include"> </childnode> <childnode refid="14" relation="include"> </childnode> </node> <node id="13"> <label>net/arch/cc.h</label> <link refid="cc_8h"/> <childnode refid="14" relation="include"> </childnode> </node> <node id="12"> <label>sys/_sigset.h</label> <link refid="__sigset_8h"/> <childnode refid="7" relation="include"> </childnode> </node> <node id="19"> <label>net/priv/tcpip_priv.h</label> <link refid="tcpip__priv_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="20" relation="include"> </childnode> <childnode refid="23" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> </node> <node id="52"> <label>net/mem.h</label> <link refid="mem_8h"/> <childnode refid="2" relation="include"> </childnode> </node> <node id="51"> <label>net/stats.h</label> <link refid="stats_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="52" relation="include"> </childnode> <childnode refid="53" relation="include"> </childnode> </node> <node id="56"> <label>net/init.h</label> <link refid="net_2init_8h"/> <childnode refid="2" relation="include"> </childnode> </node> <node id="3"> <label>net/lwipopts.h</label> <link refid="lwipopts_8h"/> </node> <node id="24"> <label>net/arch/sys_arch.h</label> <link refid="sys__arch_8h"/> <childnode refid="25" relation="include"> </childnode> <childnode refid="43" relation="include"> </childnode> </node> <node id="61"> <label>net/etharp.h</label> <link refid="etharp_8h"/> <childnode refid="2" relation="include"> </childnode> </node> <node id="40"> <label>vfs/mount.h</label> <link refid="mount_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="33"> <label>sys/resource.h</label> <link refid="resource_8h"/> <childnode refid="7" relation="include"> </childnode> </node> <node id="30"> <label>sys/trap.h</label> <link refid="trap_8h"/> <childnode refid="31" relation="include"> </childnode> </node> <node id="6"> <label>sys/types.h</label> <link refid="include_2sys_2types_8h"/> <childnode refid="7" relation="include"> </childnode> <childnode refid="8" relation="include"> </childnode> </node> <node id="20"> <label>net/tcpip.h</label> <link refid="tcpip_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> <childnode refid="45" relation="include"> </childnode> </node> <node id="27"> <label>vfs/file.h</label> <link refid="include_2vfs_2file_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="28" relation="include"> </childnode> <childnode refid="29" relation="include"> </childnode> <childnode refid="34" relation="include"> </childnode> <childnode refid="40" relation="include"> </childnode> <childnode refid="38" relation="include"> </childnode> </node> <node id="47"> <label>net/def.h</label> <link refid="def_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="2" relation="include"> </childnode> </node> <node id="45"> <label>net/netif.h</label> <link refid="netif_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> <childnode refid="46" relation="include"> </childnode> <childnode refid="47" relation="include"> </childnode> <childnode refid="50" relation="include"> </childnode> <childnode refid="51" relation="include"> </childnode> </node> <node id="5"> <label>net/arch.h</label> <link refid="arch_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="13" relation="include"> </childnode> <childnode refid="16" relation="include"> </childnode> <childnode refid="18" relation="include"> </childnode> </node> <node id="63"> <label>net/prot/ethernet.h</label> <link refid="prot_2ethernet_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="37"> <label>fs/msdos_fs.h</label> <link refid="msdos__fs_8h"/> </node> <node id="32"> <label>sys/signal.h</label> <link refid="sys_2signal_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="59"> <label>net/ip6.h</label> <link refid="ip6_8h"/> <childnode refid="2" relation="include"> </childnode> </node> <node id="36"> <label>fs/pipe_fs.h</label> <link refid="pipe__fs_8h"/> </node> <node id="35"> <label>ubixos/wait.h</label> <link refid="wait_8h"/> </node> <node id="49"> <label>net/ip6_addr.h</label> <link refid="ip6__addr_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="47" relation="include"> </childnode> </node> <node id="2"> <label>net/opt.h</label> <link refid="opt_8h"/> <childnode refid="3" relation="include"> </childnode> <childnode refid="4" relation="include"> </childnode> </node> <node id="16"> <label>lib/kprintf.h</label> <link refid="kprintf_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="17" relation="include"> </childnode> </node> <node id="57"> <label>net/ip.h</label> <link refid="ip_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="47" relation="include"> </childnode> <childnode refid="50" relation="include"> </childnode> <childnode refid="46" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> <childnode refid="45" relation="include"> </childnode> <childnode refid="58" relation="include"> </childnode> <childnode refid="59" relation="include"> </childnode> <childnode refid="60" relation="include"> </childnode> </node> <node id="4"> <label>net/debug.h</label> <link refid="debug_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="2" relation="include"> </childnode> </node> <node id="48"> <label>net/ip4_addr.h</label> <link refid="ip4__addr_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="47" relation="include"> </childnode> </node> <node id="46"> <label>net/ip_addr.h</label> <link refid="ip__addr_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="47" relation="include"> </childnode> <childnode refid="48" relation="include"> </childnode> <childnode refid="49" relation="include"> </childnode> </node> <node id="29"> <label>sys/thread.h</label> <link refid="thread_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="30" relation="include"> </childnode> <childnode refid="32" relation="include"> </childnode> <childnode refid="33" relation="include"> </childnode> </node> <node id="54"> <label>net/priv/memp_std.h</label> <link refid="memp__std_8h"/> </node> <node id="9"> <label>sys/cdefs.h</label> <link refid="cdefs_8h"/> </node> <node id="14"> <label>ubixos/time.h</label> <link refid="time_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="10" relation="include"> </childnode> <childnode refid="15" relation="include"> </childnode> </node> <node id="26"> <label>ubixos/sched.h</label> <link refid="sched_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="27" relation="include"> </childnode> <childnode refid="41" relation="include"> </childnode> <childnode refid="42" relation="include"> </childnode> <childnode refid="29" relation="include"> </childnode> </node> <node id="7"> <label>sys/_types.h</label> <link refid="__types_8h"/> </node> <node id="60"> <label>net/prot/ip.h</label> <link refid="prot_2ip_8h"/> <childnode refid="5" relation="include"> </childnode> </node> <node id="62"> <label>netif/ethernet.h</label> <link refid="f_2ethernet_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="50" relation="include"> </childnode> <childnode refid="45" relation="include"> </childnode> <childnode refid="63" relation="include"> </childnode> </node> <node id="21"> <label>net/err.h</label> <link refid="err_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="5" relation="include"> </childnode> </node> <node id="10"> <label>sys/_timespec.h</label> <link refid="__timespec_8h"/> <childnode refid="7" relation="include"> </childnode> </node> <node id="39"> <label>sys/device.h</label> <link refid="include_2sys_2device_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="28"> <label>ubixfs/dirCache.h</label> <link refid="dirCache_8h"/> <childnode refid="6" relation="include"> </childnode> </node> <node id="11"> <label>sys/_timeval.h</label> <link refid="__timeval_8h"/> <childnode refid="7" relation="include"> </childnode> </node> <node id="53"> <label>net/memp.h</label> <link refid="memp_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="54" relation="include"> </childnode> <childnode refid="55" relation="include"> </childnode> <childnode refid="51" relation="include"> </childnode> </node> </incdepgraph> <sectiondef kind="define"> <memberdef kind="define" id="tcpip_8c_1a509daeff3c37e5659d0decb841b4e262" prot="public" static="no"> <name>TCPIP_MBOX_FETCH</name> <param><defname>mbox</defname></param> <param><defname>msg</defname></param> <initializer><ref refid="sys_8h_1a5bae9efa9c945dc810665dc4a7e60117" kindref="member">sys_mbox_fetch</ref>(mbox, msg)</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="67" column="9" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="67" bodyend="-1"/> </memberdef> <memberdef kind="define" id="tcpip_8c_1a2485bb329e586fe0b440cff72bf364e4" prot="public" static="no"> <name>TCPIP_MSG_VAR_ALLOC</name> <param><defname>name</defname></param> <initializer><ref refid="tcpip__priv_8h_1a8ff9b936b16d91844c0e32424e97f493" kindref="member">API_VAR_ALLOC</ref>(struct <ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref>, MEMP_TCPIP_MSG_API, <ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>, <ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05" kindref="member">ERR_MEM</ref>)</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="49" column="9" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="49" bodyend="-1"/> </memberdef> <memberdef kind="define" id="tcpip_8c_1aecf85047afc1ea35a976f7e279fb0f7b" prot="public" static="no"> <name>TCPIP_MSG_VAR_DECLARE</name> <param><defname>name</defname></param> <initializer><ref refid="tcpip__priv_8h_1ab5d4a4fa91c4c144bedabf593a68b4dd" kindref="member">API_VAR_DECLARE</ref>(struct <ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref>, <ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>)</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="48" column="9" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="48" bodyend="-1"/> </memberdef> <memberdef kind="define" id="tcpip_8c_1acf5d75be78b6af27ca5ed13da28681d4" prot="public" static="no"> <name>TCPIP_MSG_VAR_FREE</name> <param><defname>name</defname></param> <initializer><ref refid="tcpip__priv_8h_1a30caebb5334f52d49ac938a507094094" kindref="member">API_VAR_FREE</ref>(MEMP_TCPIP_MSG_API, <ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>)</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="50" column="9" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="50" bodyend="-1"/> </memberdef> <memberdef kind="define" id="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" prot="public" static="no"> <name>TCPIP_MSG_VAR_REF</name> <param><defname>name</defname></param> <initializer><ref refid="tcpip__priv_8h_1a3518256af0d1a422755a899b13c2b563" kindref="member">API_VAR_REF</ref>(<ref refid="pci_8c_1a8f8f80d37794cde9472343e4487ba3eb" kindref="member">name</ref>)</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="47" column="9" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="47" bodyend="-1"/> </memberdef> </sectiondef> <sectiondef kind="var"> <memberdef kind="variable" id="tcpip_8c_1a189da3fa172ad9c1b0491dcb4857fee6" prot="public" static="yes" mutable="no"> <type><ref refid="sys__arch_8h_1afa991a884603f30bcba80b9fc49cd1e2" kindref="member">sys_mbox_t</ref></type> <definition>sys_mbox_t mbox</definition> <argsstring></argsstring> <name>mbox</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="55" column="19" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="55" bodyend="-1"/> </memberdef> <memberdef kind="variable" id="tcpip_8c_1ab883556563e5d2fcbf9b73a09f0c3583" prot="public" static="yes" mutable="no"> <type><ref refid="tcpip_8h_1a5fe07216c441e27c3028bcac60fa0992" kindref="member">tcpip_init_done_fn</ref></type> <definition>tcpip_init_done_fn tcpip_init_done</definition> <argsstring></argsstring> <name>tcpip_init_done</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="53" column="27" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="53" bodyend="-1"/> </memberdef> <memberdef kind="variable" id="tcpip_8c_1af3f9b0102b8b4f5a674034f5421ef918" prot="public" static="yes" mutable="no"> <type>void *</type> <definition>void* tcpip_init_done_arg</definition> <argsstring></argsstring> <name>tcpip_init_done_arg</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="54" column="13" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="54" bodyend="-1"/> </memberdef> </sectiondef> <sectiondef kind="func"> <memberdef kind="function" id="tcpip_8c_1a55b4de3765c6a37b3f2b26a11603771c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t mem_free_callback</definition> <argsstring>(void *m)</argsstring> <name>mem_free_callback</name> <param> <type>void *</type> <declname>m</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>A simple wrapper function that allows you to free heap memory from interrupt context.</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>m</parametername> </parameternamelist> <parameterdescription> <para>the heap memory to free </para> </parameterdescription> </parameteritem> </parameterlist> <simplesect kind="return"><para>ERR_OK if callback could be enqueued, an err_t if not </para> </simplesect> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="491" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="491" bodyend="493"/> <references refid="mem_8h_1a2fd7aa1adf6e394d3be7c7734e7df41a" compoundref="mem_8c" startline="419" endline="465">mem_free</references> <references refid="tcpip_8c_1ab1d3ef23817d7703fa75ed67bd45ea1d" compoundref="tcpip_8c" startline="229" endline="252">tcpip_callback_with_block</references> </memberdef> <memberdef kind="function" id="tcpip_8c_1a5cdcb6b784fe0e8736a5b31a5cfbed6c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t pbuf_free_callback</definition> <argsstring>(struct pbuf *p)</argsstring> <name>pbuf_free_callback</name> <param> <type>struct <ref refid="structpbuf" kindref="compound">pbuf</ref> *</type> <declname>p</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>A simple wrapper function that allows you to free a pbuf from interrupt context.</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>p</parametername> </parameternamelist> <parameterdescription> <para>The pbuf (chain) to be dereferenced. </para> </parameterdescription> </parameteritem> </parameterlist> <simplesect kind="return"><para>ERR_OK if callback could be enqueued, an err_t if not </para> </simplesect> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="480" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="480" bodyend="482"/> <references refid="tcpip_8c_1ab1d3ef23817d7703fa75ed67bd45ea1d" compoundref="tcpip_8c" startline="229" endline="252">tcpip_callback_with_block</references> </memberdef> <memberdef kind="function" id="tcpip_8c_1ad03556932c6347e620ceb49f39b4e33b" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void pbuf_free_int</definition> <argsstring>(void *p)</argsstring> <name>pbuf_free_int</name> <param> <type>void *</type> <declname>p</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Simple callback function used with tcpip_callback to free a pbuf (pbuf_free has a wrong signature for tcpip_callback)</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>p</parametername> </parameternamelist> <parameterdescription> <para>The pbuf (chain) to be dereferenced. </para> </parameterdescription> </parameteritem> </parameterlist> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="469" column="13" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="469" bodyend="472"/> </memberdef> <memberdef kind="function" id="tcpip_8c_1a3d42b0c46607f91aedcc7745ed466b08" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t tcpip_api_call</definition> <argsstring>(tcpip_api_call_fn fn, struct tcpip_api_call_data *call)</argsstring> <name>tcpip_api_call</name> <param> <type><ref refid="tcpip__priv_8h_1aa7ecde8c8d8012fe5c498f7ee58f9458" kindref="member">tcpip_api_call_fn</ref></type> <declname>fn</declname> </param> <param> <type>struct <ref refid="structtcpip__api__call__data" kindref="compound">tcpip_api_call_data</ref> *</type> <declname>call</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Synchronously calls function in TCPIP thread and waits for its completion. It is recommended to use LWIP_TCPIP_CORE_LOCKING (preferred) or LWIP_NETCONN_SEM_PER_THREAD. If not, a semaphore is created and destroyed on every call which is usually an expensive/slow operation. <parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>fn</parametername> </parameternamelist> <parameterdescription> <para>Function to call </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>call</parametername> </parameternamelist> <parameterdescription> <para>Call parameters </para> </parameterdescription> </parameteritem> </parameterlist> <simplesect kind="return"><para>Return value from tcpip_api_call_fn </para> </simplesect> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="356" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="356" bodyend="394"/> <references refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" compoundref="err_8h" startline="63">ERR_OK</references> <references refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" compoundref="tcpip_8h" startline="60">LOCK_TCPIP_CORE</references> <references refid="debug_8h_1a94ad086267808462beae2b38f91996ed" compoundref="debug_8h" startline="116">LWIP_ASSERT</references> <references refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" compoundref="tcpip__priv_8h" startline="128">tcpip_msg::msg</references> <references refid="structtcpip__api__call__data_1a430b64d7617893939ed12cc957765431" compoundref="tcpip__priv_8h" startline="102">tcpip_api_call_data::sem</references> <references refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" compoundref="sys_8h" startline="271">sys_mbox_valid_val</references> <references refid="group__sys__sem_1gadb68acad14b34550b9891bc11bbf4e63" compoundref="sys__arch_8c" startline="52" endline="72">sys_sem_new</references> <references refid="tcpip_8c_1aecf85047afc1ea35a976f7e279fb0f7b" compoundref="tcpip_8c" startline="48">TCPIP_MSG_VAR_DECLARE</references> <references refid="tcpip_8h_1a915effea029b9c4891e1ec635eb1826d" compoundref="tcpip_8h" startline="61">UNLOCK_TCPIP_CORE</references> </memberdef> <memberdef kind="function" id="tcpip_8c_1ab1d3ef23817d7703fa75ed67bd45ea1d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t tcpip_callback_with_block</definition> <argsstring>(tcpip_callback_fn function, void *ctx, u8_t block)</argsstring> <name>tcpip_callback_with_block</name> <param> <type><ref refid="tcpip_8h_1a35203296bb838f3b493839ffc6e7285d" kindref="member">tcpip_callback_fn</ref></type> <declname>function</declname> </param> <param> <type>void *</type> <declname>ctx</declname> </param> <param> <type><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref></type> <declname>block</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Call a specific function in the thread context of tcpip_thread for easy access synchronization. A function called in that way may access lwIP core code without fearing concurrent access.</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>function</parametername> </parameternamelist> <parameterdescription> <para>the function to call </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>ctx</parametername> </parameternamelist> <parameterdescription> <para>parameter passed to f </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>block</parametername> </parameternamelist> <parameterdescription> <para>1 to block until the request is posted, 0 to non-blocking mode </para> </parameterdescription> </parameteritem> </parameterlist> <simplesect kind="return"><para>ERR_OK if the function was called, another err_t if not </para> </simplesect> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="229" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="229" bodyend="252"/> <references refid="debug_8h_1a94ad086267808462beae2b38f91996ed" compoundref="debug_8h" startline="116">LWIP_ASSERT</references> <references refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" compoundref="tcpip__priv_8h" startline="128">tcpip_msg::msg</references> <references refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" compoundref="sys_8h" startline="271">sys_mbox_valid_val</references> <referencedby refid="tcpip_8c_1a55b4de3765c6a37b3f2b26a11603771c" compoundref="tcpip_8c" startline="491" endline="493">mem_free_callback</referencedby> <referencedby refid="tcpip_8c_1a5cdcb6b784fe0e8736a5b31a5cfbed6c" compoundref="tcpip_8c" startline="480" endline="482">pbuf_free_callback</referencedby> </memberdef> <memberdef kind="function" id="tcpip_8c_1ac5b7a59f4c3f5f721ab9ee81f231c9fd" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>void tcpip_callbackmsg_delete</definition> <argsstring>(struct tcpip_callback_msg *msg)</argsstring> <name>tcpip_callbackmsg_delete</name> <param> <type>struct tcpip_callback_msg *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Free a callback message allocated by <ref refid="tcpip_8c_1aee14fa2587a9ba9d23e4c7e16c4526ac" kindref="member">tcpip_callbackmsg_new()</ref>.</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>msg</parametername> </parameternamelist> <parameterdescription> <para>the message to free </para> </parameterdescription> </parameteritem> </parameterlist> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="421" column="6" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="421" bodyend="423"/> <references refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" compoundref="memp_8c" startline="469" endline="496">memp_free</references> <references refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" compoundref="tcpip__priv_8h" startline="128">tcpip_msg::msg</references> </memberdef> <memberdef kind="function" id="tcpip_8c_1aee14fa2587a9ba9d23e4c7e16c4526ac" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>struct tcpip_callback_msg *</type> <definition>struct tcpip_callback_msg* tcpip_callbackmsg_new</definition> <argsstring>(tcpip_callback_fn function, void *ctx)</argsstring> <name>tcpip_callbackmsg_new</name> <param> <type><ref refid="tcpip_8h_1a35203296bb838f3b493839ffc6e7285d" kindref="member">tcpip_callback_fn</ref></type> <declname>function</declname> </param> <param> <type>void *</type> <declname>ctx</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Allocate a structure for a static callback message and initialize it. This is intended to be used to send "static" messages from interrupt context.</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>function</parametername> </parameternamelist> <parameterdescription> <para>the function to call </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>ctx</parametername> </parameternamelist> <parameterdescription> <para>parameter passed to function </para> </parameterdescription> </parameteritem> </parameterlist> <simplesect kind="return"><para>a struct pointer to pass to <ref refid="tcpip_8c_1acfc81ad493f68714a22b3b8ea7d04378" kindref="member">tcpip_trycallback()</ref>. </para> </simplesect> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="405" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="405" bodyend="414"/> <references refid="structtcpip__msg_1a7edb4f4e181f9cffbef13dc7a7d41d8b" compoundref="tcpip__priv_8h" startline="142">tcpip_msg::ctx</references> <references refid="memp_8h_1a2b00593d086313c267b54a976bf67aa5" compoundref="memp_8c" startline="385" endline="404">memp_malloc</references> <references refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" compoundref="tcpip__priv_8h" startline="128">tcpip_msg::msg</references> <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references> <references refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a17160cdc581db556a47a57cd4efb3b78" compoundref="tcpip__priv_8h" startline="120">TCPIP_MSG_CALLBACK_STATIC</references> </memberdef> <memberdef kind="function" id="tcpip_8c_1a1f3a88b8df6ba3b9ed1c00e0a305e3db" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>void tcpip_init</definition> <argsstring>(tcpip_init_done_fn initfunc, void *arg)</argsstring> <name>tcpip_init</name> <param> <type><ref refid="tcpip_8h_1a5fe07216c441e27c3028bcac60fa0992" kindref="member">tcpip_init_done_fn</ref></type> <declname>initfunc</declname> </param> <param> <type>void *</type> <declname>arg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Initialize this module:<itemizedlist> <listitem><para>initialize all sub modules</para> </listitem><listitem><para>start the tcpip_thread</para> </listitem></itemizedlist> </para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>initfunc</parametername> </parameternamelist> <parameterdescription> <para>a function to call when tcpip_thread is running and finished initializing </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>arg</parametername> </parameternamelist> <parameterdescription> <para>argument to pass to initfunc </para> </parameterdescription> </parameteritem> </parameterlist> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="446" column="6" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="446" bodyend="461"/> <references refid="net_2init_8h_1a0c1a18439524d2f4a5e51d25c0ca2ce9" compoundref="core_2init_8c" startline="333" endline="381">lwip_init</references> <referencedby refid="net_2init_8c_1a22b2914249628f6cba7d4e1f138c969f" compoundref="net_2init_8c" startline="52" endline="70">net_init</referencedby> </memberdef> <memberdef kind="function" id="tcpip_8c_1a93043b3c66dbe4a15a60299c6199d102" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t tcpip_inpkt</definition> <argsstring>(struct pbuf *p, struct netif *inp, netif_input_fn input_fn)</argsstring> <name>tcpip_inpkt</name> <param> <type>struct <ref refid="structpbuf" kindref="compound">pbuf</ref> *</type> <declname>p</declname> </param> <param> <type>struct <ref refid="structnetif" kindref="compound">netif</ref> *</type> <declname>inp</declname> </param> <param> <type><ref refid="netif_8h_1ab2302b1b64ac7b95f24c6bab754a575e" kindref="member">netif_input_fn</ref></type> <declname>input_fn</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Pass a received packet to tcpip_thread for input processing</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>p</parametername> </parameternamelist> <parameterdescription> <para>the received packet </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>inp</parametername> </parameternamelist> <parameterdescription> <para>the network interface on which the packet was received </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>input_fn</parametername> </parameternamelist> <parameterdescription> <para>input function to call </para> </parameterdescription> </parameteritem> </parameterlist> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="161" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="161" bodyend="191"/> <references refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71">tcpip_msg::inp</references> <references refid="structtcpip__msg_1a44fe1469e2472890fe71ebbc1427a19b" compoundref="tcpip__priv_8h" startline="138">tcpip_msg::input_fn</references> <references refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" compoundref="tcpip_8h" startline="60">LOCK_TCPIP_CORE</references> <references refid="debug_8h_1a94ad086267808462beae2b38f91996ed" compoundref="debug_8h" startline="116">LWIP_ASSERT</references> <references refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" compoundref="debug_8h" startline="164">LWIP_DEBUGF</references> <references refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" compoundref="tcpip__priv_8h" startline="128">tcpip_msg::msg</references> <references refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" compoundref="tcpip__priv_8h" startline="136">tcpip_msg::p</references> <references refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" compoundref="sys_8h" startline="271">sys_mbox_valid_val</references> <references refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" compoundref="lwipopts_8h" startline="482">TCPIP_DEBUG</references> <references refid="tcpip_8h_1a915effea029b9c4891e1ec635eb1826d" compoundref="tcpip_8h" startline="61">UNLOCK_TCPIP_CORE</references> <referencedby refid="tcpip_8c_1ae510f195171bed8499ae94e264a92717" compoundref="tcpip_8c" startline="204" endline="216">tcpip_input</referencedby> </memberdef> <memberdef kind="function" id="tcpip_8c_1ae510f195171bed8499ae94e264a92717" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t tcpip_input</definition> <argsstring>(struct pbuf *p, struct netif *inp)</argsstring> <name>tcpip_input</name> <param> <type>struct <ref refid="structpbuf" kindref="compound">pbuf</ref> *</type> <declname>p</declname> </param> <param> <type>struct <ref refid="structnetif" kindref="compound">netif</ref> *</type> <declname>inp</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Pass a received packet to tcpip_thread for input processing with ethernet_input or ip_input. Don't call directly, pass to <ref refid="group__netif_1ga66970b5877dd6b0cae906bfa78d0cb4c" kindref="member">netif_add()</ref> and call netif->input().</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>p</parametername> </parameternamelist> <parameterdescription> <para>the received packet, p->payload pointing to the Ethernet header or to an IP header (if inp doesn't have NETIF_FLAG_ETHARP or NETIF_FLAG_ETHERNET flags) </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>inp</parametername> </parameternamelist> <parameterdescription> <para>the network interface on which the packet was received </para> </parameterdescription> </parameteritem> </parameterlist> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="204" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="204" bodyend="216"/> <references refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71">tcpip_msg::inp</references> <references refid="group__netif__flags_1ga92448dc510bc8d700c09e5c971ef0676" compoundref="netif_8h" startline="99">NETIF_FLAG_ETHARP</references> <references refid="group__netif__flags_1ga76ad9d0cf9f029df0ab2a998c64040dc" compoundref="netif_8h" startline="103">NETIF_FLAG_ETHERNET</references> <references refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" compoundref="tcpip__priv_8h" startline="136">tcpip_msg::p</references> <references refid="tcpip_8c_1a93043b3c66dbe4a15a60299c6199d102" compoundref="tcpip_8c" startline="161" endline="191">tcpip_inpkt</references> <referencedby refid="net_2init_8c_1a22b2914249628f6cba7d4e1f138c969f" compoundref="net_2init_8c" startline="52" endline="70">net_init</referencedby> <referencedby refid="netif_8c_1a0f4a53e47c840904f824a2a1c0d4ebf4" compoundref="netif_8c" startline="163" endline="191">netif_init</referencedby> </memberdef> <memberdef kind="function" id="tcpip_8c_1a12bdf37eddcd72c4178e3ea7d370395d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t tcpip_send_msg_wait_sem</definition> <argsstring>(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem)</argsstring> <name>tcpip_send_msg_wait_sem</name> <param> <type><ref refid="tcpip_8h_1a35203296bb838f3b493839ffc6e7285d" kindref="member">tcpip_callback_fn</ref></type> <declname>fn</declname> </param> <param> <type>void *</type> <declname>apimsg</declname> </param> <param> <type><ref refid="sem_8h_1a900e36da93bb688c29fc8148f2f44e04" kindref="member">sys_sem_t</ref> *</type> <declname>sem</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Sends a message to TCPIP thread to call a function. Caller thread blocks on on a provided semaphore, which ist NOT automatically signalled by TCPIP thread, this has to be done by the user. It is recommended to use LWIP_TCPIP_CORE_LOCKING since this is the way with least runtime overhead.</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>fn</parametername> </parameternamelist> <parameterdescription> <para>function to be called from TCPIP thread </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>apimsg</parametername> </parameternamelist> <parameterdescription> <para>argument to API function </para> </parameterdescription> </parameteritem> <parameteritem> <parameternamelist> <parametername>sem</parametername> </parameternamelist> <parameterdescription> <para>semaphore to wait on </para> </parameterdescription> </parameteritem> </parameterlist> <simplesect kind="return"><para>ERR_OK if the function was called, another err_t if not </para> </simplesect> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="322" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="322" bodyend="344"/> <references refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" compoundref="err_8h" startline="63">ERR_OK</references> <references refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" compoundref="tcpip_8h" startline="60">LOCK_TCPIP_CORE</references> <references refid="debug_8h_1a94ad086267808462beae2b38f91996ed" compoundref="debug_8h" startline="116">LWIP_ASSERT</references> <references refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" compoundref="arch_8h" startline="315">LWIP_UNUSED_ARG</references> <references refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" compoundref="tcpip__priv_8h" startline="128">tcpip_msg::msg</references> <references refid="structtcpip__msg_1a68b745804255e3b227ec2f5ef0f8e136" compoundref="tcpip__priv_8h" startline="133">tcpip_msg::sem</references> <references refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" compoundref="sys_8h" startline="271">sys_mbox_valid_val</references> <references refid="group__sys__sem_1gac7ff314270976b80559d043f6098817b" compoundref="sys__arch_8c" startline="132" endline="138">sys_sem_valid</references> <references refid="tcpip_8c_1aecf85047afc1ea35a976f7e279fb0f7b" compoundref="tcpip_8c" startline="48">TCPIP_MSG_VAR_DECLARE</references> <references refid="tcpip_8h_1a915effea029b9c4891e1ec635eb1826d" compoundref="tcpip_8h" startline="61">UNLOCK_TCPIP_CORE</references> </memberdef> <memberdef kind="function" id="tcpip_8c_1a61474ad2c2c25ba58cc774e2bcc4ef5f" prot="public" static="yes" const="no" explicit="no" inline="no" virt="non-virtual"> <type>void</type> <definition>static void tcpip_thread</definition> <argsstring>(void *arg)</argsstring> <name>tcpip_thread</name> <param> <type>void *</type> <declname>arg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>The main lwIP thread. This thread has exclusive access to lwIP core functions (unless access to them is not locked). Other threads communicate with this thread using message boxes.</para> <para>It also starts all the timers to make sure they are running in the right thread context.</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>arg</parametername> </parameternamelist> <parameterdescription> <para>unused argument </para> </parameterdescription> </parameteritem> </parameterlist> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="80" column="13" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="80" bodyend="152"/> </memberdef> <memberdef kind="function" id="tcpip_8c_1acfc81ad493f68714a22b3b8ea7d04378" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></type> <definition>err_t tcpip_trycallback</definition> <argsstring>(struct tcpip_callback_msg *msg)</argsstring> <name>tcpip_trycallback</name> <param> <type>struct tcpip_callback_msg *</type> <declname>msg</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Try to post a callback-message to the tcpip_thread mbox This is intended to be used to send "static" messages from interrupt context.</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>msg</parametername> </parameternamelist> <parameterdescription> <para>pointer to the message to post </para> </parameterdescription> </parameteritem> </parameterlist> <simplesect kind="return"><para><ref refid="group__sys__mbox_1gacc06f47f34de04084e1d49788ce871b6" kindref="member">sys_mbox_trypost()</ref> return code </para> </simplesect> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" line="432" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/api/tcpip.c" bodystart="432" bodyend="435"/> <references refid="debug_8h_1a94ad086267808462beae2b38f91996ed" compoundref="debug_8h" startline="116">LWIP_ASSERT</references> <references refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" compoundref="sys_8h" startline="271">sys_mbox_valid_val</references> </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-2004<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.</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/>modification,</highlight></codeline> <codeline lineno="6"><highlight class="comment"><sp/>*<sp/>are<sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline> <codeline lineno="7"><highlight class="comment"><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/>notice,</highlight></codeline> <codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer.</highlight></codeline> <codeline lineno="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/>notice,</highlight></codeline> <codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer<sp/>in<sp/>the<sp/>documentation</highlight></codeline> <codeline lineno="12"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>and/or<sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline> <codeline lineno="13"><highlight class="comment"><sp/>*<sp/>3.<sp/>The<sp/>name<sp/>of<sp/>the<sp/>author<sp/>may<sp/>not<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products</highlight></codeline> <codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline> <codeline lineno="15"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="16"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>``AS<sp/>IS''<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline> <codeline lineno="17"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline> <codeline lineno="18"><highlight class="comment"><sp/>*<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT</highlight></codeline> <codeline lineno="19"><highlight class="comment"><sp/>*<sp/>SHALL<sp/>THE<sp/>AUTHOR<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,</highlight></codeline> <codeline lineno="20"><highlight class="comment"><sp/>*<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline> <codeline lineno="21"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS</highlight></codeline> <codeline lineno="22"><highlight class="comment"><sp/>*<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline> <codeline lineno="23"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING</highlight></codeline> <codeline lineno="24"><highlight class="comment"><sp/>*<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY</highlight></codeline> <codeline lineno="25"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline> <codeline lineno="26"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="27"><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="28"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="29"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Adam<sp/>Dunkels<sp/><adam@sics.se></highlight></codeline> <codeline lineno="30"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="31"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="32"><highlight class="normal"></highlight></codeline> <codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="opt_8h" kindref="compound">net/opt.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="34"><highlight class="normal"></highlight></codeline> <codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!NO_SYS<sp/></highlight><highlight class="comment">/*<sp/>don't<sp/>build<sp/>if<sp/>not<sp/>configured<sp/>for<sp/>use<sp/>in<sp/>lwipopts.h<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="36"><highlight class="normal"></highlight></codeline> <codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="tcpip__priv_8h" kindref="compound">net/priv/tcpip_priv.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="38"><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="39"><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="40"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="mem_8h" kindref="compound">net/mem.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="net_2init_8h" kindref="compound">net/init.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="ip_8h" kindref="compound">net/ip.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="43"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="pbuf_8h" kindref="compound">net/pbuf.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="etharp_8h" kindref="compound">net/etharp.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="45"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><<ref refid="f_2ethernet_8h" kindref="compound">netif/ethernet.h</ref>></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="46"><highlight class="normal"></highlight></codeline> <codeline lineno="47" refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPIP_MSG_VAR_REF(name)<sp/><sp/><sp/><sp/><sp/>API_VAR_REF(name)</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="48" refid="tcpip_8c_1aecf85047afc1ea35a976f7e279fb0f7b" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPIP_MSG_VAR_DECLARE(name)<sp/>API_VAR_DECLARE(struct<sp/>tcpip_msg,<sp/>name)</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="49" refid="tcpip_8c_1a2485bb329e586fe0b440cff72bf364e4" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPIP_MSG_VAR_ALLOC(name)<sp/><sp/><sp/>API_VAR_ALLOC(struct<sp/>tcpip_msg,<sp/>MEMP_TCPIP_MSG_API,<sp/>name,<sp/>ERR_MEM)</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="50" refid="tcpip_8c_1acf5d75be78b6af27ca5ed13da28681d4" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPIP_MSG_VAR_FREE(name)<sp/><sp/><sp/><sp/>API_VAR_FREE(MEMP_TCPIP_MSG_API,<sp/>name)</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="51"><highlight class="normal"></highlight></codeline> <codeline lineno="52"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>global<sp/>variables<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="53"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="tcpip_8h_1a5fe07216c441e27c3028bcac60fa0992" kindref="member">tcpip_init_done_fn</ref><sp/>tcpip_init_done;</highlight></codeline> <codeline lineno="54"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*tcpip_init_done_arg;</highlight></codeline> <codeline lineno="55"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="structsys__mbox" kindref="compound">sys_mbox_t</ref><sp/>mbox;</highlight></codeline> <codeline lineno="56"><highlight class="normal"></highlight></codeline> <codeline lineno="57"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCPIP_CORE_LOCKING</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="58"><highlight class="normal"></highlight></codeline> <codeline lineno="59"><highlight class="normal"><ref refid="structsys__mutex" kindref="compound">sys_mutex_t</ref><sp/>lock_tcpip_core;</highlight></codeline> <codeline lineno="60"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_CORE_LOCKING<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="61"><highlight class="normal"></highlight></codeline> <codeline lineno="62"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TIMERS</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="63"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>wait<sp/>for<sp/>a<sp/>message,<sp/>timeouts<sp/>are<sp/>processed<sp/>while<sp/>waiting<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="64"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPIP_MBOX_FETCH(mbox,<sp/>msg)<sp/>sys_timeouts_mbox_fetch(mbox,<sp/>msg)</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="65"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TIMERS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="66"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>wait<sp/>for<sp/>a<sp/>message<sp/>with<sp/>timers<sp/>disabled<sp/>(e.g.<sp/>pass<sp/>a<sp/>timer-check<sp/>trigger<sp/>into<sp/>tcpip_thread)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="67" refid="tcpip_8c_1a509daeff3c37e5659d0decb841b4e262" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPIP_MBOX_FETCH(mbox,<sp/>msg)<sp/>sys_mbox_fetch(mbox,<sp/>msg)</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="68"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TIMERS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="69"><highlight class="normal"></highlight></codeline> <codeline lineno="80"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>tcpip_thread(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg)<sp/>{</highlight></codeline> <codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>;</highlight></codeline> <codeline lineno="82"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(<ref refid="structtcpip__msg_1a080f04f9cdfa4533fab6608cde6a4649" kindref="member">arg</ref>);</highlight></codeline> <codeline lineno="83"><highlight class="normal"></highlight></codeline> <codeline lineno="84"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tcpip_init_done<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/>tcpip_init_done(tcpip_init_done_arg);</highlight></codeline> <codeline lineno="86"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="87"><highlight class="normal"></highlight></codeline> <codeline lineno="88"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" kindref="member">LOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="89"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(1)<sp/>{<sp/></highlight><highlight class="comment">/*<sp/>MAIN<sp/>Loop<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="tcpip_8h_1a915effea029b9c4891e1ec635eb1826d" kindref="member">UNLOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="lwipopts_8h_1a8b99d75d9e0a0868567d10c8522915bb" kindref="member">LWIP_TCPIP_THREAD_ALIVE</ref>();</highlight></codeline> <codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>wait<sp/>for<sp/>a<sp/>message,<sp/>timeouts<sp/>are<sp/>processed<sp/>while<sp/>waiting<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="tcpip_8c_1a509daeff3c37e5659d0decb841b4e262" kindref="member">TCPIP_MBOX_FETCH</ref>(&mbox,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>**<sp/>)&<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" kindref="member">LOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>invalid<sp/>message:<sp/>NULL\n"</highlight><highlight class="normal">));</highlight></codeline> <codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>invalid<sp/>message"</highlight><highlight class="normal">,<sp/>0);</highlight></codeline> <codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="100"><highlight class="normal"></highlight><highlight class="comment">//kprintf("MSG->TYPE:<sp/>0x%X]",<sp/>msg->type);</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->type)<sp/>{</highlight></codeline> <codeline lineno="102"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!LWIP_TCPIP_CORE_LOCKING</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a8665d0f2f1498c366e90d67a1e4c7f80" kindref="member">TCPIP_MSG_API</ref>:</highlight></codeline> <codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>API<sp/>message<sp/>%p\n"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.api_msg.function(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.api_msg.msg);</highlight></codeline> <codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937ae68ceceeb8f3bfda0dfdb824dfd0aa8a" kindref="member">TCPIP_MSG_API_CALL</ref>:</highlight></codeline> <codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>API<sp/>CALL<sp/>message<sp/>%p\n"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.api_call.arg->err<sp/>=<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.api_call.function(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.api_call.arg);</highlight></codeline> <codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__sys__sem_1gaff1dd2af219b75ae812e0b1660bd7455" kindref="member">sys_sem_signal</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.api_call.sem);</highlight></codeline> <codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="112"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!LWIP_TCPIP_CORE_LOCKING<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="113"><highlight class="normal"></highlight></codeline> <codeline lineno="114"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!LWIP_TCPIP_CORE_LOCKING_INPUT</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a64972ba60577a99b44f088e0b5150c8a" kindref="member">TCPIP_MSG_INPKT</ref>:</highlight></codeline> <codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>PACKET<sp/>%p\n"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.inp.input_fn(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.inp.p,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.inp.netif);</highlight></codeline> <codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_TCPIP_MSG_INPKT,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="120"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!LWIP_TCPIP_CORE_LOCKING_INPUT<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="121"><highlight class="normal"></highlight></codeline> <codeline lineno="122"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCPIP_TIMEOUT<sp/>&&<sp/>LWIP_TIMERS</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>TCPIP_MSG_TIMEOUT:</highlight></codeline> <codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>TIMEOUT<sp/>%p\n"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sys_timeout(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.msecs,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.h,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.arg);</highlight></codeline> <codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_TCPIP_MSG_API,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/>TCPIP_MSG_UNTIMEOUT:</highlight></codeline> <codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>UNTIMEOUT<sp/>%p\n"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sys_untimeout(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.h,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.arg);</highlight></codeline> <codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_TCPIP_MSG_API,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="133"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_TIMEOUT<sp/>&&<sp/>LWIP_TIMERS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="134"><highlight class="normal"></highlight></codeline> <codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a3915e837fa47d5b65cc17d47a0790662" kindref="member">TCPIP_MSG_CALLBACK</ref>:</highlight></codeline> <codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>CALLBACK<sp/>%p\n"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.cb.function(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.cb.ctx);</highlight></codeline> <codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_TCPIP_MSG_API,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="140"><highlight class="normal"></highlight></codeline> <codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a17160cdc581db556a47a57cd4efb3b78" kindref="member">TCPIP_MSG_CALLBACK_STATIC</ref>:</highlight></codeline> <codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>CALLBACK_STATIC<sp/>%p\n"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.cb.function(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.cb.ctx);</highlight></codeline> <codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="145"><highlight class="normal"></highlight></codeline> <codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline> <codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>invalid<sp/>message:<sp/>%d\n"</highlight><highlight class="normal">,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->type));</highlight></codeline> <codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"tcpip_thread:<sp/>invalid<sp/>message"</highlight><highlight class="normal">,<sp/>0);</highlight></codeline> <codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="151"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="152"><highlight class="normal">}</highlight></codeline> <codeline lineno="153"><highlight class="normal"></highlight></codeline> <codeline lineno="161" refid="tcpip_8c_1a93043b3c66dbe4a15a60299c6199d102" refkind="member"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tcpip_8c_1a93043b3c66dbe4a15a60299c6199d102" kindref="member">tcpip_inpkt</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*<ref refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" kindref="member">p</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71" kindref="member">inp</ref>,<sp/><ref refid="netif_8h_1ab2302b1b64ac7b95f24c6bab754a575e" kindref="member">netif_input_fn</ref><sp/><ref refid="structtcpip__msg_1a44fe1469e2472890fe71ebbc1427a19b" kindref="member">input_fn</ref>)<sp/>{</highlight></codeline> <codeline lineno="162"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCPIP_CORE_LOCKING_INPUT</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="163"><highlight class="normal"><sp/><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>ret;</highlight></codeline> <codeline lineno="164"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a52d6c83451936c3de3b0338d4a3f921f" kindref="member">TCPIP_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">"tcpip_inpkt:<sp/>PACKET<sp/>%p/%p\n"</highlight><highlight class="normal">,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" kindref="member">p</ref>,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)<ref refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71" kindref="member">inp</ref>));</highlight></codeline> <codeline lineno="165"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" kindref="member">LOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="166"><highlight class="normal"><sp/><sp/>ret<sp/>=<sp/><ref refid="structtcpip__msg_1a44fe1469e2472890fe71ebbc1427a19b" kindref="member">input_fn</ref>(<ref refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" kindref="member">p</ref>,<sp/><ref refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71" kindref="member">inp</ref>);</highlight></codeline> <codeline lineno="167"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8h_1a915effea029b9c4891e1ec635eb1826d" kindref="member">UNLOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="168"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ret;</highlight></codeline> <codeline lineno="169"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_CORE_LOCKING_INPUT<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="170"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>;</highlight></codeline> <codeline lineno="171"><highlight class="normal"></highlight></codeline> <codeline lineno="172"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>mbox"</highlight><highlight class="normal">,<sp/><ref refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" kindref="member">sys_mbox_valid_val</ref>(mbox));</highlight></codeline> <codeline lineno="173"><highlight class="normal"></highlight></codeline> <codeline lineno="174"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*)<sp/><ref refid="memp_8h_1a2b00593d086313c267b54a976bf67aa5" kindref="member">memp_malloc</ref>(MEMP_TCPIP_MSG_INPKT);</highlight></codeline> <codeline lineno="175"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="177"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="178"><highlight class="normal"></highlight></codeline> <codeline lineno="179"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->type<sp/>=<sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a64972ba60577a99b44f088e0b5150c8a" kindref="member">TCPIP_MSG_INPKT</ref>;</highlight></codeline> <codeline lineno="180"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.inp.p<sp/>=<sp/><ref refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" kindref="member">p</ref>;</highlight></codeline> <codeline lineno="181"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.inp.netif<sp/>=<sp/><ref refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71" kindref="member">inp</ref>;</highlight></codeline> <codeline lineno="182"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.inp.input_fn<sp/>=<sp/><ref refid="structtcpip__msg_1a44fe1469e2472890fe71ebbc1427a19b" kindref="member">input_fn</ref>;</highlight></codeline> <codeline lineno="183"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__sys__mbox_1gacc06f47f34de04084e1d49788ce871b6" kindref="member">sys_mbox_trypost</ref>(&mbox,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>)<sp/>!=<sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline> <codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"INPKT<sp/>%i\n"</highlight><highlight class="normal">,<sp/>__LINE__);</highlight></codeline> <codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_TCPIP_MSG_INPKT,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprintf_8h_1a20b56810edb62a6fe59917015c30848f" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">"INPKT<sp/>%i\n"</highlight><highlight class="normal">,<sp/>__LINE__);</highlight></codeline> <codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05" 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/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>;</highlight></codeline> <codeline lineno="190"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_CORE_LOCKING_INPUT<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="191"><highlight class="normal">}</highlight></codeline> <codeline lineno="192"><highlight class="normal"></highlight></codeline> <codeline lineno="204" refid="tcpip_8c_1ae510f195171bed8499ae94e264a92717" refkind="member"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tcpip_8c_1ae510f195171bed8499ae94e264a92717" kindref="member">tcpip_input</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*<ref refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" kindref="member">p</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71" kindref="member">inp</ref>)<sp/>{</highlight></codeline> <codeline lineno="205"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_ETHERNET</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="206"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//kprintf("tcpip_input0\n");</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="207"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71" kindref="member">inp</ref>->flags<sp/>&<sp/>(<ref refid="group__netif__flags_1ga92448dc510bc8d700c09e5c971ef0676" kindref="member">NETIF_FLAG_ETHARP</ref><sp/>|<sp/><ref refid="group__netif__flags_1ga76ad9d0cf9f029df0ab2a998c64040dc" kindref="member">NETIF_FLAG_ETHERNET</ref>))<sp/>{</highlight></codeline> <codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf("tcpip_input1\n");</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="tcpip_8c_1a93043b3c66dbe4a15a60299c6199d102" kindref="member">tcpip_inpkt</ref>(<ref refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" kindref="member">p</ref>,<sp/><ref refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71" kindref="member">inp</ref>,<sp/>ethernet_input);</highlight></codeline> <codeline lineno="210"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="211"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="212"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_ETHERNET<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprintf("tcpip_input2\n");</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="tcpip_8c_1a93043b3c66dbe4a15a60299c6199d102" kindref="member">tcpip_inpkt</ref>(<ref refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" kindref="member">p</ref>,<sp/><ref refid="structtcpip__msg_1a7d9bc654de358efed5d9737a77bd7c71" kindref="member">inp</ref>,<sp/>ip_input);</highlight></codeline> <codeline lineno="215"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//kprintf("tcpip_input3\n");</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="216"><highlight class="normal">}</highlight></codeline> <codeline lineno="217"><highlight class="normal"></highlight></codeline> <codeline lineno="229" refid="tcpip_8c_1ab1d3ef23817d7703fa75ed67bd45ea1d" refkind="member"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tcpip_8c_1ab1d3ef23817d7703fa75ed67bd45ea1d" kindref="member">tcpip_callback_with_block</ref>(<ref refid="tcpip_8h_1a35203296bb838f3b493839ffc6e7285d" kindref="member">tcpip_callback_fn</ref><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal">,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structtcpip__msg_1a7edb4f4e181f9cffbef13dc7a7d41d8b" kindref="member">ctx</ref>,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>block)<sp/>{</highlight></codeline> <codeline lineno="230"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>;</highlight></codeline> <codeline lineno="231"><highlight class="normal"></highlight></codeline> <codeline lineno="232"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>mbox"</highlight><highlight class="normal">,<sp/><ref refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" kindref="member">sys_mbox_valid_val</ref>(mbox));</highlight></codeline> <codeline lineno="233"><highlight class="normal"></highlight></codeline> <codeline lineno="234"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*)<sp/><ref refid="memp_8h_1a2b00593d086313c267b54a976bf67aa5" kindref="member">memp_malloc</ref>(MEMP_TCPIP_MSG_API);</highlight></codeline> <codeline lineno="235"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="237"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="238"><highlight class="normal"></highlight></codeline> <codeline lineno="239"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->type<sp/>=<sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a3915e837fa47d5b65cc17d47a0790662" kindref="member">TCPIP_MSG_CALLBACK</ref>;</highlight></codeline> <codeline lineno="240"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.cb.function<sp/>=<sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="241"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.cb.ctx<sp/>=<sp/><ref refid="structtcpip__msg_1a7edb4f4e181f9cffbef13dc7a7d41d8b" kindref="member">ctx</ref>;</highlight></codeline> <codeline lineno="242"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(block)<sp/>{</highlight></codeline> <codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__sys__mbox_1ga8ff11ed9831af7ca486123f74d4064ac" kindref="member">sys_mbox_post</ref>(&mbox,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="244"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="245"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__sys__mbox_1gacc06f47f34de04084e1d49788ce871b6" kindref="member">sys_mbox_trypost</ref>(&mbox,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>)<sp/>!=<sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline> <codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_TCPIP_MSG_API,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> <codeline lineno="250"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="251"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>;</highlight></codeline> <codeline lineno="252"><highlight class="normal">}</highlight></codeline> <codeline lineno="253"><highlight class="normal"></highlight></codeline> <codeline lineno="254"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCPIP_TIMEOUT<sp/>&&<sp/>LWIP_TIMERS</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="255"><highlight class="normal"></highlight></codeline> <codeline lineno="263"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline> <codeline lineno="264"><highlight class="normal">tcpip_timeout(<ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>msecs,<sp/>sys_timeout_handler<sp/>h,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structtcpip__msg_1a080f04f9cdfa4533fab6608cde6a4649" kindref="member">arg</ref>)</highlight></codeline> <codeline lineno="265"><highlight class="normal">{</highlight></codeline> <codeline lineno="266"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>;</highlight></codeline> <codeline lineno="267"><highlight class="normal"></highlight></codeline> <codeline lineno="268"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>mbox"</highlight><highlight class="normal">,<sp/><ref refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" kindref="member">sys_mbox_valid_val</ref>(mbox));</highlight></codeline> <codeline lineno="269"><highlight class="normal"></highlight></codeline> <codeline lineno="270"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*)<ref refid="memp_8h_1a2b00593d086313c267b54a976bf67aa5" kindref="member">memp_malloc</ref>(MEMP_TCPIP_MSG_API);</highlight></codeline> <codeline lineno="271"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="273"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="274"><highlight class="normal"></highlight></codeline> <codeline lineno="275"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->type<sp/>=<sp/>TCPIP_MSG_TIMEOUT;</highlight></codeline> <codeline lineno="276"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.msecs<sp/>=<sp/>msecs;</highlight></codeline> <codeline lineno="277"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.h<sp/>=<sp/>h;</highlight></codeline> <codeline lineno="278"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.arg<sp/>=<sp/><ref refid="structtcpip__msg_1a080f04f9cdfa4533fab6608cde6a4649" kindref="member">arg</ref>;</highlight></codeline> <codeline lineno="279"><highlight class="normal"><sp/><sp/><ref refid="group__sys__mbox_1ga8ff11ed9831af7ca486123f74d4064ac" kindref="member">sys_mbox_post</ref>(&mbox,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="280"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>;</highlight></codeline> <codeline lineno="281"><highlight class="normal">}</highlight></codeline> <codeline lineno="282"><highlight class="normal"></highlight></codeline> <codeline lineno="290"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline> <codeline lineno="291"><highlight class="normal">tcpip_untimeout(sys_timeout_handler<sp/>h,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structtcpip__msg_1a080f04f9cdfa4533fab6608cde6a4649" kindref="member">arg</ref>)</highlight></codeline> <codeline lineno="292"><highlight class="normal">{</highlight></codeline> <codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>;</highlight></codeline> <codeline lineno="294"><highlight class="normal"></highlight></codeline> <codeline lineno="295"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>mbox"</highlight><highlight class="normal">,<sp/><ref refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" kindref="member">sys_mbox_valid_val</ref>(mbox));</highlight></codeline> <codeline lineno="296"><highlight class="normal"></highlight></codeline> <codeline lineno="297"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*)<ref refid="memp_8h_1a2b00593d086313c267b54a976bf67aa5" kindref="member">memp_malloc</ref>(MEMP_TCPIP_MSG_API);</highlight></codeline> <codeline lineno="298"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05" kindref="member">ERR_MEM</ref>;</highlight></codeline> <codeline lineno="300"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="301"><highlight class="normal"></highlight></codeline> <codeline lineno="302"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->type<sp/>=<sp/>TCPIP_MSG_UNTIMEOUT;</highlight></codeline> <codeline lineno="303"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.h<sp/>=<sp/>h;</highlight></codeline> <codeline lineno="304"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.tmo.arg<sp/>=<sp/><ref refid="structtcpip__msg_1a080f04f9cdfa4533fab6608cde6a4649" kindref="member">arg</ref>;</highlight></codeline> <codeline lineno="305"><highlight class="normal"><sp/><sp/><ref refid="group__sys__mbox_1ga8ff11ed9831af7ca486123f74d4064ac" kindref="member">sys_mbox_post</ref>(&mbox,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="306"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>;</highlight></codeline> <codeline lineno="307"><highlight class="normal">}</highlight></codeline> <codeline lineno="308"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_TIMEOUT<sp/>&&<sp/>LWIP_TIMERS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="309"><highlight class="normal"></highlight></codeline> <codeline lineno="322" refid="tcpip_8c_1a12bdf37eddcd72c4178e3ea7d370395d" refkind="member"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tcpip_8c_1a12bdf37eddcd72c4178e3ea7d370395d" kindref="member">tcpip_send_msg_wait_sem</ref>(<ref refid="tcpip_8h_1a35203296bb838f3b493839ffc6e7285d" kindref="member">tcpip_callback_fn</ref><sp/>fn,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*apimsg,<sp/><ref refid="structsys__sem" kindref="compound">sys_sem_t</ref>*<sp/><ref refid="structtcpip__msg_1a68b745804255e3b227ec2f5ef0f8e136" kindref="member">sem</ref>)<sp/>{</highlight></codeline> <codeline lineno="323"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCPIP_CORE_LOCKING</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="324"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(<ref refid="structtcpip__msg_1a68b745804255e3b227ec2f5ef0f8e136" kindref="member">sem</ref>);</highlight></codeline> <codeline lineno="325"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" kindref="member">LOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="326"><highlight class="normal"><sp/><sp/>fn(apimsg);</highlight></codeline> <codeline lineno="327"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8h_1a915effea029b9c4891e1ec635eb1826d" kindref="member">UNLOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="328"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>;</highlight></codeline> <codeline lineno="329"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_CORE_LOCKING<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="330"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1aecf85047afc1ea35a976f7e279fb0f7b" kindref="member">TCPIP_MSG_VAR_DECLARE</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="331"><highlight class="normal"></highlight></codeline> <codeline lineno="332"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"semaphore<sp/>not<sp/>initialized"</highlight><highlight class="normal">,<sp/><ref refid="group__sys__sem_1gac7ff314270976b80559d043f6098817b" kindref="member">sys_sem_valid</ref>(<ref refid="structtcpip__msg_1a68b745804255e3b227ec2f5ef0f8e136" kindref="member">sem</ref>));</highlight></codeline> <codeline lineno="333"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>mbox"</highlight><highlight class="normal">,<sp/><ref refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" kindref="member">sys_mbox_valid_val</ref>(mbox));</highlight></codeline> <codeline lineno="334"><highlight class="normal"></highlight></codeline> <codeline lineno="335"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1a2485bb329e586fe0b440cff72bf364e4" kindref="member">TCPIP_MSG_VAR_ALLOC</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="336"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).type<sp/>=<sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a8665d0f2f1498c366e90d67a1e4c7f80" kindref="member">TCPIP_MSG_API</ref>;</highlight></codeline> <codeline lineno="337"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).msg.api_msg.function<sp/>=<sp/>fn;</highlight></codeline> <codeline lineno="338"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).msg.api_msg.msg<sp/>=<sp/>apimsg;</highlight></codeline> <codeline lineno="339"><highlight class="normal"><sp/><sp/><ref refid="group__sys__mbox_1ga8ff11ed9831af7ca486123f74d4064ac" kindref="member">sys_mbox_post</ref>(&mbox,<sp/>&<ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="340"><highlight class="normal"><sp/><sp/><ref refid="group__sys__sem_1ga28aa725e8a36dd0cfde89875af4f3ec9" kindref="member">sys_arch_sem_wait</ref>(<ref refid="structtcpip__msg_1a68b745804255e3b227ec2f5ef0f8e136" kindref="member">sem</ref>,<sp/>0);</highlight></codeline> <codeline lineno="341"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1acf5d75be78b6af27ca5ed13da28681d4" kindref="member">TCPIP_MSG_VAR_FREE</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="342"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>;</highlight></codeline> <codeline lineno="343"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_CORE_LOCKING<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="344"><highlight class="normal">}</highlight></codeline> <codeline lineno="345"><highlight class="normal"></highlight></codeline> <codeline lineno="356" refid="tcpip_8c_1a3d42b0c46607f91aedcc7745ed466b08" refkind="member"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tcpip_8c_1a3d42b0c46607f91aedcc7745ed466b08" kindref="member">tcpip_api_call</ref>(<ref refid="tcpip__priv_8h_1aa7ecde8c8d8012fe5c498f7ee58f9458" kindref="member">tcpip_api_call_fn</ref><sp/>fn,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structtcpip__api__call__data" kindref="compound">tcpip_api_call_data</ref><sp/>*call)<sp/>{</highlight></codeline> <codeline lineno="357"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCPIP_CORE_LOCKING</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="358"><highlight class="normal"><sp/><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>err;</highlight></codeline> <codeline lineno="359"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" kindref="member">LOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="360"><highlight class="normal"><sp/><sp/>err<sp/>=<sp/>fn(call);</highlight></codeline> <codeline lineno="361"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8h_1a915effea029b9c4891e1ec635eb1826d" kindref="member">UNLOCK_TCPIP_CORE</ref>();</highlight></codeline> <codeline lineno="362"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>err;</highlight></codeline> <codeline lineno="363"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_CORE_LOCKING<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="364"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1aecf85047afc1ea35a976f7e279fb0f7b" kindref="member">TCPIP_MSG_VAR_DECLARE</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="365"><highlight class="normal"></highlight></codeline> <codeline lineno="366"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!LWIP_NETCONN_SEM_PER_THREAD</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="367"><highlight class="normal"><sp/><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>err<sp/>=<sp/><ref refid="group__sys__sem_1gadb68acad14b34550b9891bc11bbf4e63" kindref="member">sys_sem_new</ref>(&call-><ref refid="structtcpip__api__call__data_1a430b64d7617893939ed12cc957765431" kindref="member">sem</ref>,<sp/>0);</highlight></codeline> <codeline lineno="368"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(err<sp/>!=<sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline> <codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>err;</highlight></codeline> <codeline lineno="370"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="371"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_NETCONN_SEM_PER_THREAD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="372"><highlight class="normal"></highlight></codeline> <codeline lineno="373"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>mbox"</highlight><highlight class="normal">,<sp/><ref refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" kindref="member">sys_mbox_valid_val</ref>(mbox));</highlight></codeline> <codeline lineno="374"><highlight class="normal"></highlight></codeline> <codeline lineno="375"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1a2485bb329e586fe0b440cff72bf364e4" kindref="member">TCPIP_MSG_VAR_ALLOC</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="376"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).type<sp/>=<sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937ae68ceceeb8f3bfda0dfdb824dfd0aa8a" kindref="member">TCPIP_MSG_API_CALL</ref>;</highlight></codeline> <codeline lineno="377"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).msg.api_call.arg<sp/>=<sp/>call;</highlight></codeline> <codeline lineno="378"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).msg.api_call.function<sp/>=<sp/>fn;</highlight></codeline> <codeline lineno="379"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_NETCONN_SEM_PER_THREAD</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="380"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).msg.api_call.sem<sp/>=<sp/>LWIP_NETCONN_THREAD_SEM_GET();</highlight></codeline> <codeline lineno="381"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_NETCONN_SEM_PER_THREAD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="382"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).msg.api_call.sem<sp/>=<sp/>&call-><ref refid="structtcpip__api__call__data_1a430b64d7617893939ed12cc957765431" kindref="member">sem</ref>;</highlight></codeline> <codeline lineno="383"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_NETCONN_SEM_PER_THREAD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="384"><highlight class="normal"><sp/><sp/><ref refid="group__sys__mbox_1ga8ff11ed9831af7ca486123f74d4064ac" kindref="member">sys_mbox_post</ref>(&mbox,<sp/>&<ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>));</highlight></codeline> <codeline lineno="385"><highlight class="normal"><sp/><sp/><ref refid="group__sys__sem_1ga28aa725e8a36dd0cfde89875af4f3ec9" kindref="member">sys_arch_sem_wait</ref>(<ref refid="tcpip_8c_1ad42dbf6b1a12f07523637e44cf85756d" kindref="member">TCPIP_MSG_VAR_REF</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>).<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>.api_call.sem,<sp/>0);</highlight></codeline> <codeline lineno="386"><highlight class="normal"><sp/><sp/><ref refid="tcpip_8c_1acf5d75be78b6af27ca5ed13da28681d4" kindref="member">TCPIP_MSG_VAR_FREE</ref>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="387"><highlight class="normal"></highlight></codeline> <codeline lineno="388"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!LWIP_NETCONN_SEM_PER_THREAD</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="389"><highlight class="normal"><sp/><sp/><ref refid="group__sys__sem_1ga4d02e29e5dfa092559efc04dee985822" kindref="member">sys_sem_free</ref>(&call-><ref refid="structtcpip__api__call__data_1a430b64d7617893939ed12cc957765431" kindref="member">sem</ref>);</highlight></codeline> <codeline lineno="390"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_NETCONN_SEM_PER_THREAD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="391"><highlight class="normal"></highlight></codeline> <codeline lineno="392"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>call-><ref refid="structtcpip__api__call__data_1a1a1d5bb2f7fd09f592fb56089e762307" kindref="member">err</ref>;</highlight></codeline> <codeline lineno="393"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_CORE_LOCKING<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="394"><highlight class="normal">}</highlight></codeline> <codeline lineno="395"><highlight class="normal"></highlight></codeline> <codeline lineno="404"><highlight class="keyword">struct<sp/></highlight><highlight class="normal">tcpip_callback_msg*</highlight></codeline> <codeline lineno="405" refid="tcpip_8c_1aee14fa2587a9ba9d23e4c7e16c4526ac" refkind="member"><highlight class="normal"><ref refid="tcpip_8c_1aee14fa2587a9ba9d23e4c7e16c4526ac" kindref="member">tcpip_callbackmsg_new</ref>(<ref refid="tcpip_8h_1a35203296bb838f3b493839ffc6e7285d" kindref="member">tcpip_callback_fn</ref><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal">,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*ctx)<sp/>{</highlight></codeline> <codeline lineno="406"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcpip__msg" kindref="compound">tcpip_msg</ref><sp/>*)<sp/><ref refid="memp_8h_1a2b00593d086313c267b54a976bf67aa5" kindref="member">memp_malloc</ref>(MEMP_TCPIP_MSG_API);</highlight></codeline> <codeline lineno="407"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline> <codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline> <codeline lineno="409"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="410"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->type<sp/>=<sp/><ref refid="tcpip__priv_8h_1a1e0cb5032a61055e3f4a3426ed548937a17160cdc581db556a47a57cd4efb3b78" kindref="member">TCPIP_MSG_CALLBACK_STATIC</ref>;</highlight></codeline> <codeline lineno="411"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.cb.function<sp/>=<sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal">;</highlight></codeline> <codeline lineno="412"><highlight class="normal"><sp/><sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>->msg.cb.ctx<sp/>=<sp/><ref refid="structtcpip__msg_1a7edb4f4e181f9cffbef13dc7a7d41d8b" kindref="member">ctx</ref>;</highlight></codeline> <codeline lineno="413"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcpip_callback_msg*)<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>;</highlight></codeline> <codeline lineno="414"><highlight class="normal">}</highlight></codeline> <codeline lineno="415"><highlight class="normal"></highlight></codeline> <codeline lineno="421" refid="tcpip_8c_1ac5b7a59f4c3f5f721ab9ee81f231c9fd" refkind="member"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="tcpip_8c_1ac5b7a59f4c3f5f721ab9ee81f231c9fd" kindref="member">tcpip_callbackmsg_delete</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcpip_callback_msg*<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>)<sp/>{</highlight></codeline> <codeline lineno="422"><highlight class="normal"><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_TCPIP_MSG_API,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="423"><highlight class="normal">}</highlight></codeline> <codeline lineno="424"><highlight class="normal"></highlight></codeline> <codeline lineno="432" refid="tcpip_8c_1acfc81ad493f68714a22b3b8ea7d04378" refkind="member"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tcpip_8c_1acfc81ad493f68714a22b3b8ea7d04378" kindref="member">tcpip_trycallback</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>tcpip_callback_msg*<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>)<sp/>{</highlight></codeline> <codeline lineno="433"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"Invalid<sp/>mbox"</highlight><highlight class="normal">,<sp/><ref refid="sys_8h_1aae82640d0bdbeec7b9b6511b3f8d99cb" kindref="member">sys_mbox_valid_val</ref>(mbox));</highlight></codeline> <codeline lineno="434"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__sys__mbox_1gacc06f47f34de04084e1d49788ce871b6" kindref="member">sys_mbox_trypost</ref>(&mbox,<sp/><ref refid="structtcpip__msg_1a18c49fcbcfeb09f203a6fb84e74e367b" kindref="member">msg</ref>);</highlight></codeline> <codeline lineno="435"><highlight class="normal">}</highlight></codeline> <codeline lineno="436"><highlight class="normal"></highlight></codeline> <codeline lineno="446" refid="tcpip_8c_1a1f3a88b8df6ba3b9ed1c00e0a305e3db" refkind="member"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="tcpip_8c_1a1f3a88b8df6ba3b9ed1c00e0a305e3db" kindref="member">tcpip_init</ref>(<ref refid="tcpip_8h_1a5fe07216c441e27c3028bcac60fa0992" kindref="member">tcpip_init_done_fn</ref><sp/>initfunc,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structtcpip__msg_1a080f04f9cdfa4533fab6608cde6a4649" kindref="member">arg</ref>)<sp/>{</highlight></codeline> <codeline lineno="447"><highlight class="normal"><sp/><sp/><ref refid="net_2init_8h_1a0c1a18439524d2f4a5e51d25c0ca2ce9" kindref="member">lwip_init</ref>();</highlight></codeline> <codeline lineno="448"><highlight class="normal"></highlight></codeline> <codeline lineno="449"><highlight class="normal"><sp/><sp/>tcpip_init_done<sp/>=<sp/>initfunc;</highlight></codeline> <codeline lineno="450"><highlight class="normal"><sp/><sp/>tcpip_init_done_arg<sp/>=<sp/><ref refid="structtcpip__msg_1a080f04f9cdfa4533fab6608cde6a4649" kindref="member">arg</ref>;</highlight></codeline> <codeline lineno="451"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__sys__mbox_1ga26c015e64c859c9361a6f75c4e6fa829" kindref="member">sys_mbox_new</ref>(&mbox,<sp/><ref refid="lwipopts_8h_1a8cf210ad4e4bf616860a45fbd140fd06" kindref="member">TCPIP_MBOX_SIZE</ref>)<sp/>!=<sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline> <codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"failed<sp/>to<sp/>create<sp/>tcpip_thread<sp/>mbox"</highlight><highlight class="normal">,<sp/>0);</highlight></codeline> <codeline lineno="453"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="454"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCPIP_CORE_LOCKING</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="455"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__sys__mutex_1ga38e7dae1fd88b338eb1cd97f110f3897" kindref="member">sys_mutex_new</ref>(&lock_tcpip_core)<sp/>!=<sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>)<sp/>{</highlight></codeline> <codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">"failed<sp/>to<sp/>create<sp/>lock_tcpip_core"</highlight><highlight class="normal">,<sp/>0);</highlight></codeline> <codeline lineno="457"><highlight class="normal"><sp/><sp/>}</highlight></codeline> <codeline lineno="458"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCPIP_CORE_LOCKING<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="459"><highlight class="normal"></highlight></codeline> <codeline lineno="460"><highlight class="normal"><sp/><sp/><ref refid="group__sys__misc_1ga0d596afdd8dbcfad320172d39b0f607a" kindref="member">sys_thread_new</ref>(<ref refid="lwipopts_8h_1a405e604e4328e1feb878c6fe1798a587" kindref="member">TCPIP_THREAD_NAME</ref>,<sp/>tcpip_thread,<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>,<sp/><ref refid="lwipopts_8h_1aa02b84eafa0c8b09b158b97c96d79db0" kindref="member">TCPIP_THREAD_STACKSIZE</ref>,<sp/><ref refid="lwipopts_8h_1a42b2c7a3042d7c3efd00f367f5837435" kindref="member">TCPIP_THREAD_PRIO</ref>);</highlight></codeline> <codeline lineno="461"><highlight class="normal">}</highlight></codeline> <codeline lineno="462"><highlight class="normal"></highlight></codeline> <codeline lineno="469"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>pbuf_free_int(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*<ref refid="structtcpip__msg_1a9298bc5d6d92c5efd478dac92c09459b" kindref="member">p</ref>)<sp/>{</highlight></codeline> <codeline lineno="470"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*q<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*)<sp/>p;</highlight></codeline> <codeline lineno="471"><highlight class="normal"><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(q);</highlight></codeline> <codeline lineno="472"><highlight class="normal">}</highlight></codeline> <codeline lineno="473"><highlight class="normal"></highlight></codeline> <codeline lineno="480" refid="tcpip_8c_1a5cdcb6b784fe0e8736a5b31a5cfbed6c" refkind="member"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tcpip_8c_1a5cdcb6b784fe0e8736a5b31a5cfbed6c" kindref="member">pbuf_free_callback</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p)<sp/>{</highlight></codeline> <codeline lineno="481"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="tcpip_8c_1ab1d3ef23817d7703fa75ed67bd45ea1d" kindref="member">tcpip_callback_with_block</ref>(pbuf_free_int,<sp/>p,<sp/>0);</highlight></codeline> <codeline lineno="482"><highlight class="normal">}</highlight></codeline> <codeline lineno="483"><highlight class="normal"></highlight></codeline> <codeline lineno="491" refid="tcpip_8c_1a55b4de3765c6a37b3f2b26a11603771c" refkind="member"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/><ref refid="tcpip_8c_1a55b4de3765c6a37b3f2b26a11603771c" kindref="member">mem_free_callback</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*m)<sp/>{</highlight></codeline> <codeline lineno="492"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="tcpip_8c_1ab1d3ef23817d7703fa75ed67bd45ea1d" kindref="member">tcpip_callback_with_block</ref>(<ref refid="mem_8h_1a2fd7aa1adf6e394d3be7c7734e7df41a" kindref="member">mem_free</ref>,<sp/>m,<sp/>0);</highlight></codeline> <codeline lineno="493"><highlight class="normal">}</highlight></codeline> <codeline lineno="494"><highlight class="normal"></highlight></codeline> <codeline lineno="495"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!NO_SYS<sp/>*/</highlight><highlight class="preprocessor"></highlight></codeline> </programlisting> <location file="C:/Dev/git/UbixOS/sys/net/api/tcpip.c"/> </compounddef> </doxygen>