<?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="prot_2tcp_8h" kind="file" language="C++"> <compoundname>tcp.h</compoundname> <includes refid="arch_8h" local="yes">net/arch.h</includes> <incdepgraph> <node id="14"> <label>stdarg.h</label> <link refid="stdarg_8h"/> </node> <node id="15"> <label>ubixos/kpanic.h</label> <link refid="kpanic_8h"/> </node> <node id="12"> <label>sys/io.h</label> <link refid="io_8h"/> </node> <node id="5"> <label>sys/select.h</label> <link refid="select_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="4" relation="include"> </childnode> <childnode refid="7" relation="include"> </childnode> <childnode refid="8" relation="include"> </childnode> <childnode refid="9" relation="include"> </childnode> </node> <node id="10"> <label>net/arch/cc.h</label> <link refid="cc_8h"/> <childnode refid="11" relation="include"> </childnode> </node> <node id="9"> <label>sys/_sigset.h</label> <link refid="__sigset_8h"/> <childnode refid="4" relation="include"> </childnode> </node> <node id="3"> <label>sys/types.h</label> <link refid="include_2sys_2types_8h"/> <childnode refid="4" relation="include"> </childnode> <childnode refid="5" relation="include"> </childnode> </node> <node id="2"> <label>net/arch.h</label> <link refid="arch_8h"/> <childnode refid="3" relation="include"> </childnode> <childnode refid="10" relation="include"> </childnode> <childnode refid="13" relation="include"> </childnode> <childnode refid="15" relation="include"> </childnode> </node> <node id="13"> <label>lib/kprintf.h</label> <link refid="kprintf_8h"/> <childnode refid="3" relation="include"> </childnode> <childnode refid="14" relation="include"> </childnode> </node> <node id="6"> <label>sys/cdefs.h</label> <link refid="cdefs_8h"/> </node> <node id="11"> <label>ubixos/time.h</label> <link refid="time_8h"/> <childnode refid="3" relation="include"> </childnode> <childnode refid="7" relation="include"> </childnode> <childnode refid="12" relation="include"> </childnode> </node> <node id="4"> <label>sys/_types.h</label> <link refid="__types_8h"/> </node> <node id="7"> <label>sys/_timespec.h</label> <link refid="__timespec_8h"/> <childnode refid="4" relation="include"> </childnode> </node> <node id="1"> <label>C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h</label> <link refid="prot_2tcp_8h"/> <childnode refid="2" relation="include"> </childnode> </node> <node id="8"> <label>sys/_timeval.h</label> <link refid="__timeval_8h"/> <childnode refid="4" relation="include"> </childnode> </node> </incdepgraph> <innerclass refid="structtcp__hdr" prot="public">tcp_hdr</innerclass> <sectiondef kind="define"> <memberdef kind="define" id="prot_2tcp_8h_1a44b3b1ab31a403ba28ec135adfcbefef" prot="public" static="no"> <name>TCP_ACK</name> <initializer>0x10U</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="76" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="76" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a6f441228e74f83c026c48360667beb48" prot="public" static="no"> <name>TCP_CWR</name> <initializer>0x80U</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="79" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="79" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1ae6ba06711820fc4365ad0d78f70171dd" prot="public" static="no"> <name>TCP_ECE</name> <initializer>0x40U</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="78" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="78" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a88e60aa2cf23e1c65d630701db08c743" prot="public" static="no"> <name>TCP_FIN</name> <initializer>0x01U</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="72" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="72" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a75dbc3ac2d65c23a60dbe2f96a874501" prot="public" static="no"> <name>TCP_FLAGS</name> <initializer>0x3fU</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="81" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="81" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a5758db371d6daa394d178429b7c94c2a" prot="public" static="no"> <name>TCP_HLEN</name> <initializer>20</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="47" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="47" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a1320fd0006a2f70138bc2d0018dda829" prot="public" static="no"> <name>TCP_PSH</name> <initializer>0x08U</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="75" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="75" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a5ca559def464ef20d8b1f7d32f2f160d" prot="public" static="no"> <name>TCP_RST</name> <initializer>0x04U</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="74" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="74" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a6020613f5062417d9811cfa837215c83" prot="public" static="no"> <name>TCP_SYN</name> <initializer>0x02U</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="73" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="73" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1ac84f499cba8a02fc0e306c10b2acabf0" prot="public" static="no"> <name>TCP_URG</name> <initializer>0x20U</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="77" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="77" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1ad5de3cf876b2c7f6835f44132fe0e9d5" prot="public" static="no"> <name>TCPH_FLAGS</name> <param><defname>phdr</defname></param> <initializer>((<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)(<ref refid="def_8h_1ac642bf6057869696d7807564d8309ffc" kindref="member">lwip_ntohs</ref>((phdr)->_hdrlen_rsvd_flags) & <ref refid="prot_2tcp_8h_1a75dbc3ac2d65c23a60dbe2f96a874501" kindref="member">TCP_FLAGS</ref>))</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="84" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="84" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1afe7c917080459557c65071c4b13c8e12" prot="public" static="no"> <name>TCPH_FLAGS_SET</name> <param><defname>phdr</defname></param> <param><defname>flags</defname></param> <initializer>(phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & <ref refid="def_8h_1a0dfd02d7c09f9c698a5a7ecc0b7287ad" kindref="member">PP_HTONS</ref>(~<ref refid="prot_2tcp_8h_1a75dbc3ac2d65c23a60dbe2f96a874501" kindref="member">TCP_FLAGS</ref>)) | <ref refid="def_8c_1ad637280639de4066392e6b5614fa3e56" kindref="member">lwip_htons</ref>(flags))</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="87" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="87" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a5b97d3b7e68c20eb3eab87a61d779223" prot="public" static="no"> <name>TCPH_HDRLEN</name> <param><defname>phdr</defname></param> <initializer>((<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)(<ref refid="def_8h_1ac642bf6057869696d7807564d8309ffc" kindref="member">lwip_ntohs</ref>((phdr)->_hdrlen_rsvd_flags) >> 12))</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="83" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="83" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a57fb29aed8df21ccff4481612ee40407" prot="public" static="no"> <name>TCPH_HDRLEN_FLAGS_SET</name> <param><defname>phdr</defname></param> <param><defname>len</defname></param> <param><defname>flags</defname></param> <initializer>(phdr)->_hdrlen_rsvd_flags = (<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)(<ref refid="def_8c_1ad637280639de4066392e6b5614fa3e56" kindref="member">lwip_htons</ref>((<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)((len) << 12) | (flags)))</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="88" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="88" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a8c29d17957680854699ac2e5dab9aca4" prot="public" static="no"> <name>TCPH_HDRLEN_SET</name> <param><defname>phdr</defname></param> <param><defname>len</defname></param> <initializer>(phdr)->_hdrlen_rsvd_flags = <ref refid="def_8c_1ad637280639de4066392e6b5614fa3e56" kindref="member">lwip_htons</ref>(((len) << 12) | <ref refid="prot_2tcp_8h_1ad5de3cf876b2c7f6835f44132fe0e9d5" kindref="member">TCPH_FLAGS</ref>(phdr))</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="86" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="86" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1a42432f2dde6716ecb0087ccbc47cc75b" prot="public" static="no"> <name>TCPH_SET_FLAG</name> <param><defname>phdr</defname></param> <param><defname>flags</defname></param> <initializer>(phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags | <ref refid="def_8c_1ad637280639de4066392e6b5614fa3e56" kindref="member">lwip_htons</ref>(flags))</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="90" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="90" bodyend="-1"/> </memberdef> <memberdef kind="define" id="prot_2tcp_8h_1adc07c9186474e45d2fc40e9efc76d2ba" prot="public" static="no"> <name>TCPH_UNSET_FLAG</name> <param><defname>phdr</defname></param> <param><defname>flags</defname></param> <initializer>(phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags & ~<ref refid="def_8c_1ad637280639de4066392e6b5614fa3e56" kindref="member">lwip_htons</ref>(flags))</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="91" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" bodystart="91" bodyend="-1"/> </memberdef> </sectiondef> <sectiondef kind="var"> <memberdef kind="variable" id="prot_2tcp_8h_1a29212dd70e32fb34e4db4ea46fe8cfdb" prot="public" static="no" mutable="no"> <type><ref refid="group__compiler__abstraction_1ga73199061891adf1b912d20835c7d5e96" kindref="member">PACK_STRUCT_BEGIN</ref> struct <ref refid="structtcp__hdr" kindref="compound">tcp_hdr</ref></type> <definition>PACK_STRUCT_BEGIN struct tcp_hdr PACK_STRUCT_STRUCT</definition> <argsstring></argsstring> <name>PACK_STRUCT_STRUCT</name> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h" line="65" column="20"/> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> <para>TCP protocol definitions </para> </detaileddescription> <programlisting> <codeline lineno="1"></codeline> <codeline lineno="6"><highlight class="comment">/*</highlight></codeline> <codeline lineno="7"><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="8"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline> <codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="10"><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="11"><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="12"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="13"><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="14"><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="15"><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="16"><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="17"><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="18"><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="19"><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="20"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="21"><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="22"><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="23"><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="24"><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="25"><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="26"><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="27"><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="28"><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="29"><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="30"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline> <codeline lineno="31"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="32"><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="33"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="34"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Adam<sp/>Dunkels<sp/><adam@sics.se></highlight></codeline> <codeline lineno="35"><highlight class="comment"><sp/>*</highlight></codeline> <codeline lineno="36"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>LWIP_HDR_PROT_TCP_H</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_HDR_PROT_TCP_H</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="39"><highlight class="normal"></highlight></codeline> <codeline lineno="40"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="arch_8h" kindref="compound">net/arch.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="41"><highlight class="normal"></highlight></codeline> <codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="43"><highlight class="normal"></highlight><highlight class="keyword">extern</highlight><highlight class="normal"><sp/></highlight><highlight class="stringliteral">"C"</highlight><highlight class="normal"><sp/>{</highlight></codeline> <codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="45"><highlight class="normal"></highlight></codeline> <codeline lineno="46"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Length<sp/>of<sp/>the<sp/>TCP<sp/>header,<sp/>excluding<sp/>options.<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="47" refid="prot_2tcp_8h_1a5758db371d6daa394d178429b7c94c2a" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_HLEN<sp/>20</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="48"><highlight class="normal"></highlight></codeline> <codeline lineno="49"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Fields<sp/>are<sp/>(of<sp/>course)<sp/>in<sp/>network<sp/>byte<sp/>order.</highlight></codeline> <codeline lineno="50"><highlight class="comment"><sp/>*<sp/>Some<sp/>fields<sp/>are<sp/>converted<sp/>to<sp/>host<sp/>byte<sp/>order<sp/>in<sp/>tcp_input().</highlight></codeline> <codeline lineno="51"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="52"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>PACK_STRUCT_USE_INCLUDES</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/>include<sp/>"arch/bpstruct.h"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="54"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="55"><highlight class="normal"><ref refid="cc_8h_1a73199061891adf1b912d20835c7d5e96" kindref="member">PACK_STRUCT_BEGIN</ref></highlight></codeline> <codeline lineno="56" refid="structtcp__hdr" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtcp__hdr" kindref="compound">tcp_hdr</ref><sp/>{</highlight></codeline> <codeline lineno="57"><highlight class="normal"><sp/><sp/><ref refid="structtcp__hdr_1ac2319bd25c4548055230b4a00052d715" kindref="member">PACK_STRUCT_FIELD</ref>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>src);</highlight></codeline> <codeline lineno="58"><highlight class="normal"><sp/><sp/><ref refid="structtcp__hdr_1ac2319bd25c4548055230b4a00052d715" kindref="member">PACK_STRUCT_FIELD</ref>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>dest);</highlight></codeline> <codeline lineno="59"><highlight class="normal"><sp/><sp/><ref refid="structtcp__hdr_1ac2319bd25c4548055230b4a00052d715" kindref="member">PACK_STRUCT_FIELD</ref>(<ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>seqno);</highlight></codeline> <codeline lineno="60"><highlight class="normal"><sp/><sp/><ref refid="structtcp__hdr_1ac2319bd25c4548055230b4a00052d715" kindref="member">PACK_STRUCT_FIELD</ref>(<ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>ackno);</highlight></codeline> <codeline lineno="61"><highlight class="normal"><sp/><sp/><ref refid="structtcp__hdr_1ac2319bd25c4548055230b4a00052d715" kindref="member">PACK_STRUCT_FIELD</ref>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>_hdrlen_rsvd_flags);</highlight></codeline> <codeline lineno="62"><highlight class="normal"><sp/><sp/><ref refid="structtcp__hdr_1ac2319bd25c4548055230b4a00052d715" kindref="member">PACK_STRUCT_FIELD</ref>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>wnd);</highlight></codeline> <codeline lineno="63"><highlight class="normal"><sp/><sp/><ref refid="structtcp__hdr_1ac2319bd25c4548055230b4a00052d715" kindref="member">PACK_STRUCT_FIELD</ref>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>chksum);</highlight></codeline> <codeline lineno="64"><highlight class="normal"><sp/><sp/><ref refid="structtcp__hdr_1ac2319bd25c4548055230b4a00052d715" kindref="member">PACK_STRUCT_FIELD</ref>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>urgp);</highlight></codeline> <codeline lineno="65"><highlight class="normal">}<sp/><ref refid="prot_2tcp_8h_1a29212dd70e32fb34e4db4ea46fe8cfdb" kindref="member">PACK_STRUCT_STRUCT</ref>;</highlight></codeline> <codeline lineno="66"><highlight class="normal"><ref refid="cc_8h_1a465fef70f294e21cbf4ea51fc342f20e" kindref="member">PACK_STRUCT_END</ref></highlight></codeline> <codeline lineno="67"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>PACK_STRUCT_USE_INCLUDES</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="68"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/>include<sp/>"arch/epstruct.h"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="69"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="70"><highlight class="normal"></highlight></codeline> <codeline lineno="71"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>TCP<sp/>header<sp/>flags<sp/>bits<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="72" refid="prot_2tcp_8h_1a88e60aa2cf23e1c65d630701db08c743" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_FIN<sp/>0x01U</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="73" refid="prot_2tcp_8h_1a6020613f5062417d9811cfa837215c83" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_SYN<sp/>0x02U</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="74" refid="prot_2tcp_8h_1a5ca559def464ef20d8b1f7d32f2f160d" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_RST<sp/>0x04U</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="75" refid="prot_2tcp_8h_1a1320fd0006a2f70138bc2d0018dda829" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_PSH<sp/>0x08U</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="76" refid="prot_2tcp_8h_1a44b3b1ab31a403ba28ec135adfcbefef" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_ACK<sp/>0x10U</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="77" refid="prot_2tcp_8h_1ac84f499cba8a02fc0e306c10b2acabf0" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_URG<sp/>0x20U</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="78" refid="prot_2tcp_8h_1ae6ba06711820fc4365ad0d78f70171dd" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_ECE<sp/>0x40U</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="79" refid="prot_2tcp_8h_1a6f441228e74f83c026c48360667beb48" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_CWR<sp/>0x80U</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="80"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Valid<sp/>TCP<sp/>header<sp/>flags<sp/>*/</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="81" refid="prot_2tcp_8h_1a75dbc3ac2d65c23a60dbe2f96a874501" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCP_FLAGS<sp/>0x3fU</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="82"><highlight class="normal"></highlight></codeline> <codeline lineno="83" refid="prot_2tcp_8h_1a5b97d3b7e68c20eb3eab87a61d779223" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPH_HDRLEN(phdr)<sp/>((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags)<sp/>>><sp/>12))</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="84" refid="prot_2tcp_8h_1ad5de3cf876b2c7f6835f44132fe0e9d5" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPH_FLAGS(phdr)<sp/><sp/>((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags)<sp/>&<sp/>TCP_FLAGS))</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="85"><highlight class="normal"></highlight></codeline> <codeline lineno="86" refid="prot_2tcp_8h_1a8c29d17957680854699ac2e5dab9aca4" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPH_HDRLEN_SET(phdr,<sp/>len)<sp/>(phdr)->_hdrlen_rsvd_flags<sp/>=<sp/>lwip_htons(((len)<sp/><<<sp/>12)<sp/>|<sp/>TCPH_FLAGS(phdr))</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="87" refid="prot_2tcp_8h_1afe7c917080459557c65071c4b13c8e12" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPH_FLAGS_SET(phdr,<sp/>flags)<sp/>(phdr)->_hdrlen_rsvd_flags<sp/>=<sp/>(((phdr)->_hdrlen_rsvd_flags<sp/>&<sp/>PP_HTONS(~TCP_FLAGS))<sp/>|<sp/>lwip_htons(flags))</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="88" refid="prot_2tcp_8h_1a57fb29aed8df21ccff4481612ee40407" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPH_HDRLEN_FLAGS_SET(phdr,<sp/>len,<sp/>flags)<sp/>(phdr)->_hdrlen_rsvd_flags<sp/>=<sp/>(u16_t)(lwip_htons((u16_t)((len)<sp/><<<sp/>12)<sp/>|<sp/>(flags)))</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="89"><highlight class="normal"></highlight></codeline> <codeline lineno="90" refid="prot_2tcp_8h_1a42432f2dde6716ecb0087ccbc47cc75b" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPH_SET_FLAG(phdr,<sp/>flags<sp/>)<sp/>(phdr)->_hdrlen_rsvd_flags<sp/>=<sp/>((phdr)->_hdrlen_rsvd_flags<sp/>|<sp/>lwip_htons(flags))</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="91" refid="prot_2tcp_8h_1adc07c9186474e45d2fc40e9efc76d2ba" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TCPH_UNSET_FLAG(phdr,<sp/>flags)<sp/>(phdr)->_hdrlen_rsvd_flags<sp/>=<sp/>((phdr)->_hdrlen_rsvd_flags<sp/>&<sp/>~lwip_htons(flags))</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="92"><highlight class="normal"></highlight></codeline> <codeline lineno="93"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="94"><highlight class="normal">}</highlight></codeline> <codeline lineno="95"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="96"><highlight class="normal"></highlight></codeline> <codeline lineno="97"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HDR_PROT_TCP_H<sp/>*/</highlight><highlight class="preprocessor"></highlight></codeline> </programlisting> <location file="C:/Dev/git/UbixOS/sys/include/net/prot/tcp.h"/> </compounddef> </doxygen>