<?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="autoip_8c" kind="file" language="C++">
    <compoundname>autoip.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="1">
        <label>C:/Dev/git/UbixOS/sys/net/core/ipv4/autoip.c</label>
        <link refid="autoip_8c"/>
        <childnode refid="2" 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="11">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
    </incdepgraph>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
<para>AutoIP Automatic LinkLocal IP Configuration</para>
<para>This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform with RFC 3927. </para>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"></codeline>
<codeline lineno="29"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="30"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2007<sp/>Dominik<sp/>Spies<sp/>&lt;kontakt@dspies.de&gt;</highlight></codeline>
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="33"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="34"><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="35"><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="36"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="37"><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="38"><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="39"><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="40"><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="41"><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="42"><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="43"><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="44"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="45"><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="46"><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="47"><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="48"><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="49"><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="50"><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="51"><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="52"><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="53"><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="54"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="55"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="56"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Dominik<sp/>Spies<sp/>&lt;kontakt@dspies.de&gt;</highlight></codeline>
<codeline lineno="57"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><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="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV4<sp/>&amp;&amp;<sp/>LWIP_AUTOIP<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="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><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="64"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>#include<sp/>&quot;net/udp.h&quot;<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip__addr_8h" kindref="compound">net/ip_addr.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><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="67"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="autoip_8h" kindref="compound">net/autoip.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="etharp_8h" kindref="compound">net/etharp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="prot_2autoip_8h" kindref="compound">net/prot/autoip.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="string_8h" kindref="compound">string.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="preprocessor">#ifndef<sp/>LWIP_AUTOIP_RAND</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_AUTOIP_RAND(netif)<sp/>(<sp/>(((u32_t)((netif-&gt;hwaddr[5])<sp/>&amp;<sp/>0xff)<sp/>&lt;&lt;<sp/>24)<sp/>|<sp/>\</highlight></codeline>
<codeline lineno="77"><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((u32_t)((netif-&gt;hwaddr[3])<sp/>&amp;<sp/>0xff)<sp/>&lt;&lt;<sp/>16)<sp/>|<sp/>\</highlight></codeline>
<codeline lineno="78"><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((u32_t)((netif-&gt;hwaddr[2])<sp/>&amp;<sp/>0xff)<sp/>&lt;&lt;<sp/>8)<sp/>|<sp/>\</highlight></codeline>
<codeline lineno="79"><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((u32_t)((netif-&gt;hwaddr[4])<sp/>&amp;<sp/>0xff)))<sp/>+<sp/>\</highlight></codeline>
<codeline lineno="80"><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(netif_autoip_data(netif)?<sp/>netif_autoip_data(netif)-&gt;tried_llipaddr<sp/>:<sp/>0))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_AUTOIP_RAND<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="preprocessor">#ifndef<sp/>LWIP_AUTOIP_CREATE_SEED_ADDR</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>LWIP_AUTOIP_CREATE_SEED_ADDR(netif)<sp/>\</highlight></codeline>
<codeline lineno="89"><highlight class="preprocessor"><sp/><sp/>lwip_htonl(AUTOIP_RANGE_START<sp/>+<sp/>((u32_t)(((u8_t)(netif-&gt;hwaddr[4]))<sp/>|<sp/>\</highlight></codeline>
<codeline lineno="90"><highlight class="preprocessor"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((u32_t)((u8_t)(netif-&gt;hwaddr[5])))<sp/>&lt;&lt;<sp/>8)))</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_AUTOIP_CREATE_SEED_ADDR<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>static<sp/>functions<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>autoip_arp_announce(</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="95"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>autoip_start_probing(</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="96"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal">autoip_set_struct(</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">struct</highlight><highlight class="normal"><sp/>autoip<sp/>*autoip)</highlight></codeline>
<codeline lineno="107"><highlight class="normal">{</highlight></codeline>
<codeline lineno="108"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;netif<sp/>!=<sp/>NULL&quot;</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="109"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;autoip<sp/>!=<sp/>NULL&quot;</highlight><highlight class="normal">,<sp/>autoip<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;netif<sp/>already<sp/>has<sp/>a<sp/>struct<sp/>autoip<sp/>set&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>)<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>clear<sp/>data<sp/>structure<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(autoip,<sp/>0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>autoip));</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>autoip-&gt;state<sp/>=<sp/>AUTOIP_STATE_OFF;<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/>netif_set_client_data(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP,<sp/>autoip);</highlight></codeline>
<codeline lineno="117"><highlight class="normal">}</highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal">autoip_restart(</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="125"><highlight class="normal">{</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/>autoip-&gt;tried_llipaddr++;</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/>autoip_start(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="129"><highlight class="normal">}</highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal">autoip_handle_arp_conflict(</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="136"><highlight class="normal">{</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>RFC3927,<sp/>2.5<sp/>&quot;Conflict<sp/>Detection<sp/>and<sp/>Defense&quot;<sp/>allows<sp/>two<sp/>options<sp/>where</highlight></codeline>
<codeline lineno="140"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>a)<sp/>means<sp/>retreat<sp/>on<sp/>the<sp/>first<sp/>conflict<sp/>and</highlight></codeline>
<codeline lineno="141"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>b)<sp/>allows<sp/>to<sp/>keep<sp/>an<sp/>already<sp/>configured<sp/>address<sp/>when<sp/>having<sp/>only<sp/>one</highlight></codeline>
<codeline lineno="142"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>conflict<sp/>in<sp/>10<sp/>seconds</highlight></codeline>
<codeline lineno="143"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>We<sp/>use<sp/>option<sp/>b)<sp/>since<sp/>it<sp/>helps<sp/>to<sp/>improve<sp/>the<sp/>chance<sp/>that<sp/>one<sp/>of<sp/>the<sp/>two</highlight></codeline>
<codeline lineno="144"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>conflicting<sp/>hosts<sp/>may<sp/>be<sp/>able<sp/>to<sp/>retain<sp/>its<sp/>address.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="145"><highlight class="normal"></highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;lastconflict<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>retreat,<sp/>there<sp/>was<sp/>a<sp/>conflicting<sp/>ARP<sp/>in<sp/>the<sp/>last<sp/>DEFEND_INTERVAL<sp/>seconds<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref>,</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_handle_arp_conflict():<sp/>we<sp/>are<sp/>defending,<sp/>but<sp/>in<sp/>DEFEND_INTERVAL,<sp/>retreating\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="150"><highlight class="normal"></highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Active<sp/>TCP<sp/>sessions<sp/>are<sp/>aborted<sp/>when<sp/>removing<sp/>the<sp/>ip<sp/>addresss<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip_restart(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref>,</highlight></codeline>
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_handle_arp_conflict():<sp/>we<sp/>are<sp/>defend,<sp/>send<sp/>ARP<sp/>Announce\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip_arp_announce(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip-&gt;lastconflict<sp/>=<sp/><ref refid="prot_2autoip_8h_1a5c21e0d4d66eb7056ba4d515d36f0a20" kindref="member">DEFEND_INTERVAL</ref><sp/>*<sp/>AUTOIP_TICKS_PER_SECOND;</highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="159"><highlight class="normal">}</highlight></codeline>
<codeline lineno="160"><highlight class="normal"></highlight></codeline>
<codeline lineno="167"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="168"><highlight class="normal">autoip_create_addr(</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/>ip4_addr_t<sp/>*ipaddr)</highlight></codeline>
<codeline lineno="169"><highlight class="normal">{</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="171"><highlight class="normal"></highlight></codeline>
<codeline lineno="172"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Here<sp/>we<sp/>create<sp/>an<sp/>IP-Address<sp/>out<sp/>of<sp/>range<sp/>169.254.1.0<sp/>to<sp/>169.254.254.255</highlight></codeline>
<codeline lineno="173"><highlight class="comment"><sp/><sp/><sp/>*<sp/>compliant<sp/>to<sp/>RFC<sp/>3927<sp/>Section<sp/>2.1</highlight></codeline>
<codeline lineno="174"><highlight class="comment"><sp/><sp/><sp/>*<sp/>We<sp/>have<sp/>254<sp/>*<sp/>256<sp/>possibilities<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="normal"></highlight></codeline>
<codeline lineno="176"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>addr<sp/>=<sp/><ref refid="def_8h_1a56098407d66feb75806f655bafbee81d" kindref="member">lwip_ntohl</ref>(LWIP_AUTOIP_CREATE_SEED_ADDR(<ref refid="structnetif" kindref="compound">netif</ref>));</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/>addr<sp/>+=<sp/>autoip-&gt;tried_llipaddr;</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/>addr<sp/>=<sp/><ref refid="prot_2autoip_8h_1ac19d92e0bfcb52079adbe92fb569d468" kindref="member">AUTOIP_NET</ref><sp/>|<sp/>(addr<sp/>&amp;<sp/>0xffff);</highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Now,<sp/>169.254.0.0<sp/>&lt;=<sp/>addr<sp/>&lt;=<sp/>169.254.255.255<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(addr<sp/>&lt;<sp/><ref refid="prot_2autoip_8h_1a8b4506c8e0ab7631f49567f9b81779c6" kindref="member">AUTOIP_RANGE_START</ref>)<sp/>{</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/>addr<sp/>+=<sp/><ref refid="prot_2autoip_8h_1a84dec606d57f40eed1cdc782f702f161" kindref="member">AUTOIP_RANGE_END</ref><sp/>-<sp/><ref refid="prot_2autoip_8h_1a8b4506c8e0ab7631f49567f9b81779c6" kindref="member">AUTOIP_RANGE_START</ref><sp/>+<sp/>1;</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="184"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(addr<sp/>&gt;<sp/><ref refid="prot_2autoip_8h_1a84dec606d57f40eed1cdc782f702f161" kindref="member">AUTOIP_RANGE_END</ref>)<sp/>{</highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/>addr<sp/>-=<sp/><ref refid="prot_2autoip_8h_1a84dec606d57f40eed1cdc782f702f161" kindref="member">AUTOIP_RANGE_END</ref><sp/>-<sp/><ref refid="prot_2autoip_8h_1a8b4506c8e0ab7631f49567f9b81779c6" kindref="member">AUTOIP_RANGE_START</ref><sp/>+<sp/>1;</highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="187"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;AUTOIP<sp/>address<sp/>not<sp/>in<sp/>range&quot;</highlight><highlight class="normal">,<sp/>(addr<sp/>&gt;=<sp/><ref refid="prot_2autoip_8h_1a8b4506c8e0ab7631f49567f9b81779c6" kindref="member">AUTOIP_RANGE_START</ref>)<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/>(addr<sp/>&lt;=<sp/><ref refid="prot_2autoip_8h_1a84dec606d57f40eed1cdc782f702f161" kindref="member">AUTOIP_RANGE_END</ref>));</highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/>ip4_addr_set_u32(ipaddr,<sp/><ref refid="def_8c_1a14f94347a5b9b9e3602705b75b7ae524" kindref="member">lwip_htonl</ref>(addr));</highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref>,</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_create_addr():<sp/>tried_llipaddr=%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;,<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&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">,</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)(autoip-&gt;tried_llipaddr),<sp/>ip4_addr1_16(ipaddr),<sp/>ip4_addr2_16(ipaddr),</highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/>ip4_addr3_16(ipaddr),<sp/>ip4_addr4_16(ipaddr)));</highlight></codeline>
<codeline lineno="195"><highlight class="normal">}</highlight></codeline>
<codeline lineno="196"><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="203"><highlight class="normal">autoip_arp_probe(</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="204"><highlight class="normal">{</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>this<sp/>works<sp/>because<sp/>netif-&gt;ip_addr<sp/>is<sp/>ANY<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>etharp_request(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>&amp;autoip-&gt;llipaddr);</highlight></codeline>
<codeline lineno="208"><highlight class="normal">}</highlight></codeline>
<codeline lineno="209"><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="216"><highlight class="normal">autoip_arp_announce(</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="217"><highlight class="normal">{</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>etharp_gratuitous(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="219"><highlight class="normal">}</highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="227"><highlight class="normal">autoip_bind(</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="228"><highlight class="normal">{</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/>ip4_addr_t<sp/>sn_mask,<sp/>gw_addr;</highlight></codeline>
<codeline lineno="231"><highlight class="normal"></highlight></codeline>
<codeline lineno="232"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,</highlight></codeline>
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_bind(netif=%p)<sp/>%c%c%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&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">,</highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*)<ref refid="structnetif" kindref="compound">netif</ref>,<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="235"><highlight class="normal"><sp/><sp/><sp/><sp/>ip4_addr1_16(&amp;autoip-&gt;llipaddr),<sp/>ip4_addr2_16(&amp;autoip-&gt;llipaddr),</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/>ip4_addr3_16(&amp;autoip-&gt;llipaddr),<sp/>ip4_addr4_16(&amp;autoip-&gt;llipaddr)));</highlight></codeline>
<codeline lineno="237"><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="normal"><sp/><sp/>IP4_ADDR(&amp;sn_mask,<sp/>255,<sp/>255,<sp/>0,<sp/>0);</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/>IP4_ADDR(&amp;gw_addr,<sp/>0,<sp/>0,<sp/>0,<sp/>0);</highlight></codeline>
<codeline lineno="240"><highlight class="normal"></highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/>netif_set_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>&amp;autoip-&gt;llipaddr,<sp/>&amp;sn_mask,<sp/>&amp;gw_addr);</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>interface<sp/>is<sp/>used<sp/>by<sp/>routing<sp/>now<sp/>that<sp/>an<sp/>address<sp/>is<sp/>set<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="243"><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><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="245"><highlight class="normal">}</highlight></codeline>
<codeline lineno="246"><highlight class="normal"></highlight></codeline>
<codeline lineno="253"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="254"><highlight class="normal">autoip_start(</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="255"><highlight class="normal">{</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref><sp/>result<sp/>=<sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb" kindref="member">ERR_OK</ref>;</highlight></codeline>
<codeline lineno="258"><highlight class="normal"></highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a827bc03cd7889e7c007df39d33b33d18" kindref="member">LWIP_ERROR</ref>(</highlight><highlight class="stringliteral">&quot;netif<sp/>is<sp/>not<sp/>up,<sp/>old<sp/>style<sp/>port?&quot;</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><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcab508ce0ebdf3ca735208b00a80a45c91" kindref="member">ERR_ARG</ref>;);</highlight></codeline>
<codeline lineno="260"><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>IP-Address,<sp/>Netmask<sp/>and<sp/>Gateway<sp/>to<sp/>0<sp/>to<sp/>make<sp/>sure<sp/>that</highlight></codeline>
<codeline lineno="262"><highlight class="comment"><sp/><sp/><sp/>*<sp/>ARP<sp/>Packets<sp/>are<sp/>formed<sp/>correctly</highlight></codeline>
<codeline lineno="263"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/>netif_set_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>IP4_ADDR_ANY4,<sp/>IP4_ADDR_ANY4,<sp/>IP4_ADDR_ANY4);</highlight></codeline>
<codeline lineno="265"><highlight class="normal"></highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref>,</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_start(netif=%p)<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/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*)<ref refid="structnetif" kindref="compound">netif</ref>,<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1a32fca6ffd28bb9af3f891a378827a67e" kindref="member">name</ref>[0],</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><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="269"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>no<sp/>AutoIP<sp/>client<sp/>attached<sp/>yet?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_start():<sp/>starting<sp/>new<sp/>AUTOIP<sp/>client\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip<sp/>*)<ref refid="mem_8h_1a932aa40d85b14cb7331625e012d12335" kindref="member">mem_malloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>autoip));</highlight></codeline>
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,</highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_start():<sp/>could<sp/>not<sp/>allocate<sp/>autoip\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="group__infrastructure__errors_1ggae2e66c7d13afc90ffecd6151680fbadcaaaeafdbf3aecc46864daa3cd829c7e05" kindref="member">ERR_MEM</ref>;</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="string_8h_1ace4b911463887af5e748326323e99a23" kindref="member">memset</ref>(autoip,<sp/>0,<sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/>autoip));</highlight></codeline>
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>store<sp/>this<sp/>AutoIP<sp/>client<sp/>in<sp/>the<sp/>netif<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/>netif_set_client_data(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP,<sp/>autoip);</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;autoip_start():<sp/>allocated<sp/>autoip&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip-&gt;state<sp/>=<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0ca11fa34497b2b043e2a5e7a43323374af" kindref="member">AUTOIP_STATE_OFF</ref>;</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip-&gt;ttw<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip-&gt;sent_num<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/>ip4_addr_set_zero(&amp;autoip-&gt;llipaddr);</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip-&gt;lastconflict<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="290"><highlight class="normal"></highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/>autoip_create_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>&amp;(autoip-&gt;llipaddr));</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/>autoip_start_probing(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="293"><highlight class="normal"></highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="295"><highlight class="normal">}</highlight></codeline>
<codeline lineno="296"><highlight class="normal"></highlight></codeline>
<codeline lineno="297"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="298"><highlight class="normal">autoip_start_probing(</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="299"><highlight class="normal">{</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="301"><highlight class="normal"></highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/>autoip-&gt;state<sp/>=<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0ca0926fae84a811e23d48115263b8744a3" kindref="member">AUTOIP_STATE_PROBING</ref>;</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/>autoip-&gt;sent_num<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="304"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref>,</highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_start_probing():<sp/>changing<sp/>state<sp/>to<sp/>PROBING:<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&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">,</highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ip4_addr1_16(&amp;autoip-&gt;llipaddr),<sp/>ip4_addr2_16(&amp;autoip-&gt;llipaddr),</highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>ip4_addr3_16(&amp;autoip-&gt;llipaddr),<sp/>ip4_addr4_16(&amp;autoip-&gt;llipaddr)));</highlight></codeline>
<codeline lineno="308"><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>time<sp/>to<sp/>wait<sp/>to<sp/>first<sp/>probe,<sp/>this<sp/>is<sp/>randomly</highlight></codeline>
<codeline lineno="310"><highlight class="comment"><sp/><sp/><sp/>*<sp/>chosen<sp/>out<sp/>of<sp/>0<sp/>to<sp/>PROBE_WAIT<sp/>seconds.</highlight></codeline>
<codeline lineno="311"><highlight class="comment"><sp/><sp/><sp/>*<sp/>compliant<sp/>to<sp/>RFC<sp/>3927<sp/>Section<sp/>2.2.1</highlight></codeline>
<codeline lineno="312"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/>autoip-&gt;ttw<sp/>=<sp/>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)(LWIP_AUTOIP_RAND(<ref refid="structnetif" kindref="compound">netif</ref>)<sp/>%<sp/>(<ref refid="prot_2autoip_8h_1aecea6220ab7fcd0910262d5929eb5d95" kindref="member">PROBE_WAIT</ref><sp/>*<sp/>AUTOIP_TICKS_PER_SECOND));</highlight></codeline>
<codeline lineno="314"><highlight class="normal"></highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="316"><highlight class="comment"><sp/><sp/><sp/>*<sp/>if<sp/>we<sp/>tried<sp/>more<sp/>then<sp/>MAX_CONFLICTS<sp/>we<sp/>must<sp/>limit<sp/>our<sp/>rate<sp/>for</highlight></codeline>
<codeline lineno="317"><highlight class="comment"><sp/><sp/><sp/>*<sp/>acquiring<sp/>and<sp/>probing<sp/>address</highlight></codeline>
<codeline lineno="318"><highlight class="comment"><sp/><sp/><sp/>*<sp/>compliant<sp/>to<sp/>RFC<sp/>3927<sp/>Section<sp/>2.2.1</highlight></codeline>
<codeline lineno="319"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;tried_llipaddr<sp/>&gt;<sp/><ref refid="prot_2autoip_8h_1a14d30da6b838f3d718c0d92a9f3f3816" kindref="member">MAX_CONFLICTS</ref>)<sp/>{</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip-&gt;ttw<sp/>=<sp/><ref refid="prot_2autoip_8h_1a420da51b5955d94c44d285638b3931bf" kindref="member">RATE_LIMIT_INTERVAL</ref><sp/>*<sp/>AUTOIP_TICKS_PER_SECOND;</highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="323"><highlight class="normal">}</highlight></codeline>
<codeline lineno="324"><highlight class="normal"></highlight></codeline>
<codeline lineno="331"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="332"><highlight class="normal">autoip_network_changed(</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="333"><highlight class="normal">{</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="335"><highlight class="normal"></highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip<sp/>&amp;&amp;<sp/>(autoip-&gt;state<sp/>!=<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0ca11fa34497b2b043e2a5e7a43323374af" kindref="member">AUTOIP_STATE_OFF</ref>))<sp/>{</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip_start_probing(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="338"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="339"><highlight class="normal">}</highlight></codeline>
<codeline lineno="340"><highlight class="normal"></highlight></codeline>
<codeline lineno="347"><highlight class="normal"><ref refid="group__infrastructure__errors_1gaf02d9da80fd66b4f986d2c53d7231ddb" kindref="member">err_t</ref></highlight></codeline>
<codeline lineno="348"><highlight class="normal">autoip_stop(</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="349"><highlight class="normal">{</highlight></codeline>
<codeline lineno="350"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="351"><highlight class="normal"></highlight></codeline>
<codeline lineno="352"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/>autoip-&gt;state<sp/>=<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0ca11fa34497b2b043e2a5e7a43323374af" kindref="member">AUTOIP_STATE_OFF</ref>;</highlight></codeline>
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip4_addr_islinklocal(netif_ip4_addr(<ref refid="structnetif" kindref="compound">netif</ref>)))<sp/>{</highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>netif_set_addr(<ref refid="structnetif" kindref="compound">netif</ref>,<sp/>IP4_ADDR_ANY4,<sp/>IP4_ADDR_ANY4,<sp/>IP4_ADDR_ANY4);</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="358"><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="359"><highlight class="normal">}</highlight></codeline>
<codeline lineno="360"><highlight class="normal"></highlight></codeline>
<codeline lineno="364"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="365"><highlight class="normal">autoip_tmr(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="366"><highlight class="normal">{</highlight></codeline>
<codeline lineno="367"><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><sp/>=<sp/><ref refid="netif_8h_1a1c8141eaa98f6dc6dfddbb23a706656c" kindref="member">netif_list</ref>;</highlight></codeline>
<codeline lineno="368"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>loop<sp/>through<sp/>netif&apos;s<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="369"><highlight class="normal"><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>)<sp/>{</highlight></codeline>
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>only<sp/>act<sp/>on<sp/>AutoIP<sp/>configured<sp/>interfaces<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;lastconflict<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;lastconflict--;</highlight></codeline>
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="376"><highlight class="normal"></highlight></codeline>
<codeline lineno="377"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,</highlight></codeline>
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_tmr()<sp/>AutoIP-State:<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;,<sp/>ttw=%&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">,</highlight></codeline>
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)(autoip-&gt;state),<sp/>autoip-&gt;ttw));</highlight></codeline>
<codeline lineno="380"><highlight class="normal"></highlight></codeline>
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;ttw<sp/>&gt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;ttw--;</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="384"><highlight class="normal"></highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal">(autoip-&gt;state)<sp/>{</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0ca0926fae84a811e23d48115263b8744a3" kindref="member">AUTOIP_STATE_PROBING</ref>:</highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;ttw<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;sent_num<sp/>&gt;=<sp/><ref refid="prot_2autoip_8h_1a3a610440fbb8d2c6abb4aa9702f904ef" kindref="member">PROBE_NUM</ref>)<sp/>{</highlight></codeline>
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Switch<sp/>to<sp/>ANNOUNCING:<sp/>now<sp/>we<sp/>can<sp/>bind<sp/>to<sp/>an<sp/>IP<sp/>address<sp/>and<sp/>use<sp/>it<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;state<sp/>=<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0cad35142124e3ef9875cb3a9b16209157b" kindref="member">AUTOIP_STATE_ANNOUNCING</ref>;</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip_bind(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>autoip_bind()<sp/>calls<sp/>netif_set_addr():<sp/>this<sp/>triggers<sp/>a<sp/>gratuitous<sp/>ARP</highlight></codeline>
<codeline lineno="393"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>which<sp/>counts<sp/>as<sp/>an<sp/>announcement<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="394"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;sent_num<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;ttw<sp/>=<sp/><ref refid="prot_2autoip_8h_1a1a9b374b5e2e6da152f3a1556d09e6b3" kindref="member">ANNOUNCE_WAIT</ref><sp/>*<sp/>AUTOIP_TICKS_PER_SECOND;</highlight></codeline>
<codeline lineno="396"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref>,</highlight></codeline>
<codeline lineno="397"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_tmr():<sp/>changing<sp/>state<sp/>to<sp/>ANNOUNCING:<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&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">,</highlight></codeline>
<codeline lineno="398"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip4_addr1_16(&amp;autoip-&gt;llipaddr),<sp/>ip4_addr2_16(&amp;autoip-&gt;llipaddr),</highlight></codeline>
<codeline lineno="399"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip4_addr3_16(&amp;autoip-&gt;llipaddr),<sp/>ip4_addr4_16(&amp;autoip-&gt;llipaddr)));</highlight></codeline>
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip_arp_probe(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;autoip_tmr()<sp/>PROBING<sp/>Sent<sp/>Probe\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;sent_num++;</highlight></codeline>
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;sent_num<sp/>==<sp/><ref refid="prot_2autoip_8h_1a3a610440fbb8d2c6abb4aa9702f904ef" kindref="member">PROBE_NUM</ref>)<sp/>{</highlight></codeline>
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>calculate<sp/>time<sp/>to<sp/>wait<sp/>to<sp/>for<sp/>announce<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;ttw<sp/>=<sp/><ref refid="prot_2autoip_8h_1a1a9b374b5e2e6da152f3a1556d09e6b3" kindref="member">ANNOUNCE_WAIT</ref><sp/>*<sp/>AUTOIP_TICKS_PER_SECOND;</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>calculate<sp/>time<sp/>to<sp/>wait<sp/>to<sp/>next<sp/>probe<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;ttw<sp/>=<sp/>(<ref refid="group__compiler__abstraction_1ga77570ac4fcab86864fa1916e55676da2" kindref="member">u16_t</ref>)((LWIP_AUTOIP_RAND(<ref refid="structnetif" kindref="compound">netif</ref>)<sp/>%</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>((<ref refid="prot_2autoip_8h_1ad408cf94a71b848cff8108dc5c1558e6" kindref="member">PROBE_MAX</ref><sp/>-<sp/><ref refid="prot_2autoip_8h_1a959b454f842224af595205645244f946" kindref="member">PROBE_MIN</ref>)<sp/>*<sp/>AUTOIP_TICKS_PER_SECOND)<sp/>)<sp/>+</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="prot_2autoip_8h_1a959b454f842224af595205645244f946" kindref="member">PROBE_MIN</ref><sp/>*<sp/>AUTOIP_TICKS_PER_SECOND);</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="414"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="415"><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="416"><highlight class="normal"></highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0cad35142124e3ef9875cb3a9b16209157b" kindref="member">AUTOIP_STATE_ANNOUNCING</ref>:</highlight></codeline>
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;ttw<sp/>==<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip_arp_announce(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;autoip_tmr()<sp/>ANNOUNCING<sp/>Sent<sp/>Announce\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;ttw<sp/>=<sp/><ref refid="prot_2autoip_8h_1a7ed8f0b9d3330a2967142e0e48b28521" kindref="member">ANNOUNCE_INTERVAL</ref><sp/>*<sp/>AUTOIP_TICKS_PER_SECOND;</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;sent_num++;</highlight></codeline>
<codeline lineno="423"><highlight class="normal"></highlight></codeline>
<codeline lineno="424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;sent_num<sp/>&gt;=<sp/><ref refid="prot_2autoip_8h_1a29141f41d1391d34730b75539000f9ea" kindref="member">ANNOUNCE_NUM</ref>)<sp/>{</highlight></codeline>
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;state<sp/>=<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0caa2c50906623e140882d3654c149cca45" kindref="member">AUTOIP_STATE_BOUND</ref>;</highlight></codeline>
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;sent_num<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="427"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip-&gt;ttw<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref>,</highlight></codeline>
<codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_tmr():<sp/>changing<sp/>state<sp/>to<sp/>BOUND:<sp/>%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gaa9d7f6eb2ee9fcc5eda3545dbb1886e0" kindref="member">U16_F</ref></highlight><highlight class="stringliteral">&quot;.%&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">,</highlight></codeline>
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip4_addr1_16(&amp;autoip-&gt;llipaddr),<sp/>ip4_addr2_16(&amp;autoip-&gt;llipaddr),</highlight></codeline>
<codeline lineno="431"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip4_addr3_16(&amp;autoip-&gt;llipaddr),<sp/>ip4_addr4_16(&amp;autoip-&gt;llipaddr)));</highlight></codeline>
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="434"><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="435"><highlight class="normal"></highlight></codeline>
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>nothing<sp/>to<sp/>do<sp/>in<sp/>other<sp/>states<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="438"><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="439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="441"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>proceed<sp/>to<sp/>next<sp/>network<sp/>interface<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="442"><highlight class="normal"><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="443"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="444"><highlight class="normal">}</highlight></codeline>
<codeline lineno="445"><highlight class="normal"></highlight></codeline>
<codeline lineno="452"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="453"><highlight class="normal">autoip_arp_reply(</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">struct</highlight><highlight class="normal"><sp/><ref refid="structetharp__hdr" kindref="compound">etharp_hdr</ref><sp/>*hdr)</highlight></codeline>
<codeline lineno="454"><highlight class="normal">{</highlight></codeline>
<codeline lineno="455"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="456"><highlight class="normal"></highlight></codeline>
<codeline lineno="457"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;autoip_arp_reply()\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="458"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((autoip<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>&amp;&amp;<sp/>(autoip-&gt;state<sp/>!=<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0ca11fa34497b2b043e2a5e7a43323374af" kindref="member">AUTOIP_STATE_OFF</ref>))<sp/>{</highlight></codeline>
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>when<sp/>ip.src<sp/>==<sp/>llipaddr<sp/>&amp;&amp;<sp/>hw.src<sp/>!=<sp/>netif-&gt;hwaddr</highlight></codeline>
<codeline lineno="460"><highlight class="comment"><sp/><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="461"><highlight class="comment"><sp/><sp/><sp/><sp/>*<sp/>when<sp/>probing<sp/><sp/>ip.dst<sp/>==<sp/>llipaddr<sp/>&amp;&amp;<sp/>hw.src<sp/>!=<sp/>netif-&gt;hwaddr</highlight></codeline>
<codeline lineno="462"><highlight class="comment"><sp/><sp/><sp/><sp/>*<sp/>we<sp/>have<sp/>a<sp/>conflict<sp/>and<sp/>must<sp/>solve<sp/>it</highlight></codeline>
<codeline lineno="463"><highlight class="comment"><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/>ip4_addr_t<sp/>sipaddr,<sp/>dipaddr;</highlight></codeline>
<codeline lineno="465"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structeth__addr" kindref="compound">eth_addr</ref><sp/>netifaddr;</highlight></codeline>
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="prot_2ethernet_8h_1a10cbd9cd91e7e0ebed3a1159e385c037" kindref="member">ETHADDR16_COPY</ref>(netifaddr.addr,<sp/><ref refid="structnetif" kindref="compound">netif</ref>-&gt;<ref refid="structnetif_1aee967965d999fc1a4c40a66709304e69" kindref="member">hwaddr</ref>);</highlight></codeline>
<codeline lineno="467"><highlight class="normal"></highlight></codeline>
<codeline lineno="468"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Copy<sp/>struct<sp/>ip4_addr2<sp/>to<sp/>aligned<sp/>ip4_addr,<sp/>to<sp/>support<sp/>compilers<sp/>without</highlight></codeline>
<codeline lineno="469"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>structure<sp/>packing<sp/>(not<sp/>using<sp/>structure<sp/>copy<sp/>which<sp/>breaks<sp/>strict-aliasing<sp/>rules).</highlight></codeline>
<codeline lineno="470"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="471"><highlight class="normal"><sp/><sp/><sp/><sp/>IPADDR2_COPY(&amp;sipaddr,<sp/>&amp;hdr-&gt;sipaddr);</highlight></codeline>
<codeline lineno="472"><highlight class="normal"><sp/><sp/><sp/><sp/>IPADDR2_COPY(&amp;dipaddr,<sp/>&amp;hdr-&gt;dipaddr);</highlight></codeline>
<codeline lineno="473"><highlight class="normal"></highlight></codeline>
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(autoip-&gt;state<sp/>==<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0ca0926fae84a811e23d48115263b8744a3" kindref="member">AUTOIP_STATE_PROBING</ref>)<sp/>{</highlight></codeline>
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>RFC<sp/>3927<sp/>Section<sp/>2.2.1:</highlight></codeline>
<codeline lineno="476"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>from<sp/>beginning<sp/>to<sp/>after<sp/>ANNOUNCE_WAIT</highlight></codeline>
<codeline lineno="477"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>seconds<sp/>we<sp/>have<sp/>a<sp/>conflict<sp/>if</highlight></codeline>
<codeline lineno="478"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>ip.src<sp/>==<sp/>llipaddr<sp/>OR</highlight></codeline>
<codeline lineno="479"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>ip.dst<sp/>==<sp/>llipaddr<sp/>&amp;&amp;<sp/>hw.src<sp/>!=<sp/>own<sp/>hwaddr</highlight></codeline>
<codeline lineno="480"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((ip4_addr_cmp(&amp;sipaddr,<sp/>&amp;autoip-&gt;llipaddr))<sp/>||</highlight></codeline>
<codeline lineno="482"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(ip4_addr_isany_val(sipaddr)<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>ip4_addr_cmp(&amp;dipaddr,<sp/>&amp;autoip-&gt;llipaddr)<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>!<ref refid="prot_2ethernet_8h_1aa19e3e4c174d49c6062f463dfa68bbbc" kindref="member">eth_addr_cmp</ref>(&amp;netifaddr,<sp/>&amp;hdr-&gt;shwaddr)))<sp/>{</highlight></codeline>
<codeline lineno="485"><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_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga77c491e468bf7d9a1bc48430c1866a96" kindref="member">LWIP_DBG_LEVEL_WARNING</ref>,</highlight></codeline>
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_arp_reply():<sp/>Probe<sp/>Conflict<sp/>detected\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip_restart(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="490"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>RFC<sp/>3927<sp/>Section<sp/>2.5:</highlight></codeline>
<codeline lineno="491"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>in<sp/>any<sp/>state<sp/>we<sp/>have<sp/>a<sp/>conflict<sp/>if</highlight></codeline>
<codeline lineno="492"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>ip.src<sp/>==<sp/>llipaddr<sp/>&amp;&amp;<sp/>hw.src<sp/>!=<sp/>own<sp/>hwaddr</highlight></codeline>
<codeline lineno="493"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="494"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(ip4_addr_cmp(&amp;sipaddr,<sp/>&amp;autoip-&gt;llipaddr)<sp/>&amp;&amp;</highlight></codeline>
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>!<ref refid="prot_2ethernet_8h_1aa19e3e4c174d49c6062f463dfa68bbbc" kindref="member">eth_addr_cmp</ref>(&amp;netifaddr,<sp/>&amp;hdr-&gt;shwaddr))<sp/>{</highlight></codeline>
<codeline lineno="496"><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_1afaee522e7f32d81022215e1805e303a5" kindref="member">AUTOIP_DEBUG</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga988147559b78642ac881815b66023646" kindref="member">LWIP_DBG_TRACE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga511ee3deb3240635f5ec6a1709c6d741" kindref="member">LWIP_DBG_STATE</ref><sp/>|<sp/><ref refid="group__debugging__levels_1ga77c491e468bf7d9a1bc48430c1866a96" kindref="member">LWIP_DBG_LEVEL_WARNING</ref>,</highlight></codeline>
<codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(</highlight><highlight class="stringliteral">&quot;autoip_arp_reply():<sp/>Conflicting<sp/>ARP-Packet<sp/>detected\n&quot;</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>autoip_handle_arp_conflict(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="499"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="500"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="501"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="502"><highlight class="normal">}</highlight></codeline>
<codeline lineno="503"><highlight class="normal"></highlight></codeline>
<codeline lineno="510"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref></highlight></codeline>
<codeline lineno="511"><highlight class="normal">autoip_supplied_address(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><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="512"><highlight class="normal">{</highlight></codeline>
<codeline lineno="513"><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/>(netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>)<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>))<sp/>{</highlight></codeline>
<codeline lineno="514"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="515"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(autoip-&gt;state<sp/>==<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0caa2c50906623e140882d3654c149cca45" kindref="member">AUTOIP_STATE_BOUND</ref>)<sp/>||<sp/>(autoip-&gt;state<sp/>==<sp/><ref refid="prot_2autoip_8h_1a1a27a030b740b1577f95d5aeb54a1a0cad35142124e3ef9875cb3a9b16209157b" kindref="member">AUTOIP_STATE_ANNOUNCING</ref>);</highlight></codeline>
<codeline lineno="516"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="517"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="518"><highlight class="normal">}</highlight></codeline>
<codeline lineno="519"><highlight class="normal"></highlight></codeline>
<codeline lineno="520"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref></highlight></codeline>
<codeline lineno="521"><highlight class="normal">autoip_accept_packet(</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/>ip4_addr_t<sp/>*addr)</highlight></codeline>
<codeline lineno="522"><highlight class="normal">{</highlight></codeline>
<codeline lineno="523"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">autoip*<sp/>autoip<sp/>=<sp/>netif_autoip_data(<ref refid="structnetif" kindref="compound">netif</ref>);</highlight></codeline>
<codeline lineno="524"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(autoip<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>&amp;&amp;<sp/>ip4_addr_cmp(addr,<sp/>&amp;(autoip-&gt;llipaddr));</highlight></codeline>
<codeline lineno="525"><highlight class="normal">}</highlight></codeline>
<codeline lineno="526"><highlight class="normal"></highlight></codeline>
<codeline lineno="527"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV4<sp/>&amp;&amp;<sp/>LWIP_AUTOIP<sp/>*/</highlight><highlight class="preprocessor"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/net/core/ipv4/autoip.c"/>
  </compounddef>
</doxygen>
