<?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="ip6_8c" kind="file" language="C++">
    <compoundname>ip6.c</compoundname>
    <includes refid="opt_8h" local="yes">net/opt.h</includes>
    <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="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="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="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="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="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/net/core/ipv6/ip6.c</label>
        <link refid="ip6_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
    </incdepgraph>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
<para>IPv6 layer. </para>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"></codeline>
<codeline lineno="7"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2010<sp/>Inico<sp/>Technologies<sp/>Ltd.</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="11"><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="12"><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="13"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="14"><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="15"><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="16"><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="17"><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="18"><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="19"><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="20"><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="21"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>``AS<sp/>IS&apos;&apos;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="23"><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="24"><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="25"><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="26"><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="27"><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="28"><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="29"><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="30"><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="31"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="32"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="33"><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="34"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="35"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Ivan<sp/>Delamer<sp/>&lt;delamer@inicotech.com&gt;</highlight></codeline>
<codeline lineno="36"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="37"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="38"><highlight class="comment"><sp/>*<sp/>Please<sp/>coordinate<sp/>changes<sp/>and<sp/>requests<sp/>with<sp/>Ivan<sp/>Delamer</highlight></codeline>
<codeline lineno="39"><highlight class="comment"><sp/>*<sp/>&lt;delamer@inicotech.com&gt;</highlight></codeline>
<codeline lineno="40"><highlight class="comment"><sp/>*/</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/>&quot;<ref refid="opt_8h" kindref="compound">net/opt.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6<sp/><sp/></highlight><highlight class="comment">/*<sp/>don&apos;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="45"><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="def_8h" kindref="compound">net/def.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="mem_8h" kindref="compound">net/mem.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="netif_8h" kindref="compound">net/netif.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip_8h" kindref="compound">net/ip.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip6_8h" kindref="compound">net/ip6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip6__addr_8h" kindref="compound">net/ip6_addr.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip6__frag_8h" kindref="compound">net/ip6_frag.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="icmp6_8h" kindref="compound">net/icmp6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="raw_8h" kindref="compound">net/raw.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="udp_8h" kindref="compound">net/udp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="tcp__priv_8h" kindref="compound">net/priv/tcp_priv.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="dhcp6_8h" kindref="compound">net/dhcp6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="nd6_8h" kindref="compound">net/nd6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="mld6_8h" kindref="compound">net/mld6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="debug_8h" kindref="compound">net/debug.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="stats_8h" kindref="compound">net/stats.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>LWIP_HOOK_FILENAME</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>LWIP_HOOK_FILENAME</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="83"><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetif" kindref="compound">netif</ref><sp/>*</highlight></codeline>
<codeline lineno="84"><highlight class="normal">ip6_route(</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="85"><highlight class="normal">{</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga9cd1d7891fe315de1201e2c6e45f4f57" kindref="member">s8_t</ref><sp/>i;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>single<sp/>netif<sp/>configuration,<sp/>fast<sp/>return.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>&amp;&amp;<sp/>(<ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>-&gt;<ref refid="structnetif_1ae77736b64df442242795220d76be6b86" kindref="member">next</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>))<sp/>{</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>)<sp/>||<sp/>!<ref refid="netif_8h_1a780be4c3fa9f7f2534f7865666c3a1b8" kindref="member">netif_is_link_up</ref>(<ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>))<sp/>{</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><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="93"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>;</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="96"><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Special<sp/>processing<sp/>for<sp/>link-local<sp/>addresses.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_islinklocal(dest))<sp/>{</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isany(src))<sp/>{</highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Use<sp/>default<sp/>netif,<sp/>if<sp/>Up.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref><sp/>||<sp/>!<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>)<sp/>||</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>!<ref refid="netif_8h_1a780be4c3fa9f7f2534f7865666c3a1b8" kindref="member">netif_is_link_up</ref>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>))<sp/>{</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><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="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>;</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Try<sp/>to<sp/>find<sp/>the<sp/>netif<sp/>for<sp/>the<sp/>source<sp/>address,<sp/>checking<sp/>that<sp/>link<sp/>is<sp/>up.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>;<sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;<sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1ae77736b64df442242795220d76be6b86" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>)<sp/>||<sp/>!<ref refid="netif_8h_1a780be4c3fa9f7f2534f7865666c3a1b8" kindref="member">netif_is_link_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>))<sp/>{</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_cmp(src,<sp/>netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="120"><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>netif<sp/>not<sp/>found,<sp/>use<sp/>default<sp/>netif,<sp/>if<sp/>up<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref><sp/>||<sp/>!<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>)<sp/>||</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>!<ref refid="netif_8h_1a780be4c3fa9f7f2534f7865666c3a1b8" kindref="member">netif_is_link_up</ref>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>))<sp/>{</highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/><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="125"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>;</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="128"><highlight class="normal"></highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>we<sp/>come<sp/>here<sp/>for<sp/>non-link-local<sp/>addresses<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>LWIP_HOOK_IP6_ROUTE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>LWIP_HOOK_IP6_ROUTE(src,<sp/>dest);</highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>See<sp/>if<sp/>the<sp/>destination<sp/>subnet<sp/>matches<sp/>a<sp/>configured<sp/>address.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>;<sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;<sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1ae77736b64df442242795220d76be6b86" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>)<sp/>||<sp/>!<ref refid="netif_8h_1a780be4c3fa9f7f2534f7865666c3a1b8" kindref="member">netif_is_link_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>))<sp/>{</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_netcmp(dest,<sp/>netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="149"><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>the<sp/>netif<sp/>for<sp/>a<sp/>suitable<sp/>router.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>nd6_find_route(dest);</highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="structnetif" kindref="compound">netif</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>&amp;&amp;<sp/><ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>)<sp/>&amp;&amp;<sp/><ref refid="netif_8h_1a780be4c3fa9f7f2534f7865666c3a1b8" kindref="member">netif_is_link_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>))<sp/>{</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>try<sp/>with<sp/>the<sp/>netif<sp/>that<sp/>matches<sp/>the<sp/>source<sp/>address.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!ip6_addr_isany(src))<sp/>{</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>;<sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;<sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1ae77736b64df442242795220d76be6b86" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>)<sp/>||<sp/>!<ref refid="netif_8h_1a780be4c3fa9f7f2534f7865666c3a1b8" kindref="member">netif_is_link_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>))<sp/>{</highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">continue</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_cmp(src,<sp/>netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="169"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="170"><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_NETIF_LOOPBACK<sp/>&amp;&amp;<sp/>!LWIP_HAVE_LOOPIF</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>loopif<sp/>is<sp/>disabled,<sp/>loopback<sp/>traffic<sp/>is<sp/>passed<sp/>through<sp/>any<sp/>netif<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isloopback(dest))<sp/>{</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>don&apos;t<sp/>check<sp/>for<sp/>link<sp/>on<sp/>loopback<sp/>traffic<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref><sp/>&amp;&amp;<sp/><ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>))<sp/>{</highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>;</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>default<sp/>netif<sp/>is<sp/>not<sp/>up,<sp/>just<sp/>use<sp/>any<sp/>netif<sp/>for<sp/>loopback<sp/>traffic<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>;<sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;<sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1ae77736b64df442242795220d76be6b86" kindref="member">next</ref>)<sp/>{</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>))<sp/>{</highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="184"><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="185"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_NETIF_LOOPBACK<sp/>&amp;&amp;<sp/>!LWIP_HAVE_LOOPIF<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"></highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>no<sp/>matching<sp/>netif<sp/>found,<sp/>use<sp/>default<sp/>netif,<sp/>if<sp/>up<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>||<sp/>!<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>)<sp/>||<sp/>!<ref refid="netif_8h_1a780be4c3fa9f7f2534f7865666c3a1b8" kindref="member">netif_is_link_up</ref>(<ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>))<sp/>{</highlight></codeline>
<codeline lineno="190"><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="191"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="netif_8h_1a3d0925cbce550ed461907aee816713ba" kindref="member">netif_default</ref>;</highlight></codeline>
<codeline lineno="193"><highlight class="normal">}</highlight></codeline>
<codeline lineno="194"><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="ip__addr_8h_1a88b43639738c4de2d3cd22e3a1fd7696" kindref="member">ip_addr_t</ref><sp/>*</highlight></codeline>
<codeline lineno="207"><highlight class="normal">ip6_select_source_address(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structnetif" kindref="compound">netif</ref>,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip6_addr_t<sp/>*dest)</highlight></codeline>
<codeline lineno="208"><highlight class="normal">{</highlight></codeline>
<codeline lineno="209"><highlight class="normal"><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/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>i;</highlight></codeline>
<codeline lineno="211"><highlight class="normal"></highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>dest<sp/>is<sp/>link-local,<sp/>choose<sp/>a<sp/>link-local<sp/>source.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_islinklocal(dest)<sp/>||<sp/>ip6_addr_ismulticast_linklocal(dest)<sp/>||<sp/>ip6_addr_ismulticast_iflocal(dest))<sp/>{</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_islinklocal(netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>netif_ip_addr6(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i);</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="221"><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Choose<sp/>a<sp/>site-local<sp/>with<sp/>matching<sp/>prefix.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_issitelocal(dest)<sp/>||<sp/>ip6_addr_ismulticast_sitelocal(dest))<sp/>{</highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_issitelocal(netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_netcmp(dest,<sp/>netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>netif_ip_addr6(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i);</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="232"><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Choose<sp/>a<sp/>unique-local<sp/>with<sp/>matching<sp/>prefix.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isuniquelocal(dest)<sp/>||<sp/>ip6_addr_ismulticast_orglocal(dest))<sp/>{</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_isuniquelocal(netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_netcmp(dest,<sp/>netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>netif_ip_addr6(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="243"><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Choose<sp/>a<sp/>global<sp/>with<sp/>best<sp/>matching<sp/>prefix.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isglobal(dest)<sp/>||<sp/>ip6_addr_ismulticast_global(dest))<sp/>{</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_isglobal(netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(src<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>src<sp/>=<sp/>netif_ip_addr6(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i);</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Replace<sp/>src<sp/>only<sp/>if<sp/>we<sp/>find<sp/>a<sp/>prefix<sp/>match.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>@todo<sp/>find<sp/>longest<sp/>matching<sp/>prefix.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((!(ip6_addr_netcmp(<ref refid="ip__addr_8h_1a06e75bcd198012b5ba39480c233608bd" kindref="member">ip_2_ip6</ref>(src),<sp/>dest)))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_netcmp(netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i),<sp/>dest))<sp/>{</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>src<sp/>=<sp/>netif_ip_addr6(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i);</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(src<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>src;</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="266"><highlight class="normal"></highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Last<sp/>resort:<sp/>see<sp/>if<sp/>arbitrary<sp/>prefix<sp/>matches.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_netcmp(dest,<sp/>netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>netif_ip_addr6(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i);</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/>}</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/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="276"><highlight class="normal">}</highlight></codeline>
<codeline lineno="277"><highlight class="normal"></highlight></codeline>
<codeline lineno="278"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6_FORWARD</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="279"><highlight class="normal"></highlight></codeline>
<codeline lineno="288"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="289"><highlight class="normal">ip6_forward(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*iphdr,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>*inp)</highlight></codeline>
<codeline lineno="290"><highlight class="normal">{</highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="292"><highlight class="normal"></highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>do<sp/>not<sp/>forward<sp/>link-local<sp/>or<sp/>loopback<sp/>addresses<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_islinklocal(ip6_current_dest_addr())<sp/>||</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_isloopback(ip6_current_dest_addr()))<sp/>{</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_forward:<sp/>not<sp/>forwarding<sp/>link-local<sp/>address.\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.rterr);</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</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/></highlight><highlight class="comment">/*<sp/>Find<sp/>network<sp/>interface<sp/>where<sp/>to<sp/>forward<sp/>this<sp/>IP<sp/>packet<sp/>to.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>ip6_route(IP6_ADDR_ANY6,<sp/>ip6_current_dest_addr());</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_forward:<sp/>no<sp/>route<sp/>for<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK1(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK2(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK3(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK4(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="310"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK5(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK6(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK7(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK8(ip6_current_dest_addr())));</highlight></codeline>
<codeline lineno="314"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_ICMP6</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Don&apos;t<sp/>send<sp/>ICMP<sp/>messages<sp/>in<sp/>response<sp/>to<sp/>ICMP<sp/>messages<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="prot_2ip6_8h_1a11009a147aa680a6a486ded85382aff1" kindref="member">IP6H_NEXTH</ref>(iphdr)<sp/>!=<sp/><ref refid="prot_2ip6_8h_1ab277ee09b6e7200fc1cfe28482b886a6" kindref="member">IP6_NEXTH_ICMP6</ref>)<sp/>{</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>icmp6_dest_unreach(p,<sp/><ref refid="prot_2icmp6_8h_1a11fe21b0a8c1bc73ee887a96bf416ccfa695bb4d92f32b504a9483ff137235a78" kindref="member">ICMP6_DUR_NO_ROUTE</ref>);</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="319"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_ICMP6<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.rterr);</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Do<sp/>not<sp/>forward<sp/>packets<sp/>onto<sp/>the<sp/>same<sp/>network<sp/>interface<sp/>on<sp/>which</highlight></codeline>
<codeline lineno="325"><highlight class="comment"><sp/><sp/><sp/>*<sp/>they<sp/>arrived.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>==<sp/>inp)<sp/>{</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_forward:<sp/>not<sp/>bouncing<sp/>packets<sp/>back<sp/>on<sp/>incoming<sp/>interface.\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.rterr);</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="332"><highlight class="normal"></highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>decrement<sp/>HL<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><ref refid="prot_2ip6_8h_1aaa72852834526961a3fb2cbc07fe602d" kindref="member">IP6H_HOPLIM_SET</ref>(iphdr,<sp/><ref refid="prot_2ip6_8h_1a4f8209d53443b50770e57426d027de28" kindref="member">IP6H_HOPLIM</ref>(iphdr)<sp/>-<sp/>1);</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>send<sp/>ICMP6<sp/>if<sp/>HL<sp/>==<sp/>0<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="prot_2ip6_8h_1a4f8209d53443b50770e57426d027de28" kindref="member">IP6H_HOPLIM</ref>(iphdr)<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="337"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_ICMP6</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Don&apos;t<sp/>send<sp/>ICMP<sp/>messages<sp/>in<sp/>response<sp/>to<sp/>ICMP<sp/>messages<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="prot_2ip6_8h_1a11009a147aa680a6a486ded85382aff1" kindref="member">IP6H_NEXTH</ref>(iphdr)<sp/>!=<sp/><ref refid="prot_2ip6_8h_1ab277ee09b6e7200fc1cfe28482b886a6" kindref="member">IP6_NEXTH_ICMP6</ref>)<sp/>{</highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>icmp6_time_exceeded(p,<sp/><ref refid="prot_2icmp6_8h_1ad06bbf4ee72635ece968db41cbe6869eacccbb5e776df1b35af4149e593240880" kindref="member">ICMP6_TE_HL</ref>);</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="342"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_ICMP6<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="346"><highlight class="normal"></highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1aca7d56b4e0f822b0ced2885f222b8d48" kindref="member">mtu</ref><sp/>&amp;&amp;<sp/>(p-&gt;<ref refid="structpbuf_1a5259e7ec29bab9c0999b64f2e86b411f" kindref="member">tot_len</ref><sp/>&gt;<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1aca7d56b4e0f822b0ced2885f222b8d48" kindref="member">mtu</ref>))<sp/>{</highlight></codeline>
<codeline lineno="348"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_ICMP6</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Don&apos;t<sp/>send<sp/>ICMP<sp/>messages<sp/>in<sp/>response<sp/>to<sp/>ICMP<sp/>messages<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="prot_2ip6_8h_1a11009a147aa680a6a486ded85382aff1" kindref="member">IP6H_NEXTH</ref>(iphdr)<sp/>!=<sp/><ref refid="prot_2ip6_8h_1ab277ee09b6e7200fc1cfe28482b886a6" kindref="member">IP6_NEXTH_ICMP6</ref>)<sp/>{</highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>icmp6_packet_too_big(p,<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1aca7d56b4e0f822b0ced2885f222b8d48" kindref="member">mtu</ref>);</highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="353"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_ICMP6<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="357"><highlight class="normal"></highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_forward:<sp/>forwarding<sp/>packet<sp/>to<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK1(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK2(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK3(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK4(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK5(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK6(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK7(ip6_current_dest_addr()),</highlight></codeline>
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK8(ip6_current_dest_addr())));</highlight></codeline>
<codeline lineno="367"><highlight class="normal"></highlight></codeline>
<codeline lineno="368"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>transmit<sp/>pbuf<sp/>on<sp/>chosen<sp/>interface<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="369"><highlight class="normal"><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;output_ip6(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>p,<sp/>ip6_current_dest_addr());</highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.fw);</highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.xmit);</highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="373"><highlight class="normal">}</highlight></codeline>
<codeline lineno="374"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_FORWARD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="375"><highlight class="normal"></highlight></codeline>
<codeline lineno="390"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="391"><highlight class="normal">ip6_input(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>*inp)</highlight></codeline>
<codeline lineno="392"><highlight class="normal">{</highlight></codeline>
<codeline lineno="393"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*ip6hdr;</highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>nexth;</highlight></codeline>
<codeline lineno="396"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref><sp/>hlen;<sp/></highlight><highlight class="comment">/*<sp/>the<sp/>current<sp/>header<sp/>length<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>i;</highlight></codeline>
<codeline lineno="398"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>0<sp/></highlight><highlight class="comment">/*IP_ACCEPT_LINK_LAYER_ADDRESSING*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/>@todo</highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>check_ip_src=1;</highlight></codeline>
<codeline lineno="401"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>IP_ACCEPT_LINK_LAYER_ADDRESSING<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="402"><highlight class="normal"></highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.recv);</highlight></codeline>
<codeline lineno="404"><highlight class="normal"></highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>identify<sp/>the<sp/>IP<sp/>header<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/>ip6hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/>if<sp/>(<ref refid="prot_2ip6_8h_1a90f24cf50dee93e0729a1fc1d05374e3" kindref="member">IP6H_V</ref>(ip6hdr)<sp/>!=<sp/>6)<sp/>{</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga77c491e468bf7d9a1bc48430c1866a96" kindref="member">LWIP_DBG_LEVEL_WARNING</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;IPv6<sp/>packet<sp/>dropped<sp/>due<sp/>to<sp/>bad<sp/>version<sp/>number<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gad8b0a364e95b07cb0c47709fdc6037d6" kindref="member">U32_F</ref></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1a90f24cf50dee93e0729a1fc1d05374e3" kindref="member">IP6H_V</ref>(ip6hdr)));</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.err);</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><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="414"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="415"><highlight class="normal"></highlight></codeline>
<codeline lineno="416"><highlight class="normal"></highlight><highlight class="preprocessor">#ifdef<sp/>LWIP_HOOK_IP6_INPUT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(LWIP_HOOK_IP6_INPUT(p,<sp/>inp))<sp/>{</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>the<sp/>packet<sp/>has<sp/>been<sp/>eaten<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><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="420"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="421"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="422"><highlight class="normal"></highlight></codeline>
<codeline lineno="423"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>header<sp/>length<sp/>exceeds<sp/>first<sp/>pbuf<sp/>length,<sp/>or<sp/>ip<sp/>length<sp/>exceeds<sp/>total<sp/>pbuf<sp/>length?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref><sp/>&gt;<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>)<sp/>||<sp/>((<ref refid="prot_2ip6_8h_1ac672706ee00b07f263dad7dcf116d351" kindref="member">IP6H_PLEN</ref>(ip6hdr)<sp/>+<sp/><ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>)<sp/>&gt;<sp/>p-&gt;<ref refid="structpbuf_1a5259e7ec29bab9c0999b64f2e86b411f" kindref="member">tot_len</ref>))<sp/>{</highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref><sp/>&gt;<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>)<sp/>{</highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,</highlight></codeline>
<codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;IPv6<sp/>header<sp/>(len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;)<sp/>does<sp/>not<sp/>fit<sp/>in<sp/>first<sp/>pbuf<sp/>(len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;),<sp/>IP<sp/>packet<sp/>dropped.\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)<ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>,<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>));</highlight></codeline>
<codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((<ref refid="prot_2ip6_8h_1ac672706ee00b07f263dad7dcf116d351" kindref="member">IP6H_PLEN</ref>(ip6hdr)<sp/>+<sp/><ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>)<sp/>&gt;<sp/>p-&gt;<ref refid="structpbuf_1a5259e7ec29bab9c0999b64f2e86b411f" kindref="member">tot_len</ref>)<sp/>{</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,</highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;IPv6<sp/>(plen<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;)<sp/>is<sp/>longer<sp/>than<sp/>pbuf<sp/>(len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;),<sp/>IP<sp/>packet<sp/>dropped.\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)(<ref refid="prot_2ip6_8h_1ac672706ee00b07f263dad7dcf116d351" kindref="member">IP6H_PLEN</ref>(ip6hdr)<sp/>+<sp/><ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>),<sp/>p-&gt;<ref refid="structpbuf_1a5259e7ec29bab9c0999b64f2e86b411f" kindref="member">tot_len</ref>));</highlight></codeline>
<codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>free<sp/>(drop)<sp/>packet<sp/>pbufs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.lenerr);</highlight></codeline>
<codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="439"><highlight class="normal"><sp/><sp/><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="440"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="441"><highlight class="normal"></highlight></codeline>
<codeline lineno="442"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Trim<sp/>pbuf.<sp/>This<sp/>should<sp/>have<sp/>been<sp/>done<sp/>at<sp/>the<sp/>netif<sp/>layer,</highlight></codeline>
<codeline lineno="443"><highlight class="comment"><sp/><sp/><sp/>*<sp/>but<sp/>we&apos;ll<sp/>do<sp/>it<sp/>anyway<sp/>just<sp/>to<sp/>be<sp/>sure<sp/>that<sp/>its<sp/>done.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="444"><highlight class="normal"><sp/><sp/><ref refid="group__pbuf_1ga50abfe830a33a1a47a562febee66015d" kindref="member">pbuf_realloc</ref>(p,<sp/><ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref><sp/>+<sp/><ref refid="prot_2ip6_8h_1ac672706ee00b07f263dad7dcf116d351" kindref="member">IP6H_PLEN</ref>(ip6hdr));</highlight></codeline>
<codeline lineno="445"><highlight class="normal"></highlight></codeline>
<codeline lineno="446"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>copy<sp/>IP<sp/>addresses<sp/>to<sp/>aligned<sp/>ip6_addr_t<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="447"><highlight class="normal"><sp/><sp/><ref refid="ip__addr_8h_1abe6f7908ce8a91dc587e2ebc2172e651" kindref="member">ip_addr_copy_from_ip6</ref>(<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a0b4e54250c692c638408de54593d2aa1" kindref="member">current_iphdr_dest</ref>,<sp/>ip6hdr-&gt;dest);</highlight></codeline>
<codeline lineno="448"><highlight class="normal"><sp/><sp/><ref refid="ip__addr_8h_1abe6f7908ce8a91dc587e2ebc2172e651" kindref="member">ip_addr_copy_from_ip6</ref>(<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a04d85a3dc2c417050b3e088fa58a74b0" kindref="member">current_iphdr_src</ref>,<sp/>ip6hdr-&gt;src);</highlight></codeline>
<codeline lineno="449"><highlight class="normal"></highlight></codeline>
<codeline lineno="450"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Don&apos;t<sp/>accept<sp/>virtual<sp/>IPv4<sp/>mapped<sp/>IPv6<sp/>addresses.</highlight></codeline>
<codeline lineno="451"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Don&apos;t<sp/>accept<sp/>multicast<sp/>source<sp/>addresses.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="452"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isipv4mappedipv6(<ref refid="ip__addr_8h_1a06e75bcd198012b5ba39480c233608bd" kindref="member">ip_2_ip6</ref>(&amp;<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a0b4e54250c692c638408de54593d2aa1" kindref="member">current_iphdr_dest</ref>))<sp/>||</highlight></codeline>
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>ip6_addr_isipv4mappedipv6(<ref refid="ip__addr_8h_1a06e75bcd198012b5ba39480c233608bd" kindref="member">ip_2_ip6</ref>(&amp;<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a04d85a3dc2c417050b3e088fa58a74b0" kindref="member">current_iphdr_src</ref>))<sp/>||</highlight></codeline>
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>ip6_addr_ismulticast(<ref refid="ip__addr_8h_1a06e75bcd198012b5ba39480c233608bd" kindref="member">ip_2_ip6</ref>(&amp;<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a04d85a3dc2c417050b3e088fa58a74b0" kindref="member">current_iphdr_src</ref>)))<sp/>{</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.err);</highlight></codeline>
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><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="458"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="459"><highlight class="normal"></highlight></codeline>
<codeline lineno="460"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>current<sp/>header<sp/>pointer.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="461"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.current_ip6_header<sp/>=<sp/>ip6hdr;</highlight></codeline>
<codeline lineno="462"><highlight class="normal"></highlight></codeline>
<codeline lineno="463"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>In<sp/>netif,<sp/>used<sp/>in<sp/>case<sp/>we<sp/>need<sp/>to<sp/>send<sp/>ICMPv6<sp/>packets<sp/>back.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a7803dc5950d143e4433a0df689989bab" kindref="member">current_netif</ref><sp/>=<sp/>inp;</highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a7da899c663b1d560b61d92ba6d544701" kindref="member">current_input_netif</ref><sp/>=<sp/>inp;</highlight></codeline>
<codeline lineno="466"><highlight class="normal"></highlight></codeline>
<codeline lineno="467"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>match<sp/>packet<sp/>against<sp/>an<sp/>interface,<sp/>i.e.<sp/>is<sp/>this<sp/>packet<sp/>for<sp/>us?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_ismulticast(ip6_current_dest_addr()))<sp/>{</highlight></codeline>
<codeline lineno="469"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Always<sp/>joined<sp/>to<sp/>multicast<sp/>if-local<sp/>and<sp/>link-local<sp/>all-nodes<sp/>group.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="470"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isallnodes_iflocal(ip6_current_dest_addr())<sp/>||</highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_isallnodes_linklocal(ip6_current_dest_addr()))<sp/>{</highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>inp;</highlight></codeline>
<codeline lineno="473"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="474"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6_MLD</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(mld6_lookfor_group(inp,<sp/>ip6_current_dest_addr()))<sp/>{</highlight></codeline>
<codeline lineno="476"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>inp;</highlight></codeline>
<codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="478"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_MLD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="479"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_issolicitednode(ip6_current_dest_addr()))<sp/>{</highlight></codeline>
<codeline lineno="480"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Filter<sp/>solicited<sp/>node<sp/>packets<sp/>when<sp/>MLD<sp/>is<sp/>not<sp/>enabled</highlight></codeline>
<codeline lineno="481"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>(for<sp/>Neighbor<sp/>discovery).<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(inp,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_cmp_solicitednode(ip6_current_dest_addr(),<sp/>netif_ip6_addr(inp,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>inp;</highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>solicited<sp/>node<sp/>packet<sp/>accepted<sp/>on<sp/>interface<sp/>%c%c\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1a32fca6ffd28bb9af3f891a378827a67e" kindref="member">name</ref>[0],<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1a32fca6ffd28bb9af3f891a378827a67e" kindref="member">name</ref>[1]));</highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="492"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="493"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_MLD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="496"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>start<sp/>trying<sp/>with<sp/>inp.<sp/>if<sp/>that&apos;s<sp/>not<sp/>acceptable,<sp/>start<sp/>walking<sp/>the</highlight></codeline>
<codeline lineno="499"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>list<sp/>of<sp/>configured<sp/>netifs.</highlight></codeline>
<codeline lineno="500"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>&apos;first&apos;<sp/>is<sp/>used<sp/>as<sp/>a<sp/>boolean<sp/>to<sp/>mark<sp/>whether<sp/>we<sp/>started<sp/>walking<sp/>the<sp/>list<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="501"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>first<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="502"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>inp;</highlight></codeline>
<codeline lineno="503"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="504"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>interface<sp/>is<sp/>up?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__netif_1ga94a4c24c988afc0a577387730f303b19" kindref="member">netif_is_up</ref>(<ref refid="structnetif" kindref="compound">netif</ref>))<sp/>{</highlight></codeline>
<codeline lineno="506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>unicast<sp/>to<sp/>this<sp/>interface<sp/>address?<sp/>address<sp/>configured?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="509"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_cmp(ip6_current_dest_addr(),<sp/>netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="510"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>exit<sp/>outer<sp/>loop<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>netif_found;</highlight></codeline>
<codeline lineno="512"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="513"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="514"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="515"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(first)<sp/>{</highlight></codeline>
<codeline lineno="516"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_islinklocal(ip6_current_dest_addr())</highlight></codeline>
<codeline lineno="517"><highlight class="normal">#</highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>!<ref refid="lwipopts_8h_1a724a0ea765d5a47d026d529725f31c01" kindref="member">LWIP_NETIF_LOOPBACK</ref><sp/>||<sp/><ref refid="lwipopts_8h_1aa2b1f736373cd896e212644aa453fbaf" kindref="member">LWIP_HAVE_LOOPIF</ref></highlight></codeline>
<codeline lineno="518"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>||<sp/>ip6_addr_isloopback(ip6_current_dest_addr())</highlight></codeline>
<codeline lineno="519"><highlight class="normal">#endif<sp/></highlight><highlight class="comment">/*<sp/>!LWIP_NETIF_LOOPBACK<sp/>||<sp/>LWIP_HAVE_LOOPIF<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>)<sp/>{</highlight></codeline>
<codeline lineno="521"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Do<sp/>not<sp/>match<sp/>link-local<sp/>addresses<sp/>to<sp/>other<sp/>netifs.<sp/>The<sp/>loopback</highlight></codeline>
<codeline lineno="522"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>address<sp/>is<sp/>to<sp/>be<sp/>considered<sp/>link-local<sp/>and<sp/>packets<sp/>to<sp/>it<sp/>should<sp/>be</highlight></codeline>
<codeline lineno="523"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>dropped<sp/>on<sp/>other<sp/>interfaces,<sp/>as<sp/>per<sp/>RFC<sp/>4291<sp/>Sec.<sp/>2.5.3.<sp/>This</highlight></codeline>
<codeline lineno="524"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>requirement<sp/>cannot<sp/>be<sp/>implemented<sp/>in<sp/>the<sp/>case<sp/>that<sp/>loopback</highlight></codeline>
<codeline lineno="525"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>traffic<sp/>is<sp/>sent<sp/>across<sp/>a<sp/>non-loopback<sp/>interface,<sp/>however.</highlight></codeline>
<codeline lineno="526"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="527"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="528"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="529"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>first<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>;</highlight></codeline>
<codeline lineno="532"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1ae77736b64df442242795220d76be6b86" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="535"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>==<sp/>inp)<sp/>{</highlight></codeline>
<codeline lineno="536"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1ae77736b64df442242795220d76be6b86" kindref="member">next</ref>;</highlight></codeline>
<codeline lineno="537"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="538"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="539"><highlight class="normal">netif_found:</highlight></codeline>
<codeline lineno="540"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>packet<sp/>accepted<sp/>on<sp/>interface<sp/>%c%c\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="541"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>?<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1a32fca6ffd28bb9af3f891a378827a67e" kindref="member">name</ref>[0]<sp/>:<sp/></highlight><highlight class="charliteral">&apos;X&apos;</highlight><highlight class="normal">,<sp/><ref refid="structnetif" kindref="compound">netif</ref>?<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1a32fca6ffd28bb9af3f891a378827a67e" kindref="member">name</ref>[1]<sp/>:<sp/></highlight><highlight class="charliteral">&apos;X&apos;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="542"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="543"><highlight class="normal"></highlight></codeline>
<codeline lineno="544"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>&quot;::&quot;<sp/>packet<sp/>source<sp/>address?<sp/>(used<sp/>in<sp/>duplicate<sp/>address<sp/>detection)<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="545"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isany(ip6_current_src_addr())<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>(!ip6_addr_issolicitednode(ip6_current_dest_addr())))<sp/>{</highlight></codeline>
<codeline lineno="547"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>packet<sp/>source<sp/>is<sp/>not<sp/>valid<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="548"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>free<sp/>(drop)<sp/>packet<sp/>pbufs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="549"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>packet<sp/>with<sp/>src<sp/>ANY_ADDRESS<sp/>dropped\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="550"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="551"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="552"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ip6_input_cleanup;</highlight></codeline>
<codeline lineno="553"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="554"><highlight class="normal"></highlight></codeline>
<codeline lineno="555"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>packet<sp/>not<sp/>for<sp/>us?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="556"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="557"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>packet<sp/>not<sp/>for<sp/>us,<sp/>route<sp/>or<sp/>discard<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="558"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>packet<sp/>not<sp/>for<sp/>us.\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="559"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6_FORWARD</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="560"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>non-multicast<sp/>packet?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="561"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!ip6_addr_ismulticast(ip6_current_dest_addr()))<sp/>{</highlight></codeline>
<codeline lineno="562"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>try<sp/>to<sp/>forward<sp/>IP<sp/>packet<sp/>on<sp/>(other)<sp/>interfaces<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="563"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ip6_forward(p,<sp/>ip6hdr,<sp/>inp);</highlight></codeline>
<codeline lineno="564"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="565"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_FORWARD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="566"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="567"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ip6_input_cleanup;</highlight></codeline>
<codeline lineno="568"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="569"><highlight class="normal"></highlight></codeline>
<codeline lineno="570"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>current<sp/>netif<sp/>pointer.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="571"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a7803dc5950d143e4433a0df689989bab" kindref="member">current_netif</ref><sp/>=<sp/><ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="572"><highlight class="normal"></highlight></codeline>
<codeline lineno="573"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Save<sp/>next<sp/>header<sp/>type.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="574"><highlight class="normal"><sp/><sp/>nexth<sp/>=<sp/><ref refid="prot_2ip6_8h_1a11009a147aa680a6a486ded85382aff1" kindref="member">IP6H_NEXTH</ref>(ip6hdr);</highlight></codeline>
<codeline lineno="575"><highlight class="normal"></highlight></codeline>
<codeline lineno="576"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Init<sp/>header<sp/>length.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="577"><highlight class="normal"><sp/><sp/>hlen<sp/>=<sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref><sp/>=<sp/><ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>;</highlight></codeline>
<codeline lineno="578"><highlight class="normal"></highlight></codeline>
<codeline lineno="579"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Move<sp/>to<sp/>payload.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="580"><highlight class="normal"><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-<ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>);</highlight></codeline>
<codeline lineno="581"><highlight class="normal"></highlight></codeline>
<codeline lineno="582"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Process<sp/>known<sp/>option<sp/>extension<sp/>headers,<sp/>if<sp/>present.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="583"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(nexth<sp/>!=<sp/><ref refid="prot_2ip6_8h_1a654fbd4bb77707859b16f6935f2ba4c7" kindref="member">IP6_NEXTH_NONE</ref>)</highlight></codeline>
<codeline lineno="584"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="585"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(nexth)<sp/>{</highlight></codeline>
<codeline lineno="586"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1a27db49d05c2230c085c04e766267ed38" kindref="member">IP6_NEXTH_HOPBYHOP</ref>:</highlight></codeline>
<codeline lineno="587"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>packet<sp/>with<sp/>Hop-by-Hop<sp/>options<sp/>header\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="588"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>next<sp/>header<sp/>type.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="589"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nexth<sp/>=<sp/>*((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>);</highlight></codeline>
<codeline lineno="590"><highlight class="normal"></highlight></codeline>
<codeline lineno="591"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>the<sp/>header<sp/>length.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="592"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hlen<sp/>=<sp/>8<sp/>*<sp/>(1<sp/>+<sp/>*((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref><sp/>+<sp/>1));</highlight></codeline>
<codeline lineno="593"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref><sp/>+=<sp/>hlen;</highlight></codeline>
<codeline lineno="594"><highlight class="normal"></highlight></codeline>
<codeline lineno="595"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Skip<sp/>over<sp/>this<sp/>header.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="596"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hlen<sp/>&gt;<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>)<sp/>{</highlight></codeline>
<codeline lineno="597"><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_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,</highlight></codeline>
<codeline lineno="598"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;IPv6<sp/>options<sp/>header<sp/>(hlen<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;)<sp/>does<sp/>not<sp/>fit<sp/>in<sp/>first<sp/>pbuf<sp/>(len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;),<sp/>IPv6<sp/>packet<sp/>dropped.\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="599"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hlen,<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>));</highlight></codeline>
<codeline lineno="600"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>free<sp/>(drop)<sp/>packet<sp/>pbufs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.lenerr);</highlight></codeline>
<codeline lineno="603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ip6_input_cleanup;</highlight></codeline>
<codeline lineno="605"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="606"><highlight class="normal"></highlight></codeline>
<codeline lineno="607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-(<ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref>)hlen);</highlight></codeline>
<codeline lineno="608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="609"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1af01cb063f723d79e1c34a8e95a93a2c0" kindref="member">IP6_NEXTH_DESTOPTS</ref>:</highlight></codeline>
<codeline lineno="610"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>packet<sp/>with<sp/>Destination<sp/>options<sp/>header\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="611"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>next<sp/>header<sp/>type.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="612"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nexth<sp/>=<sp/>*((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>);</highlight></codeline>
<codeline lineno="613"><highlight class="normal"></highlight></codeline>
<codeline lineno="614"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>the<sp/>header<sp/>length.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="615"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hlen<sp/>=<sp/>8<sp/>*<sp/>(1<sp/>+<sp/>*((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref><sp/>+<sp/>1));</highlight></codeline>
<codeline lineno="616"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref><sp/>+=<sp/>hlen;</highlight></codeline>
<codeline lineno="617"><highlight class="normal"></highlight></codeline>
<codeline lineno="618"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Skip<sp/>over<sp/>this<sp/>header.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="619"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hlen<sp/>&gt;<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>)<sp/>{</highlight></codeline>
<codeline lineno="620"><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_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,</highlight></codeline>
<codeline lineno="621"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;IPv6<sp/>options<sp/>header<sp/>(hlen<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;)<sp/>does<sp/>not<sp/>fit<sp/>in<sp/>first<sp/>pbuf<sp/>(len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;),<sp/>IPv6<sp/>packet<sp/>dropped.\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="622"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hlen,<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>));</highlight></codeline>
<codeline lineno="623"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>free<sp/>(drop)<sp/>packet<sp/>pbufs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="624"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="625"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.lenerr);</highlight></codeline>
<codeline lineno="626"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="627"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ip6_input_cleanup;</highlight></codeline>
<codeline lineno="628"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="629"><highlight class="normal"></highlight></codeline>
<codeline lineno="630"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-(<ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref>)hlen);</highlight></codeline>
<codeline lineno="631"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="632"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1a4d9e6542b73b17c81b56808e1ffd5b27" kindref="member">IP6_NEXTH_ROUTING</ref>:</highlight></codeline>
<codeline lineno="633"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>packet<sp/>with<sp/>Routing<sp/>header\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="634"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>next<sp/>header<sp/>type.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="635"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nexth<sp/>=<sp/>*((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>);</highlight></codeline>
<codeline lineno="636"><highlight class="normal"></highlight></codeline>
<codeline lineno="637"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>the<sp/>header<sp/>length.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="638"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hlen<sp/>=<sp/>8<sp/>*<sp/>(1<sp/>+<sp/>*((<ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref><sp/>+<sp/>1));</highlight></codeline>
<codeline lineno="639"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref><sp/>+=<sp/>hlen;</highlight></codeline>
<codeline lineno="640"><highlight class="normal"></highlight></codeline>
<codeline lineno="641"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Skip<sp/>over<sp/>this<sp/>header.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="642"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(hlen<sp/>&gt;<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>)<sp/>{</highlight></codeline>
<codeline lineno="643"><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_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,</highlight></codeline>
<codeline lineno="644"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;IPv6<sp/>options<sp/>header<sp/>(hlen<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;)<sp/>does<sp/>not<sp/>fit<sp/>in<sp/>first<sp/>pbuf<sp/>(len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;),<sp/>IPv6<sp/>packet<sp/>dropped.\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="645"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hlen,<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>));</highlight></codeline>
<codeline lineno="646"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>free<sp/>(drop)<sp/>packet<sp/>pbufs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="647"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="648"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.lenerr);</highlight></codeline>
<codeline lineno="649"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="650"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ip6_input_cleanup;</highlight></codeline>
<codeline lineno="651"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="652"><highlight class="normal"></highlight></codeline>
<codeline lineno="653"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-(<ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref>)hlen);</highlight></codeline>
<codeline lineno="654"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="655"><highlight class="normal"></highlight></codeline>
<codeline lineno="656"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1a1a72bdc1494ea84cbf16424e9aedcd79" kindref="member">IP6_NEXTH_FRAGMENT</ref>:</highlight></codeline>
<codeline lineno="657"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="658"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__frag__hdr" kindref="compound">ip6_frag_hdr</ref><sp/>*frag_hdr;</highlight></codeline>
<codeline lineno="659"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>packet<sp/>with<sp/>Fragment<sp/>header\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="660"><highlight class="normal"></highlight></codeline>
<codeline lineno="661"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>frag_hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__frag__hdr" kindref="compound">ip6_frag_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="662"><highlight class="normal"></highlight></codeline>
<codeline lineno="663"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Get<sp/>next<sp/>header<sp/>type.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="664"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nexth<sp/>=<sp/>frag_hdr-&gt;_nexth;</highlight></codeline>
<codeline lineno="665"><highlight class="normal"></highlight></codeline>
<codeline lineno="666"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Fragment<sp/>Header<sp/>length.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="667"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>hlen<sp/>=<sp/>8;</highlight></codeline>
<codeline lineno="668"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref><sp/>+=<sp/>hlen;</highlight></codeline>
<codeline lineno="669"><highlight class="normal"></highlight></codeline>
<codeline lineno="670"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Make<sp/>sure<sp/>this<sp/>header<sp/>fits<sp/>in<sp/>current<sp/>pbuf.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="671"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>if<sp/>(hlen<sp/>&gt;<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>)<sp/>{</highlight></codeline>
<codeline lineno="672"><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_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,</highlight></codeline>
<codeline lineno="673"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;IPv6<sp/>options<sp/>header<sp/>(hlen<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;)<sp/>does<sp/>not<sp/>fit<sp/>in<sp/>first<sp/>pbuf<sp/>(len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;),<sp/>IPv6<sp/>packet<sp/>dropped.\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="674"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hlen,<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>));</highlight></codeline>
<codeline lineno="675"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>free<sp/>(drop)<sp/>packet<sp/>pbufs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="676"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="677"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1ac74aa05083bf4034fe2cc1efd5fde36c" kindref="member">IP6_FRAG_STATS_INC</ref>(ip6_frag.lenerr);</highlight></codeline>
<codeline lineno="678"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1ac74aa05083bf4034fe2cc1efd5fde36c" kindref="member">IP6_FRAG_STATS_INC</ref>(ip6_frag.drop);</highlight></codeline>
<codeline lineno="679"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ip6_input_cleanup;</highlight></codeline>
<codeline lineno="680"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="681"><highlight class="normal"></highlight></codeline>
<codeline lineno="682"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Offset<sp/>==<sp/>0<sp/>and<sp/>more_fragments<sp/>==<sp/>0?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="683"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((frag_hdr-&gt;_fragment_offset<sp/>&amp;</highlight></codeline>
<codeline lineno="684"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="def_8h_1a0dfd02d7c09f9c698a5a7ecc0b7287ad" kindref="member">PP_HTONS</ref>(<ref refid="prot_2ip6_8h_1a4ada75ee94d08af1a0d2656e6d14d7d9" kindref="member">IP6_FRAG_OFFSET_MASK</ref><sp/>|<sp/><ref refid="prot_2ip6_8h_1a4e60dc945c0061d3d4dc4a84132a506b" kindref="member">IP6_FRAG_MORE_FLAG</ref>))<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="685"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>This<sp/>is<sp/>a<sp/>1-fragment<sp/>packet,<sp/>usually<sp/>a<sp/>packet<sp/>that<sp/>we<sp/>have</highlight></codeline>
<codeline lineno="686"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>already<sp/>reassembled.<sp/>Skip<sp/>this<sp/>header<sp/>anc<sp/>continue.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="687"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-(<ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref>)hlen);</highlight></codeline>
<codeline lineno="688"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="689"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6_REASS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="690"><highlight class="normal"></highlight></codeline>
<codeline lineno="691"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>reassemble<sp/>the<sp/>packet<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="692"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>p<sp/>=<sp/>ip6_reass(p);</highlight></codeline>
<codeline lineno="693"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>packet<sp/>not<sp/>fully<sp/>reassembled<sp/>yet?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="694"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(p<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="695"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ip6_input_cleanup;</highlight></codeline>
<codeline lineno="696"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="697"><highlight class="normal"></highlight></codeline>
<codeline lineno="698"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Returned<sp/>p<sp/>point<sp/>to<sp/>IPv6<sp/>header.</highlight></codeline>
<codeline lineno="699"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>Update<sp/>all<sp/>our<sp/>variables<sp/>and<sp/>pointers<sp/>and<sp/>continue.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="700"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="701"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nexth<sp/>=<sp/><ref refid="prot_2ip6_8h_1a11009a147aa680a6a486ded85382aff1" kindref="member">IP6H_NEXTH</ref>(ip6hdr);</highlight></codeline>
<codeline lineno="702"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>hlen<sp/>=<sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref><sp/>=<sp/><ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>;</highlight></codeline>
<codeline lineno="703"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-<ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>);</highlight></codeline>
<codeline lineno="704"><highlight class="normal"></highlight></codeline>
<codeline lineno="705"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_REASS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="706"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>free<sp/>(drop)<sp/>packet<sp/>pbufs<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="707"><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_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>packet<sp/>with<sp/>Fragment<sp/>header<sp/>dropped<sp/>(with<sp/>LWIP_IPV6_REASS==0)\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="708"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="709"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.opterr);</highlight></codeline>
<codeline lineno="710"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="711"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>ip6_input_cleanup;</highlight></codeline>
<codeline lineno="712"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_REASS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="713"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="714"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="715"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="716"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="717"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>options_done;</highlight></codeline>
<codeline lineno="718"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="719"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="720"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="721"><highlight class="normal">options_done:</highlight></codeline>
<codeline lineno="722"><highlight class="normal"></highlight></codeline>
<codeline lineno="723"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>p<sp/>points<sp/>to<sp/>IPv6<sp/>header<sp/>again.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="724"><highlight class="normal"><sp/><sp/><ref refid="pbuf_8h_1a27480c41c34021d4417691d327163626" kindref="member">pbuf_header_force</ref>(p,<sp/>(<ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref>)<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref>);</highlight></codeline>
<codeline lineno="725"><highlight class="normal"></highlight></codeline>
<codeline lineno="726"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>send<sp/>to<sp/>upper<sp/>layers<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="727"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="728"><highlight class="normal"><sp/><sp/>ip6_debug_print(p);</highlight></codeline>
<codeline lineno="729"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>p-&gt;len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>p-&gt;tot_len<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">,<sp/>p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref>,<sp/>p-&gt;<ref refid="structpbuf_1a5259e7ec29bab9c0999b64f2e86b411f" kindref="member">tot_len</ref>));</highlight></codeline>
<codeline lineno="730"><highlight class="normal"></highlight></codeline>
<codeline lineno="731"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_RAW</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="732"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>raw<sp/>input<sp/>did<sp/>not<sp/>eat<sp/>the<sp/>packet?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="733"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(raw_input(p,<sp/>inp)<sp/>==<sp/>0)</highlight></codeline>
<codeline lineno="734"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_RAW<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="735"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="736"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(nexth)<sp/>{</highlight></codeline>
<codeline lineno="737"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1a654fbd4bb77707859b16f6935f2ba4c7" kindref="member">IP6_NEXTH_NONE</ref>:</highlight></codeline>
<codeline lineno="738"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="739"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="740"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_UDP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="741"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1a0159bb5b3af8ea1e203d543c0f3c17c2" kindref="member">IP6_NEXTH_UDP</ref>:</highlight></codeline>
<codeline lineno="742"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_UDPLITE</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="743"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1a6e4afde135c71a3b194b68add3d9138c" kindref="member">IP6_NEXTH_UDPLITE</ref>:</highlight></codeline>
<codeline lineno="744"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_UDPLITE<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="745"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Point<sp/>to<sp/>payload.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="746"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-(<ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref>)<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref>);</highlight></codeline>
<codeline lineno="747"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>udp_input(p,<sp/>inp);</highlight></codeline>
<codeline lineno="748"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="749"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_UDP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="750"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="751"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1a748b24c4f1ae5bbeecaa34e066cb3f8c" kindref="member">IP6_NEXTH_TCP</ref>:</highlight></codeline>
<codeline lineno="752"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Point<sp/>to<sp/>payload.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="753"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-(<ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref>)<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref>);</highlight></codeline>
<codeline lineno="754"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tcp_input(p,<sp/>inp);</highlight></codeline>
<codeline lineno="755"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="756"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="757"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_ICMP6</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="758"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2ip6_8h_1ab277ee09b6e7200fc1cfe28482b886a6" kindref="member">IP6_NEXTH_ICMP6</ref>:</highlight></codeline>
<codeline lineno="759"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Point<sp/>to<sp/>payload.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="760"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/>-(<ref refid="group__compiler__abstraction_1gacf46f4df0ebab84edebcb69967fdf86b" kindref="member">s16_t</ref>)<ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref>);</highlight></codeline>
<codeline lineno="761"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>icmp6_input(p,<sp/>inp);</highlight></codeline>
<codeline lineno="762"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="763"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_ICMP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="764"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="765"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_ICMP6</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="766"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>send<sp/>ICMP<sp/>parameter<sp/>problem<sp/>unless<sp/>it<sp/>was<sp/>a<sp/>multicast<sp/>or<sp/>ICMPv6<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="767"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((!ip6_addr_ismulticast(ip6_current_dest_addr()))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="768"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<ref refid="prot_2ip6_8h_1a11009a147aa680a6a486ded85382aff1" kindref="member">IP6H_NEXTH</ref>(ip6hdr)<sp/>!=<sp/><ref refid="prot_2ip6_8h_1ab277ee09b6e7200fc1cfe28482b886a6" kindref="member">IP6_NEXTH_ICMP6</ref>))<sp/>{</highlight></codeline>
<codeline lineno="769"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>icmp6_param_problem(p,<sp/><ref refid="prot_2icmp6_8h_1a3a817e777ebcfd705e8e5a1b4c5ae023acbcc58901e2345ffc31df4098de60ff8" kindref="member">ICMP6_PP_HEADER</ref>,<sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref><sp/>-<sp/>hlen);</highlight></codeline>
<codeline lineno="770"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="771"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_ICMP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="772"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_input:<sp/>Unsupported<sp/>transport<sp/>protocol<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">,<sp/>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)<ref refid="prot_2ip6_8h_1a11009a147aa680a6a486ded85382aff1" kindref="member">IP6H_NEXTH</ref>(ip6hdr)));</highlight></codeline>
<codeline lineno="773"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__pbuf_1gab0dd696fb4b6bc65e548944584f1738b" kindref="member">pbuf_free</ref>(p);</highlight></codeline>
<codeline lineno="774"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.proterr);</highlight></codeline>
<codeline lineno="775"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.drop);</highlight></codeline>
<codeline lineno="776"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="777"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="778"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="779"><highlight class="normal"></highlight></codeline>
<codeline lineno="780"><highlight class="normal">ip6_input_cleanup:</highlight></codeline>
<codeline lineno="781"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a7803dc5950d143e4433a0df689989bab" kindref="member">current_netif</ref><sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="782"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a7da899c663b1d560b61d92ba6d544701" kindref="member">current_input_netif</ref><sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="783"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.current_ip6_header<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="784"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1ac944fb6564f181bc90bc7c2b8b00d94c" kindref="member">ip_data</ref>.<ref refid="structip__globals_1a17004526e6f1a164c0bab01aeac5e34a" kindref="member">current_ip_header_tot_len</ref><sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="785"><highlight class="normal"><sp/><sp/>ip6_addr_set_zero(ip6_current_src_addr());</highlight></codeline>
<codeline lineno="786"><highlight class="normal"><sp/><sp/>ip6_addr_set_zero(ip6_current_dest_addr());</highlight></codeline>
<codeline lineno="787"><highlight class="normal"></highlight></codeline>
<codeline lineno="788"><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="789"><highlight class="normal">}</highlight></codeline>
<codeline lineno="790"><highlight class="normal"></highlight></codeline>
<codeline lineno="791"><highlight class="normal"></highlight></codeline>
<codeline lineno="816"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="817"><highlight class="normal">ip6_output_if(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<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="818"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>hl,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>tc,</highlight></codeline>
<codeline lineno="819"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>nexth,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structnetif" kindref="compound">netif</ref>)</highlight></codeline>
<codeline lineno="820"><highlight class="normal">{</highlight></codeline>
<codeline lineno="821"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ip6_addr_t<sp/>*src_used<sp/>=<sp/>src;</highlight></codeline>
<codeline lineno="822"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dest<sp/>!=<sp/><ref refid="ip_8h_1a2b7dff1859ced5f2be3fc3da231819d7" kindref="member">LWIP_IP_HDRINCL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="823"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(src<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref><sp/>&amp;&amp;<sp/>ip6_addr_isany(src))<sp/>{</highlight></codeline>
<codeline lineno="824"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>src_used<sp/>=<sp/><ref refid="ip__addr_8h_1a06e75bcd198012b5ba39480c233608bd" kindref="member">ip_2_ip6</ref>(ip6_select_source_address(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>dest));</highlight></codeline>
<codeline lineno="825"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((src_used<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>||<sp/>ip6_addr_isany(src_used))<sp/>{</highlight></codeline>
<codeline lineno="826"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>No<sp/>appropriate<sp/>source<sp/>address<sp/>was<sp/>found<sp/>for<sp/>this<sp/>packet.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="827"><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_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_output:<sp/>No<sp/>suitable<sp/>source<sp/>address<sp/>for<sp/>packet.\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="828"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.rterr);</highlight></codeline>
<codeline lineno="829"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadca9448893187313c0c5a502ca9a9ad1c2a" kindref="member">ERR_RTE</ref>;</highlight></codeline>
<codeline lineno="830"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="831"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="832"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="833"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ip6_output_if_src(p,<sp/>src_used,<sp/>dest,<sp/>hl,<sp/>tc,<sp/>nexth,<sp/><ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="834"><highlight class="normal">}</highlight></codeline>
<codeline lineno="835"><highlight class="normal"></highlight></codeline>
<codeline lineno="840"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="841"><highlight class="normal">ip6_output_if_src(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<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="842"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>hl,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>tc,</highlight></codeline>
<codeline lineno="843"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>nexth,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structnetif" kindref="compound">netif</ref>)</highlight></codeline>
<codeline lineno="844"><highlight class="normal">{</highlight></codeline>
<codeline lineno="845"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*ip6hdr;</highlight></codeline>
<codeline lineno="846"><highlight class="normal"><sp/><sp/>ip6_addr_t<sp/>dest_addr;</highlight></codeline>
<codeline lineno="847"><highlight class="normal"></highlight></codeline>
<codeline lineno="848"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1a355679dba1c0d8ef07ce3abcd28e3063" kindref="member">LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX</ref>(p);</highlight></codeline>
<codeline lineno="849"><highlight class="normal"></highlight></codeline>
<codeline lineno="850"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Should<sp/>the<sp/>IPv6<sp/>header<sp/>be<sp/>generated<sp/>or<sp/>is<sp/>it<sp/>already<sp/>included<sp/>in<sp/>p?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="851"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dest<sp/>!=<sp/><ref refid="ip_8h_1a2b7dff1859ced5f2be3fc3da231819d7" kindref="member">LWIP_IP_HDRINCL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="852"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>generate<sp/>IPv6<sp/>header<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="853"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/><ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>))<sp/>{</highlight></codeline>
<codeline lineno="854"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga0269bdc51f1e8a5ecf9af72c6e1c996c" kindref="member">LWIP_DBG_LEVEL_SERIOUS</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_output:<sp/>not<sp/>enough<sp/>room<sp/>for<sp/>IPv6<sp/>header<sp/>in<sp/>pbuf\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="855"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.err);</highlight></codeline>
<codeline lineno="856"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadca05c91366f1b5203a5db9a241b415cd63" kindref="member">ERR_BUF</ref>;</highlight></codeline>
<codeline lineno="857"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="858"><highlight class="normal"></highlight></codeline>
<codeline lineno="859"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="860"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;check<sp/>that<sp/>first<sp/>pbuf<sp/>can<sp/>hold<sp/>struct<sp/>ip6_hdr&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="861"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(p-&gt;<ref refid="structpbuf_1a6f82449625e36e294f5d210268c0703f" kindref="member">len</ref><sp/>&gt;=<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref>)));</highlight></codeline>
<codeline lineno="862"><highlight class="normal"></highlight></codeline>
<codeline lineno="863"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1aaa72852834526961a3fb2cbc07fe602d" kindref="member">IP6H_HOPLIM_SET</ref>(ip6hdr,<sp/>hl);</highlight></codeline>
<codeline lineno="864"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1a85d62e6278b0bed9e3b88df777be612c" kindref="member">IP6H_NEXTH_SET</ref>(ip6hdr,<sp/>nexth);</highlight></codeline>
<codeline lineno="865"><highlight class="normal"></highlight></codeline>
<codeline lineno="866"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>dest<sp/>cannot<sp/>be<sp/>NULL<sp/>here<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="867"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6_addr_copy(ip6hdr-&gt;dest,<sp/>*dest);</highlight></codeline>
<codeline lineno="868"><highlight class="normal"></highlight></codeline>
<codeline lineno="869"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1a932e7c887bb04691075a8c36c61736e4" kindref="member">IP6H_VTCFL_SET</ref>(ip6hdr,<sp/>6,<sp/>tc,<sp/>0);</highlight></codeline>
<codeline lineno="870"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1a2d727ccfecc56fb1e35ea4f7249f399b" kindref="member">IP6H_PLEN_SET</ref>(ip6hdr,<sp/>p-&gt;<ref refid="structpbuf_1a5259e7ec29bab9c0999b64f2e86b411f" kindref="member">tot_len</ref><sp/>-<sp/><ref refid="prot_2ip6_8h_1afb4c1dc527be76d8f27591dfb726c023" kindref="member">IP6_HLEN</ref>);</highlight></codeline>
<codeline lineno="871"><highlight class="normal"></highlight></codeline>
<codeline lineno="872"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(src<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="873"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>src<sp/>=<sp/>IP6_ADDR_ANY6;</highlight></codeline>
<codeline lineno="874"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="875"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>src<sp/>cannot<sp/>be<sp/>NULL<sp/>here<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="876"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6_addr_copy(ip6hdr-&gt;src,<sp/>*src);</highlight></codeline>
<codeline lineno="877"><highlight class="normal"></highlight></codeline>
<codeline lineno="878"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="879"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>IP<sp/>header<sp/>already<sp/>included<sp/>in<sp/>p<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="880"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="881"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6_addr_copy(dest_addr,<sp/>ip6hdr-&gt;dest);</highlight></codeline>
<codeline lineno="882"><highlight class="normal"><sp/><sp/><sp/><sp/>dest<sp/>=<sp/>&amp;dest_addr;</highlight></codeline>
<codeline lineno="883"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="884"><highlight class="normal"></highlight></codeline>
<codeline lineno="885"><highlight class="normal"><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.xmit);</highlight></codeline>
<codeline lineno="886"><highlight class="normal"></highlight></codeline>
<codeline lineno="887"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_output_if:<sp/>%c%c%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">,<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1a32fca6ffd28bb9af3f891a378827a67e" kindref="member">name</ref>[0],<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1a32fca6ffd28bb9af3f891a378827a67e" kindref="member">name</ref>[1],<sp/>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)<ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1ab7ef01e505dd2feb781fe86756b1c973" kindref="member">num</ref>));</highlight></codeline>
<codeline lineno="888"><highlight class="normal"><sp/><sp/>ip6_debug_print(p);</highlight></codeline>
<codeline lineno="889"><highlight class="normal"></highlight></codeline>
<codeline lineno="890"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>ENABLE_LOOPBACK</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="891"><highlight class="normal"><sp/><sp/>{</highlight></codeline>
<codeline lineno="892"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="893"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!LWIP_HAVE_LOOPIF</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="894"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isloopback(dest))<sp/>{</highlight></codeline>
<codeline lineno="895"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>netif_loop_output(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>p);</highlight></codeline>
<codeline lineno="896"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="897"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!LWIP_HAVE_LOOPIF<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="898"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/><ref refid="lwipopts_8h_1a16c1b672604bfb0a66a6aeeb854589d3" kindref="member">LWIP_IPV6_NUM_ADDRESSES</ref>;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="899"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip6_addr_isvalid(netif_ip6_addr_state(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i))<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="900"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip6_addr_cmp(dest,<sp/>netif_ip6_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>i)))<sp/>{</highlight></codeline>
<codeline lineno="901"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Packet<sp/>to<sp/>self,<sp/>enqueue<sp/>it<sp/>for<sp/>loopback<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="902"><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_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;netif_loop_output()\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="903"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>netif_loop_output(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>p);</highlight></codeline>
<codeline lineno="904"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="905"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="906"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="907"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>ENABLE_LOOPBACK<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="908"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6_FRAG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="909"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>don&apos;t<sp/>fragment<sp/>if<sp/>interface<sp/>has<sp/>mtu<sp/>set<sp/>to<sp/>0<sp/>[loopif]<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="910"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1aca7d56b4e0f822b0ced2885f222b8d48" kindref="member">mtu</ref><sp/>&amp;&amp;<sp/>(p-&gt;<ref refid="structpbuf_1a5259e7ec29bab9c0999b64f2e86b411f" kindref="member">tot_len</ref><sp/>&gt;<sp/>nd6_get_destination_mtu(dest,<sp/><ref refid="structnetif" kindref="compound">netif</ref>)))<sp/>{</highlight></codeline>
<codeline lineno="911"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ip6_frag(p,<sp/><ref refid="structnetif" kindref="compound">netif</ref>,<sp/>dest);</highlight></codeline>
<codeline lineno="912"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="913"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_FRAG<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="914"><highlight class="normal"></highlight></codeline>
<codeline lineno="915"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;netif-&gt;output_ip6()\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="916"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;output_ip6(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>p,<sp/>dest);</highlight></codeline>
<codeline lineno="917"><highlight class="normal">}</highlight></codeline>
<codeline lineno="918"><highlight class="normal"></highlight></codeline>
<codeline lineno="937"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="938"><highlight class="normal">ip6_output(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<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="939"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>hl,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>tc,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>nexth)</highlight></codeline>
<codeline lineno="940"><highlight class="normal">{</highlight></codeline>
<codeline lineno="941"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="942"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*ip6hdr;</highlight></codeline>
<codeline lineno="943"><highlight class="normal"><sp/><sp/>ip6_addr_t<sp/>src_addr,<sp/>dest_addr;</highlight></codeline>
<codeline lineno="944"><highlight class="normal"></highlight></codeline>
<codeline lineno="945"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1a355679dba1c0d8ef07ce3abcd28e3063" kindref="member">LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX</ref>(p);</highlight></codeline>
<codeline lineno="946"><highlight class="normal"></highlight></codeline>
<codeline lineno="947"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dest<sp/>!=<sp/><ref refid="ip_8h_1a2b7dff1859ced5f2be3fc3da231819d7" kindref="member">LWIP_IP_HDRINCL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="948"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>ip6_route(src,<sp/>dest);</highlight></codeline>
<codeline lineno="949"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="950"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>IP<sp/>header<sp/>included<sp/>in<sp/>p,<sp/>read<sp/>addresses.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="951"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="952"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6_addr_copy(src_addr,<sp/>ip6hdr-&gt;src);</highlight></codeline>
<codeline lineno="953"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6_addr_copy(dest_addr,<sp/>ip6hdr-&gt;dest);</highlight></codeline>
<codeline lineno="954"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>ip6_route(&amp;src_addr,<sp/>&amp;dest_addr);</highlight></codeline>
<codeline lineno="955"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="956"><highlight class="normal"></highlight></codeline>
<codeline lineno="957"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="958"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_output:<sp/>no<sp/>route<sp/>for<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="959"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK1(dest),</highlight></codeline>
<codeline lineno="960"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK2(dest),</highlight></codeline>
<codeline lineno="961"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK3(dest),</highlight></codeline>
<codeline lineno="962"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK4(dest),</highlight></codeline>
<codeline lineno="963"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK5(dest),</highlight></codeline>
<codeline lineno="964"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK6(dest),</highlight></codeline>
<codeline lineno="965"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK7(dest),</highlight></codeline>
<codeline lineno="966"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK8(dest)));</highlight></codeline>
<codeline lineno="967"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.rterr);</highlight></codeline>
<codeline lineno="968"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadca9448893187313c0c5a502ca9a9ad1c2a" kindref="member">ERR_RTE</ref>;</highlight></codeline>
<codeline lineno="969"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="970"><highlight class="normal"></highlight></codeline>
<codeline lineno="971"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>ip6_output_if(p,<sp/>src,<sp/>dest,<sp/>hl,<sp/>tc,<sp/>nexth,<sp/><ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="972"><highlight class="normal">}</highlight></codeline>
<codeline lineno="973"><highlight class="normal"></highlight></codeline>
<codeline lineno="974"><highlight class="normal"></highlight></codeline>
<codeline lineno="975"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_NETIF_HWADDRHINT</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="976"><highlight class="normal"></highlight></codeline>
<codeline lineno="995"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="996"><highlight class="normal">ip6_output_hinted(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p,<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="997"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>hl,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>tc,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>nexth,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>*addr_hint)</highlight></codeline>
<codeline lineno="998"><highlight class="normal">{</highlight></codeline>
<codeline lineno="999"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structnetif" kindref="compound">netif</ref><sp/>*<ref refid="structnetif" kindref="compound">netif</ref>;</highlight></codeline>
<codeline lineno="1000"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*ip6hdr;</highlight></codeline>
<codeline lineno="1001"><highlight class="normal"><sp/><sp/>ip6_addr_t<sp/>src_addr,<sp/>dest_addr;</highlight></codeline>
<codeline lineno="1002"><highlight class="normal"><sp/><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>err;</highlight></codeline>
<codeline lineno="1003"><highlight class="normal"></highlight></codeline>
<codeline lineno="1004"><highlight class="normal"><sp/><sp/><ref refid="ip_8h_1a355679dba1c0d8ef07ce3abcd28e3063" kindref="member">LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX</ref>(p);</highlight></codeline>
<codeline lineno="1005"><highlight class="normal"></highlight></codeline>
<codeline lineno="1006"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(dest<sp/>!=<sp/><ref refid="ip_8h_1a2b7dff1859ced5f2be3fc3da231819d7" kindref="member">LWIP_IP_HDRINCL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1007"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>ip6_route(src,<sp/>dest);</highlight></codeline>
<codeline lineno="1008"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="1009"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>IP<sp/>header<sp/>included<sp/>in<sp/>p,<sp/>read<sp/>addresses.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1010"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="1011"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6_addr_copy(src_addr,<sp/>ip6hdr-&gt;src);</highlight></codeline>
<codeline lineno="1012"><highlight class="normal"><sp/><sp/><sp/><sp/>ip6_addr_copy(dest_addr,<sp/>ip6hdr-&gt;dest);</highlight></codeline>
<codeline lineno="1013"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structnetif" kindref="compound">netif</ref><sp/>=<sp/>ip6_route(&amp;src_addr,<sp/>&amp;dest_addr);</highlight></codeline>
<codeline lineno="1014"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="1015"><highlight class="normal"></highlight></codeline>
<codeline lineno="1016"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="structnetif" kindref="compound">netif</ref><sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="1017"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_output:<sp/>no<sp/>route<sp/>for<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;:%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1ga1418f92673e54a36b6e376109e526382" kindref="member">X16_F</ref></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1018"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK1(dest),</highlight></codeline>
<codeline lineno="1019"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK2(dest),</highlight></codeline>
<codeline lineno="1020"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK3(dest),</highlight></codeline>
<codeline lineno="1021"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK4(dest),</highlight></codeline>
<codeline lineno="1022"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK5(dest),</highlight></codeline>
<codeline lineno="1023"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK6(dest),</highlight></codeline>
<codeline lineno="1024"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK7(dest),</highlight></codeline>
<codeline lineno="1025"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK8(dest)));</highlight></codeline>
<codeline lineno="1026"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.rterr);</highlight></codeline>
<codeline lineno="1027"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadca9448893187313c0c5a502ca9a9ad1c2a" kindref="member">ERR_RTE</ref>;</highlight></codeline>
<codeline lineno="1028"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="1029"><highlight class="normal"></highlight></codeline>
<codeline lineno="1030"><highlight class="normal"><sp/><sp/><ref refid="netif_8h_1ae1c22f1dab74a84d9e31316fd5fdfa11" kindref="member">NETIF_SET_HWADDRHINT</ref>(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>addr_hint);</highlight></codeline>
<codeline lineno="1031"><highlight class="normal"><sp/><sp/>err<sp/>=<sp/>ip6_output_if(p,<sp/>src,<sp/>dest,<sp/>hl,<sp/>tc,<sp/>nexth,<sp/><ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="1032"><highlight class="normal"><sp/><sp/><ref refid="netif_8h_1ae1c22f1dab74a84d9e31316fd5fdfa11" kindref="member">NETIF_SET_HWADDRHINT</ref>(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="1033"><highlight class="normal"></highlight></codeline>
<codeline lineno="1034"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>err;</highlight></codeline>
<codeline lineno="1035"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1036"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_NETIF_HWADDRHINT*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1037"><highlight class="normal"></highlight></codeline>
<codeline lineno="1038"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6_MLD</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1039"><highlight class="normal"></highlight></codeline>
<codeline lineno="1049"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="1050"><highlight class="normal">ip6_options_add_hbh_ra(</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/>nexth,<sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>value)</highlight></codeline>
<codeline lineno="1051"><highlight class="normal">{</highlight></codeline>
<codeline lineno="1052"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hbh__hdr" kindref="compound">ip6_hbh_hdr</ref><sp/>*hbh_hdr;</highlight></codeline>
<codeline lineno="1053"><highlight class="normal"></highlight></codeline>
<codeline lineno="1054"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Move<sp/>pointer<sp/>to<sp/>make<sp/>room<sp/>for<sp/>hop-by-hop<sp/>options<sp/>header.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1055"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="pbuf_8h_1aaa17c1951cf2d207b6adfd3947d91f00" kindref="member">pbuf_header</ref>(p,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structip6__hbh__hdr" kindref="compound">ip6_hbh_hdr</ref>)))<sp/>{</highlight></codeline>
<codeline lineno="1056"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;ip6_options:<sp/>no<sp/>space<sp/>for<sp/>options<sp/>header\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="1057"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="stats_8h_1af38ba685afe9de39bd971c83b443ea37" kindref="member">IP6_STATS_INC</ref>(ip6.err);</highlight></codeline>
<codeline lineno="1058"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadca05c91366f1b5203a5db9a241b415cd63" kindref="member">ERR_BUF</ref>;</highlight></codeline>
<codeline lineno="1059"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="1060"><highlight class="normal"></highlight></codeline>
<codeline lineno="1061"><highlight class="normal"><sp/><sp/>hbh_hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hbh__hdr" kindref="compound">ip6_hbh_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="1062"><highlight class="normal"></highlight></codeline>
<codeline lineno="1063"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>fields.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1064"><highlight class="normal"><sp/><sp/>hbh_hdr-&gt;_nexth<sp/>=<sp/>nexth;</highlight></codeline>
<codeline lineno="1065"><highlight class="normal"><sp/><sp/>hbh_hdr-&gt;_hlen<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="1066"><highlight class="normal"><sp/><sp/>hbh_hdr-&gt;_ra_opt_type<sp/>=<sp/><ref refid="prot_2ip6_8h_1a02ac672111b898fe0ab527329b05ce57" kindref="member">IP6_ROUTER_ALERT_OPTION</ref>;</highlight></codeline>
<codeline lineno="1067"><highlight class="normal"><sp/><sp/>hbh_hdr-&gt;_ra_opt_dlen<sp/>=<sp/>2;</highlight></codeline>
<codeline lineno="1068"><highlight class="normal"><sp/><sp/>hbh_hdr-&gt;_ra_opt_data<sp/>=<sp/>value;</highlight></codeline>
<codeline lineno="1069"><highlight class="normal"><sp/><sp/>hbh_hdr-&gt;_padn_opt_type<sp/>=<sp/><ref refid="prot_2ip6_8h_1a42b8fada1fa942926239b86f91c11e03" kindref="member">IP6_PADN_ALERT_OPTION</ref>;</highlight></codeline>
<codeline lineno="1070"><highlight class="normal"><sp/><sp/>hbh_hdr-&gt;_padn_opt_dlen<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="1071"><highlight class="normal"></highlight></codeline>
<codeline lineno="1072"><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="1073"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1074"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_MLD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1075"><highlight class="normal"></highlight></codeline>
<codeline lineno="1076"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>IP6_DEBUG</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1077"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Print<sp/>an<sp/>IPv6<sp/>header<sp/>by<sp/>using<sp/>LWIP_DEBUGF</highlight></codeline>
<codeline lineno="1078"><highlight class="comment"><sp/>*<sp/>@param<sp/>p<sp/>an<sp/>IPv6<sp/>packet,<sp/>p-&gt;payload<sp/>pointing<sp/>to<sp/>the<sp/>IPv6<sp/>header</highlight></codeline>
<codeline lineno="1079"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1080"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1081"><highlight class="normal">ip6_debug_print(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structpbuf" kindref="compound">pbuf</ref><sp/>*p)</highlight></codeline>
<codeline lineno="1082"><highlight class="normal">{</highlight></codeline>
<codeline lineno="1083"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*ip6hdr<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structip6__hdr" kindref="compound">ip6_hdr</ref><sp/>*)p-&gt;<ref refid="structpbuf_1a8d32dc3e964369d4eec638fc37fbc460" kindref="member">payload</ref>;</highlight></codeline>
<codeline lineno="1084"><highlight class="normal"></highlight></codeline>
<codeline lineno="1085"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;IPv6<sp/>header:\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="1086"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;+-------------------------------+\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="1087"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;|<sp/>%2&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%3&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;<sp/><sp/>|<sp/><sp/><sp/><sp/><sp/><sp/>%7&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gad8b0a364e95b07cb0c47709fdc6037d6" kindref="member">U32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/><sp/><sp/><sp/><sp/>|<sp/>(ver,<sp/>class,<sp/>flow)\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1088"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1a90f24cf50dee93e0729a1fc1d05374e3" kindref="member">IP6H_V</ref>(ip6hdr),</highlight></codeline>
<codeline lineno="1089"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1a09221519353bd18683c39a37905af968" kindref="member">IP6H_TC</ref>(ip6hdr),</highlight></codeline>
<codeline lineno="1090"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1aca05b52650fd3d7d7806b7aaf3fe4aaf" kindref="member">IP6H_FL</ref>(ip6hdr)));</highlight></codeline>
<codeline lineno="1091"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;+-------------------------------+\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="1092"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;|<sp/><sp/><sp/><sp/><sp/>%5&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;<sp/><sp/><sp/><sp/><sp/>|<sp/><sp/>%3&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;<sp/><sp/>|<sp/><sp/>%3&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;<sp/><sp/>|<sp/>(plen,<sp/>nexth,<sp/>hopl)\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1093"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1ac672706ee00b07f263dad7dcf116d351" kindref="member">IP6H_PLEN</ref>(ip6hdr),</highlight></codeline>
<codeline lineno="1094"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1a11009a147aa680a6a486ded85382aff1" kindref="member">IP6H_NEXTH</ref>(ip6hdr),</highlight></codeline>
<codeline lineno="1095"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="prot_2ip6_8h_1a4f8209d53443b50770e57426d027de28" kindref="member">IP6H_HOPLIM</ref>(ip6hdr)));</highlight></codeline>
<codeline lineno="1096"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;+-------------------------------+\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="1097"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/>(src)\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1098"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK1(&amp;(ip6hdr-&gt;src)),</highlight></codeline>
<codeline lineno="1099"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK2(&amp;(ip6hdr-&gt;src)),</highlight></codeline>
<codeline lineno="1100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK3(&amp;(ip6hdr-&gt;src)),</highlight></codeline>
<codeline lineno="1101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK4(&amp;(ip6hdr-&gt;src))));</highlight></codeline>
<codeline lineno="1102"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK5(&amp;(ip6hdr-&gt;src)),</highlight></codeline>
<codeline lineno="1104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK6(&amp;(ip6hdr-&gt;src)),</highlight></codeline>
<codeline lineno="1105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK7(&amp;(ip6hdr-&gt;src)),</highlight></codeline>
<codeline lineno="1106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK8(&amp;(ip6hdr-&gt;src))));</highlight></codeline>
<codeline lineno="1107"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;+-------------------------------+\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="1108"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/>(dest)\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK1(&amp;(ip6hdr-&gt;dest)),</highlight></codeline>
<codeline lineno="1110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK2(&amp;(ip6hdr-&gt;dest)),</highlight></codeline>
<codeline lineno="1111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK3(&amp;(ip6hdr-&gt;dest)),</highlight></codeline>
<codeline lineno="1112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK4(&amp;(ip6hdr-&gt;dest))));</highlight></codeline>
<codeline lineno="1113"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|<sp/><sp/>%4&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gac219830a93d05c5f18f64ce87a34be14" kindref="member">X32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>|\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="1114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK5(&amp;(ip6hdr-&gt;dest)),</highlight></codeline>
<codeline lineno="1115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK6(&amp;(ip6hdr-&gt;dest)),</highlight></codeline>
<codeline lineno="1116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK7(&amp;(ip6hdr-&gt;dest)),</highlight></codeline>
<codeline lineno="1117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>IP6_ADDR_BLOCK8(&amp;(ip6hdr-&gt;dest))));</highlight></codeline>
<codeline lineno="1118"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1ac2f9726756b78d4d7c425b0422a776ce" kindref="member">IP6_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;+-------------------------------+\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="1119"><highlight class="normal">}</highlight></codeline>
<codeline lineno="1120"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>IP6_DEBUG<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="1121"><highlight class="normal"></highlight></codeline>
<codeline lineno="1122"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6<sp/>*/</highlight><highlight class="preprocessor"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/net/core/ipv6/ip6.c"/>
  </compounddef>
</doxygen>
