<?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="inet__chksum_8h" kind="file" language="C++"> <compoundname>inet_chksum.h</compoundname> <includes refid="opt_8h" local="yes">net/opt.h</includes> <includes refid="pbuf_8h" local="yes">net/pbuf.h</includes> <includes refid="ip__addr_8h" local="yes">net/ip_addr.h</includes> <includedby refid="inet__chksum_8c" local="yes">C:/Dev/git/UbixOS/sys/net/core/inet_chksum.c</includedby> <incdepgraph> <node id="17"> <label>stdarg.h</label> <link refid="stdarg_8h"/> </node> <node id="18"> <label>ubixos/kpanic.h</label> <link refid="kpanic_8h"/> </node> <node id="15"> <label>sys/io.h</label> <link refid="io_8h"/> </node> <node id="19"> <label>net/pbuf.h</label> <link refid="pbuf_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="20" 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="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="3"> <label>net/lwipopts.h</label> <link refid="lwipopts_8h"/> </node> <node id="6"> <label>sys/types.h</label> <link refid="include_2sys_2types_8h"/> <childnode refid="7" relation="include"> </childnode> <childnode refid="8" relation="include"> </childnode> </node> <node id="22"> <label>net/def.h</label> <link refid="def_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="2" 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="24"> <label>net/ip6_addr.h</label> <link refid="ip6__addr_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> </node> <node id="2"> <label>net/opt.h</label> <link refid="opt_8h"/> <childnode refid="3" relation="include"> </childnode> <childnode refid="4" relation="include"> </childnode> </node> <node id="16"> <label>lib/kprintf.h</label> <link refid="kprintf_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="17" relation="include"> </childnode> </node> <node id="4"> <label>net/debug.h</label> <link refid="debug_8h"/> <childnode refid="5" relation="include"> </childnode> <childnode refid="2" relation="include"> </childnode> </node> <node id="23"> <label>net/ip4_addr.h</label> <link refid="ip4__addr_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> </node> <node id="21"> <label>net/ip_addr.h</label> <link refid="ip__addr_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="22" relation="include"> </childnode> <childnode refid="23" relation="include"> </childnode> <childnode refid="24" relation="include"> </childnode> </node> <node id="9"> <label>sys/cdefs.h</label> <link refid="cdefs_8h"/> </node> <node id="14"> <label>ubixos/time.h</label> <link refid="time_8h"/> <childnode refid="6" relation="include"> </childnode> <childnode refid="10" relation="include"> </childnode> <childnode refid="15" relation="include"> </childnode> </node> <node id="7"> <label>sys/_types.h</label> <link refid="__types_8h"/> </node> <node id="20"> <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="1"> <label>C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h</label> <link refid="inet__chksum_8h"/> <childnode refid="2" relation="include"> </childnode> <childnode refid="19" relation="include"> </childnode> <childnode refid="21" relation="include"> </childnode> </node> <node id="11"> <label>sys/_timeval.h</label> <link refid="__timeval_8h"/> <childnode refid="7" relation="include"> </childnode> </node> </incdepgraph> <invincdepgraph> <node id="2"> <label>C:/Dev/git/UbixOS/sys/net/core/inet_chksum.c</label> <link refid="inet__chksum_8c"/> </node> <node id="1"> <label>C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h</label> <link refid="inet__chksum_8h"/> <childnode refid="2" relation="include"> </childnode> </node> </invincdepgraph> <sectiondef kind="define"> <memberdef kind="define" id="inet__chksum_8h_1a6ffe83b4bdd1784a0671ee4778966a01" prot="public" static="no"> <name>FOLD_U32T</name> <param><defname>u</defname></param> <initializer>(((u) >> 16) + ((u) & 0x0000ffffUL))</initializer> <briefdescription> </briefdescription> <detaileddescription> <para>Split an u32_t in two u16_ts and add them up </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" line="52" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" bodystart="52" bodyend="-1"/> </memberdef> <memberdef kind="define" id="inet__chksum_8h_1a8b8abbe02c3da468346b45f3d5a356a3" prot="public" static="no"> <name>LWIP_CHKSUM_COPY_ALGORITHM</name> <initializer>0</initializer> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" line="67" column="10" bodyfile="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" bodystart="67" bodyend="-1"/> </memberdef> <memberdef kind="define" id="inet__chksum_8h_1a0196bd603262882d16b5264b52eafe18" prot="public" static="no"> <name>SWAP_BYTES_IN_WORD</name> <param><defname>w</defname></param> <initializer>(((w) & 0xff) << 8) | (((w) & 0xff00) >> 8)</initializer> <briefdescription> </briefdescription> <detaileddescription> <para>Swap the bytes in an u16_t: much like <ref refid="def_8c_1ad637280639de4066392e6b5614fa3e56" kindref="member">lwip_htons()</ref> for little-endian </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" line="47" column="9" bodyfile="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" bodystart="47" bodyend="-1"/> </memberdef> </sectiondef> <sectiondef kind="func"> <memberdef kind="function" id="inet__chksum_8h_1a34f1aa1587562a09e11b704b51bab043" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref></type> <definition>u16_t inet_chksum</definition> <argsstring>(const void *dataptr, u16_t len)</argsstring> <name>inet_chksum</name> <param> <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> void *</type> <declname>dataptr</declname> </param> <param> <type><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref></type> <declname>len</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" line="74" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/core/inet_chksum.c" bodystart="555" bodyend="558" declfile="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" declline="74" declcolumn="7"/> <references refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" compoundref="pbuf_8h" startline="159">pbuf::len</references> <references refid="inet__chksum_8c_1adaaa51e3290b80f8f8f8b1d080f54c1e" compoundref="inet__chksum_8c" startline="57">LWIP_CHKSUM</references> </memberdef> <memberdef kind="function" id="inet__chksum_8h_1ab35967a50418358e194e8f80fdc3c865" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref></type> <definition>u16_t inet_chksum_pbuf</definition> <argsstring>(struct pbuf *p)</argsstring> <name>inet_chksum_pbuf</name> <param> <type>struct <ref refid="structpbuf" kindref="compound">pbuf</ref> *</type> <declname>p</declname> </param> <briefdescription> </briefdescription> <detaileddescription> <para>Calculate a checksum over a chain of pbufs (without pseudo-header, much like inet_chksum only pbufs are used).</para> <para><parameterlist kind="param"><parameteritem> <parameternamelist> <parametername>p</parametername> </parameternamelist> <parameterdescription> <para>pbuf chain over that the checksum should be calculated </para> </parameterdescription> </parameteritem> </parameterlist> <simplesect kind="return"><para>checksum (as u16_t) to be saved directly in the protocol header </para> </simplesect> </para> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" line="75" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/core/inet_chksum.c" bodystart="568" bodyend="589" declfile="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" declline="75" declcolumn="7"/> <references refid="inet__chksum_8h_1a6ffe83b4bdd1784a0671ee4778966a01" compoundref="inet__chksum_8h" startline="52">FOLD_U32T</references> <references refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" compoundref="pbuf_8h" startline="159">pbuf::len</references> <references refid="inet__chksum_8c_1adaaa51e3290b80f8f8f8b1d080f54c1e" compoundref="inet__chksum_8c" startline="57">LWIP_CHKSUM</references> <references refid="structpbuf_1a5e5763c94fd18d78937b0b58ce7df341" compoundref="pbuf_8h" startline="144">pbuf::next</references> <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references> <references refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" compoundref="pbuf_8h" startline="147">pbuf::payload</references> <references refid="inet__chksum_8h_1a0196bd603262882d16b5264b52eafe18" compoundref="inet__chksum_8h" startline="47">SWAP_BYTES_IN_WORD</references> </memberdef> <memberdef kind="function" id="inet__chksum_8h_1aa13cda42e7c262f5dee243ff6c28422f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref></type> <definition>u16_t ip_chksum_pseudo</definition> <argsstring>(struct pbuf *p, u8_t proto, u16_t proto_len, const ip_addr_t *src, const ip_addr_t *dest)</argsstring> <name>ip_chksum_pseudo</name> <param> <type>struct <ref refid="structpbuf" kindref="compound">pbuf</ref> *</type> <declname>p</declname> </param> <param> <type><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref></type> <declname>proto</declname> </param> <param> <type><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref></type> <declname>proto_len</declname> </param> <param> <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> <ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref> *</type> <declname>src</declname> </param> <param> <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> <ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref> *</type> <declname>dest</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" line="95" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/core/inet_chksum.c" bodystart="379" bodyend="395" declfile="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" declline="95" declcolumn="7"/> <references refid="ip__addr_8h_1a06e75bcd198012b5ba39480c233608bd" compoundref="ip__addr_8h" startline="301">ip_2_ip6</references> <references refid="ip__addr_8h_1a9bac7e938757f1d24df2404e8b57cb7d" compoundref="ip__addr_8h" startline="296">IP_IS_V6</references> </memberdef> <memberdef kind="function" id="inet__chksum_8h_1acfe7ab6c63ef998210c66bb4822b03b2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> <type><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref></type> <definition>u16_t ip_chksum_pseudo_partial</definition> <argsstring>(struct pbuf *p, u8_t proto, u16_t proto_len, u16_t chksum_len, const ip_addr_t *src, const ip_addr_t *dest)</argsstring> <name>ip_chksum_pseudo_partial</name> <param> <type>struct <ref refid="structpbuf" kindref="compound">pbuf</ref> *</type> <declname>p</declname> </param> <param> <type><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref></type> <declname>proto</declname> </param> <param> <type><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref></type> <declname>proto_len</declname> </param> <param> <type><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref></type> <declname>chksum_len</declname> </param> <param> <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> <ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref> *</type> <declname>src</declname> </param> <param> <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> <ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref> *</type> <declname>dest</declname> </param> <briefdescription> </briefdescription> <detaileddescription> </detaileddescription> <inbodydescription> </inbodydescription> <location file="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" line="97" column="7" bodyfile="C:/Dev/git/UbixOS/sys/net/core/inet_chksum.c" bodystart="526" bodyend="542" declfile="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h" declline="97" declcolumn="7"/> <references refid="ip__addr_8h_1a06e75bcd198012b5ba39480c233608bd" compoundref="ip__addr_8h" startline="301">ip_2_ip6</references> <references refid="ip__addr_8h_1a9bac7e938757f1d24df2404e8b57cb7d" compoundref="ip__addr_8h" startline="296">IP_IS_V6</references> </memberdef> </sectiondef> <briefdescription> </briefdescription> <detaileddescription> <para>IP checksum calculation functions </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_INET_CHKSUM_H</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="38"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_HDR_INET_CHKSUM_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="opt_8h" kindref="compound">net/opt.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">#include<sp/>"<ref refid="pbuf_8h" kindref="compound">net/pbuf.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="43"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"<ref refid="ip__addr_8h" kindref="compound">net/ip_addr.h</ref>"</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="44"><highlight class="normal"></highlight></codeline> <codeline lineno="46"><highlight class="preprocessor">#ifndef<sp/>SWAP_BYTES_IN_WORD</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="47" refid="inet__chksum_8h_1a0196bd603262882d16b5264b52eafe18" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>SWAP_BYTES_IN_WORD(w)<sp/>(((w)<sp/>&<sp/>0xff)<sp/><<<sp/>8)<sp/>|<sp/>(((w)<sp/>&<sp/>0xff00)<sp/>>><sp/>8)</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="48"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>SWAP_BYTES_IN_WORD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="49"><highlight class="normal"></highlight></codeline> <codeline lineno="51"><highlight class="preprocessor">#ifndef<sp/>FOLD_U32T</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="52" refid="inet__chksum_8h_1a6ffe83b4bdd1784a0671ee4778966a01" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>FOLD_U32T(u)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(((u)<sp/>>><sp/>16)<sp/>+<sp/>((u)<sp/>&<sp/>0x0000ffffUL))</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="54"><highlight class="normal"></highlight></codeline> <codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_CHECKSUM_ON_COPY</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="56"><highlight class="normal"></highlight></codeline> <codeline lineno="58"><highlight class="preprocessor">#<sp/>ifndef<sp/>LWIP_CHKSUM_COPY</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="59"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/>define<sp/>LWIP_CHKSUM_COPY(dst,<sp/>src,<sp/>len)<sp/>lwip_chksum_copy(dst,<sp/>src,<sp/>len)</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="60"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/>ifndef<sp/>LWIP_CHKSUM_COPY_ALGORITHM</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="61"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/><sp/>define<sp/>LWIP_CHKSUM_COPY_ALGORITHM<sp/>1</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="62"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/>endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CHKSUM_COPY_ALGORITHM<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="63"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/>else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CHKSUM_COPY<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="64"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/><sp/>define<sp/>LWIP_CHKSUM_COPY_ALGORITHM<sp/>0</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="65"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/>endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CHKSUM_COPY<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="66"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CHECKSUM_ON_COPY<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="67" refid="inet__chksum_8h_1a8b8abbe02c3da468346b45f3d5a356a3" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#<sp/>define<sp/>LWIP_CHKSUM_COPY_ALGORITHM<sp/>0</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="68"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CHECKSUM_ON_COPY<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="69"><highlight class="normal"></highlight></codeline> <codeline lineno="70"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="71"><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="72"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="73"><highlight class="normal"></highlight></codeline> <codeline lineno="74"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/><ref refid="inet__chksum_8h_1a34f1aa1587562a09e11b704b51bab043" kindref="member">inet_chksum</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*dataptr,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>len);</highlight></codeline> <codeline lineno="75"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/><ref refid="inet__chksum_8h_1ab35967a50418358e194e8f80fdc3c865" kindref="member">inet_chksum_pbuf</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p);</highlight></codeline> <codeline lineno="76"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_CHKSUM_COPY_ALGORITHM</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="77"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>lwip_chksum_copy(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*dst,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*src,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>len);</highlight></codeline> <codeline lineno="78"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_CHKSUM_COPY_ALGORITHM<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="79"><highlight class="normal"></highlight></codeline> <codeline lineno="80"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV4</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="81"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>inet_chksum_pseudo(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>proto,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>proto_len,</highlight></codeline> <codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip4_addr_t<sp/>*src,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip4_addr_t<sp/>*dest);</highlight></codeline> <codeline lineno="83"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>inet_chksum_pseudo_partial(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>proto,</highlight></codeline> <codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>proto_len,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>chksum_len,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip4_addr_t<sp/>*src,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip4_addr_t<sp/>*dest);</highlight></codeline> <codeline lineno="85"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV4<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="86"><highlight class="normal"></highlight></codeline> <codeline lineno="87"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="88"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>ip6_chksum_pseudo(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>proto,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>proto_len,</highlight></codeline> <codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip6_addr_t<sp/>*src,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip6_addr_t<sp/>*dest);</highlight></codeline> <codeline lineno="90"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>ip6_chksum_pseudo_partial(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>proto,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>proto_len,</highlight></codeline> <codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>chksum_len,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip6_addr_t<sp/>*src,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip6_addr_t<sp/>*dest);</highlight></codeline> <codeline lineno="92"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="93"><highlight class="normal"></highlight></codeline> <codeline lineno="94"><highlight class="normal"></highlight></codeline> <codeline lineno="95"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/><ref refid="inet__chksum_8h_1aa13cda42e7c262f5dee243ff6c28422f" kindref="member">ip_chksum_pseudo</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>proto,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>proto_len,</highlight></codeline> <codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref><sp/>*src,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref><sp/>*dest);</highlight></codeline> <codeline lineno="97"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/><ref refid="inet__chksum_8h_1acfe7ab6c63ef998210c66bb4822b03b2" kindref="member">ip_chksum_pseudo_partial</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>proto,<sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>proto_len,</highlight></codeline> <codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>chksum_len,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref><sp/>*src,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref><sp/>*dest);</highlight></codeline> <codeline lineno="99"><highlight class="normal"></highlight></codeline> <codeline lineno="100"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>__cplusplus</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="101"><highlight class="normal">}</highlight></codeline> <codeline lineno="102"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline> <codeline lineno="103"><highlight class="normal"></highlight></codeline> <codeline lineno="104"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_HDR_INET_H<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline> <codeline lineno="105"><highlight class="normal"></highlight></codeline> </programlisting> <location file="C:/Dev/git/UbixOS/sys/include/net/inet_chksum.h"/> </compounddef> </doxygen>