Newer
Older
UbixOS / doc / html / icmp6_8c_source.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>UbixOS V2: C:/Dev/git/UbixOS/sys/net/core/ipv6/icmp6.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">UbixOS V2
   &#160;<span id="projectnumber">2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('icmp6_8c_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">icmp6.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="icmp6_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * Copyright (c) 2010 Inico Technologies Ltd.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * All rights reserved.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without modification,</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * are permitted provided that the following conditions are met:</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *    this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *    this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *    and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * 3. The name of the author may not be used to endorse or promote products</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *    derived from this software without specific prior written permission.</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS&#39;&#39; AND ANY EXPRESS OR IMPLIED</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment"> * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment"> * OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment"> * This file is part of the lwIP TCP/IP stack.</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment"> * Author: Ivan Delamer &lt;delamer@inicotech.com&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment"> * Please coordinate changes and requests with Ivan Delamer</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="comment"> * &lt;delamer@inicotech.com&gt;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="opt_8h.html">net/opt.h</a>&quot;</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160; </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#if LWIP_ICMP6 &amp;&amp; LWIP_IPV6 </span><span class="comment">/* don&#39;t build if not configured for use in lwipopts.h */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="icmp6_8h.html">net/icmp6.h</a>&quot;</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="prot_2icmp6_8h.html">net/prot/icmp6.h</a>&quot;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ip6_8h.html">net/ip6.h</a>&quot;</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ip6__addr_8h.html">net/ip6_addr.h</a>&quot;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="inet__chksum_8h.html">net/inet_chksum.h</a>&quot;</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="pbuf_8h.html">net/pbuf.h</a>&quot;</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="netif_8h.html">net/netif.h</a>&quot;</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="nd6_8h.html">net/nd6.h</a>&quot;</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="mld6_8h.html">net/mld6.h</a>&quot;</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ip_8h.html">net/ip.h</a>&quot;</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="stats_8h.html">net/stats.h</a>&quot;</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="string_8h.html">string.h</a>&gt;</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#ifndef LWIP_ICMP6_DATASIZE</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="preprocessor">#define LWIP_ICMP6_DATASIZE   8</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">#if LWIP_ICMP6_DATASIZE == 0</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">#define LWIP_ICMP6_DATASIZE   8</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment">/* Forward declarations */</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> icmp6_send_response(<span class="keyword">struct</span> <a class="code" href="structpbuf.html">pbuf</a> *p, <a class="code" href="group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> code, <a class="code" href="group__compiler__abstraction.html#ga4c14294869aceba3ef9d4c0c302d0f33">u32_t</a> data, <a class="code" href="group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> type);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;icmp6_input(<span class="keyword">struct</span> <a class="code" href="structpbuf.html">pbuf</a> *p, <span class="keyword">struct</span> <a class="code" href="structnetif.html">netif</a> *inp)</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;{</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keyword">struct </span><a class="code" href="structicmp6__hdr.html">icmp6_hdr</a> *icmp6hdr;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keyword">struct </span><a class="code" href="structpbuf.html">pbuf</a> *r;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keyword">const</span> ip6_addr_t *reply_src;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.recv);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="comment">/* Check that ICMPv6 header fits in payload */</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keywordflow">if</span> (p-&gt;<a class="code" href="structpbuf.html#a6f82449625e36e294f5d210268c0703f">len</a> &lt; <span class="keyword">sizeof</span>(<span class="keyword">struct</span> <a class="code" href="structicmp6__hdr.html">icmp6_hdr</a>)) {</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="comment">/* drop short packets */</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(p);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.lenerr);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.drop);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  icmp6hdr = (<span class="keyword">struct </span><a class="code" href="structicmp6__hdr.html">icmp6_hdr</a> *)p-&gt;<a class="code" href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">payload</a>;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;#<span class="keywordflow">if</span> <a class="code" href="lwipopts_8h.html#af466a10b093489910a773fd1cec74c2d">CHECKSUM_CHECK_ICMP6</a></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <a class="code" href="netif_8h.html#ad968df1b35c2fae368e087966e3bc677">IF__NETIF_CHECKSUM_ENABLED</a>(inp, NETIF_CHECKSUM_CHECK_ICMP6) {</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">if</span> (ip6_chksum_pseudo(p, <a class="code" href="prot_2ip6_8h.html#ab277ee09b6e7200fc1cfe28482b886a6">IP6_NEXTH_ICMP6</a>, p-&gt;<a class="code" href="structpbuf.html#a5259e7ec29bab9c0999b64f2e86b411f">tot_len</a>, ip6_current_src_addr(),</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                          ip6_current_dest_addr()) != 0) {</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;      <span class="comment">/* Checksum failed */</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;      <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(p);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.chkerr);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;      <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.drop);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHECKSUM_CHECK_ICMP6 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="keywordflow">switch</span> (icmp6hdr-&gt;type) {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1f99d333f425c28d3840e029cc9c46f3">ICMP6_TYPE_NA</a>: <span class="comment">/* Neighbor advertisement */</span></div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0d8d8717c6c34053d1101932c23929fe">ICMP6_TYPE_NS</a>: <span class="comment">/* Neighbor solicitation */</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae4ae04be7df3a2cce614af0a5cdae951">ICMP6_TYPE_RA</a>: <span class="comment">/* Router advertisement */</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0f6702d62de5f873e0afe7431d878207">ICMP6_TYPE_RD</a>: <span class="comment">/* Redirect */</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1d52ef5024a5822bd622bcb0b9da323d">ICMP6_TYPE_PTB</a>: <span class="comment">/* Packet too big */</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    nd6_input(p, inp);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a670d95494c9282f646ac442d81d9a780">ICMP6_TYPE_RS</a>:</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="preprocessor">#if LWIP_IPV6_FORWARD</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="comment">/* @todo implement router functionality */</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="preprocessor">#if LWIP_IPV6_MLD</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ad9794ae12b9ca196cc4fafaf6d834375">ICMP6_TYPE_MLQ</a>:</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a906dd689f0aa9b4796f49f299d4e3eb0">ICMP6_TYPE_MLR</a>:</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a04228a1d11f9f88bd165f3430188bfe7">ICMP6_TYPE_MLD</a>:</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    mld6_input(p, inp);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  <span class="keywordflow">case</span> <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae649aa45c97b885f28771688957528a3">ICMP6_TYPE_EREQ</a>:</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="preprocessor">#if !LWIP_MULTICAST_PING</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="comment">/* multicast destination address? */</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keywordflow">if</span> (ip6_addr_ismulticast(ip6_current_dest_addr())) {</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;      <span class="comment">/* drop */</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;      <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(p);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;      <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.drop);</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    }</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LWIP_MULTICAST_PING */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <span class="comment">/* Allocate reply. */</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    r = <a class="code" href="group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47">pbuf_alloc</a>(<a class="code" href="group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfafcc1e506061ba69dfa142eb6b3da5f13">PBUF_IP</a>, p-&gt;<a class="code" href="structpbuf.html#a5259e7ec29bab9c0999b64f2e86b411f">tot_len</a>, <a class="code" href="group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac5e9f28455bca98944a030d4b84ecfab">PBUF_RAM</a>);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="keywordflow">if</span> (r == <a class="code" href="fat__string_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;      <span class="comment">/* drop */</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;      <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(p);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;      <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.memerr);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    }</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160; </div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="comment">/* Copy echo request. */</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="group__pbuf.html#gaba88511dee3df4b631fde691f421320d">pbuf_copy</a>(r, p) != <a class="code" href="group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb">ERR_OK</a>) {</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      <span class="comment">/* drop */</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;      <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(p);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;      <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(r);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;      <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.err);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    }</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="comment">/* Determine reply source IPv6 address. */</span></div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="preprocessor">#if LWIP_MULTICAST_PING</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordflow">if</span> (ip6_addr_ismulticast(ip6_current_dest_addr())) {</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;      reply_src = <a class="code" href="ip__addr_8h.html#a06e75bcd198012b5ba39480c233608bd">ip_2_ip6</a>(ip6_select_source_address(inp, ip6_current_src_addr()));</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;      <span class="keywordflow">if</span> (reply_src == <a class="code" href="fat__string_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) {</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        <span class="comment">/* drop */</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(p);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(r);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.rterr);</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;      }</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LWIP_MULTICAST_PING */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;      reply_src = ip6_current_dest_addr();</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="comment">/* Set fields in reply. */</span></div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    ((<span class="keyword">struct </span><a class="code" href="structicmp6__echo__hdr.html">icmp6_echo_hdr</a> *)(r-&gt;<a class="code" href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">payload</a>))-&gt;type = <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ac6b91695c06bfc7fb2360310d7b8e78a">ICMP6_TYPE_EREP</a>;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    ((<span class="keyword">struct </span><a class="code" href="structicmp6__echo__hdr.html">icmp6_echo_hdr</a> *)(r-&gt;<a class="code" href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">payload</a>))-&gt;chksum = 0;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="preprocessor">#if CHECKSUM_GEN_ICMP6</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <a class="code" href="netif_8h.html#ad968df1b35c2fae368e087966e3bc677">IF__NETIF_CHECKSUM_ENABLED</a>(inp, NETIF_CHECKSUM_GEN_ICMP6) {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;      ((<span class="keyword">struct </span><a class="code" href="structicmp6__echo__hdr.html">icmp6_echo_hdr</a> *)(r-&gt;<a class="code" href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">payload</a>))-&gt;chksum = ip6_chksum_pseudo(r,</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;          <a class="code" href="prot_2ip6_8h.html#ab277ee09b6e7200fc1cfe28482b886a6">IP6_NEXTH_ICMP6</a>, r-&gt;<a class="code" href="structpbuf.html#a5259e7ec29bab9c0999b64f2e86b411f">tot_len</a>, reply_src, ip6_current_src_addr());</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHECKSUM_GEN_ICMP6 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160; </div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="comment">/* Send reply. */</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.xmit);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    ip6_output_if(r, reply_src, ip6_current_src_addr(),</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <a class="code" href="lwipopts_8h.html#a82193577b4045e1ac1533c4341a2bd79">LWIP_ICMP6_HL</a>, 0, <a class="code" href="prot_2ip6_8h.html#ab277ee09b6e7200fc1cfe28482b886a6">IP6_NEXTH_ICMP6</a>, inp);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(r);</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160; </div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.proterr);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.drop);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  }</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(p);</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;}</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160; </div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;icmp6_dest_unreach(<span class="keyword">struct</span> <a class="code" href="structpbuf.html">pbuf</a> *p, <span class="keyword">enum</span> <a class="code" href="prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccf">icmp6_dur_code</a> c)</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;{</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;  icmp6_send_response(p, c, 0, <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858aad9d4f207459e4bbd0c33a25adf6fdd7">ICMP6_TYPE_DUR</a>);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;}</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;icmp6_packet_too_big(<span class="keyword">struct</span> <a class="code" href="structpbuf.html">pbuf</a> *p, <a class="code" href="group__compiler__abstraction.html#ga4c14294869aceba3ef9d4c0c302d0f33">u32_t</a> mtu)</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;{</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  icmp6_send_response(p, 0, mtu, <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1d52ef5024a5822bd622bcb0b9da323d">ICMP6_TYPE_PTB</a>);</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;}</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160; </div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;icmp6_time_exceeded(<span class="keyword">struct</span> <a class="code" href="structpbuf.html">pbuf</a> *p, <span class="keyword">enum</span> <a class="code" href="prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869e">icmp6_te_code</a> c)</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;{</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;  icmp6_send_response(p, c, 0, <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afae9848904bc4b4b4aa716a7a9a2d7fe">ICMP6_TYPE_TE</a>);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;}</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160; </div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;<span class="keywordtype">void</span></div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;icmp6_param_problem(<span class="keyword">struct</span> <a class="code" href="structpbuf.html">pbuf</a> *p, <span class="keyword">enum</span> <a class="code" href="prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023">icmp6_pp_code</a> c, <a class="code" href="group__compiler__abstraction.html#ga4c14294869aceba3ef9d4c0c302d0f33">u32_t</a> pointer)</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;{</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;  icmp6_send_response(p, c, pointer, <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a63114feac8140031b74424d4a7cf6b26">ICMP6_TYPE_PP</a>);</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;}</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160; </div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;icmp6_send_response(<span class="keyword">struct</span> <a class="code" href="structpbuf.html">pbuf</a> *p, <a class="code" href="group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> code, <a class="code" href="group__compiler__abstraction.html#ga4c14294869aceba3ef9d4c0c302d0f33">u32_t</a> data, <a class="code" href="group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> type)</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;{</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  <span class="keyword">struct </span><a class="code" href="structpbuf.html">pbuf</a> *q;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  <span class="keyword">struct </span><a class="code" href="structicmp6__hdr.html">icmp6_hdr</a> *icmp6hdr;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;  <span class="keyword">const</span> ip6_addr_t *reply_src;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;  ip6_addr_t *reply_dest;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;  ip6_addr_t reply_src_local, reply_dest_local;</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;  <span class="keyword">struct </span><a class="code" href="structip6__hdr.html">ip6_hdr</a> *ip6hdr;</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  <span class="keyword">struct </span><a class="code" href="structnetif.html">netif</a> *<a class="code" href="structnetif.html">netif</a>;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160; </div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;  <span class="comment">/* ICMPv6 header + IPv6 header + data */</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  q = <a class="code" href="group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47">pbuf_alloc</a>(<a class="code" href="group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfafcc1e506061ba69dfa142eb6b3da5f13">PBUF_IP</a>, <span class="keyword">sizeof</span>(<span class="keyword">struct</span> <a class="code" href="structicmp6__hdr.html">icmp6_hdr</a>) + <a class="code" href="prot_2ip6_8h.html#afb4c1dc527be76d8f27591dfb726c023">IP6_HLEN</a> + <a class="code" href="lwipopts_8h.html#aa88c55e37e5d7b865b91a9399313bbbf">LWIP_ICMP6_DATASIZE</a>,</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;                 <a class="code" href="group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac5e9f28455bca98944a030d4b84ecfab">PBUF_RAM</a>);</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  <span class="keywordflow">if</span> (q == <a class="code" href="fat__string_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) {</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <a class="code" href="debug_8h.html#a63a04edf7ff63c951bd8706711956cdb">LWIP_DEBUGF</a>(<a class="code" href="lwipopts_8h.html#a9595904a1cb9bfe0b9b1d958abdc923a">ICMP_DEBUG</a>, (<span class="stringliteral">&quot;icmp_time_exceeded: failed to allocate pbuf for ICMPv6 packet.\n&quot;</span>));</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.memerr);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  }</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  <a class="code" href="debug_8h.html#a94ad086267808462beae2b38f91996ed">LWIP_ASSERT</a>(<span class="stringliteral">&quot;check that first pbuf can hold icmp 6message&quot;</span>,</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;             (q-&gt;<a class="code" href="structpbuf.html#a6f82449625e36e294f5d210268c0703f">len</a> &gt;= (<span class="keyword">sizeof</span>(<span class="keyword">struct</span> <a class="code" href="structicmp6__hdr.html">icmp6_hdr</a>) + <a class="code" href="prot_2ip6_8h.html#afb4c1dc527be76d8f27591dfb726c023">IP6_HLEN</a> + <a class="code" href="lwipopts_8h.html#aa88c55e37e5d7b865b91a9399313bbbf">LWIP_ICMP6_DATASIZE</a>)));</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160; </div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;  icmp6hdr = (<span class="keyword">struct </span><a class="code" href="structicmp6__hdr.html">icmp6_hdr</a> *)q-&gt;<a class="code" href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">payload</a>;</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  icmp6hdr-&gt;type = type;</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;  icmp6hdr-&gt;code = code;</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;  icmp6hdr-&gt;data = data;</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;  <span class="comment">/* copy fields from original packet */</span></div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;  <a class="code" href="lwipopts_8h.html#a8c6e3c1e4f74acb16376188dbf8909ec">SMEMCPY</a>((<a class="code" href="group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> *)q-&gt;<a class="code" href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">payload</a> + <span class="keyword">sizeof</span>(<span class="keyword">struct </span><a class="code" href="structicmp6__hdr.html">icmp6_hdr</a>), (<a class="code" href="group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a> *)p-&gt;<a class="code" href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">payload</a>,</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;          <a class="code" href="prot_2ip6_8h.html#afb4c1dc527be76d8f27591dfb726c023">IP6_HLEN</a> + <a class="code" href="lwipopts_8h.html#aa88c55e37e5d7b865b91a9399313bbbf">LWIP_ICMP6_DATASIZE</a>);</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160; </div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;  <span class="comment">/* Get the destination address and netif for this ICMP message. */</span></div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;  <span class="keywordflow">if</span> ((<a class="code" href="ip_8h.html#aabecef3c7653a9767c79245c44fcab9f">ip_current_netif</a>() == <a class="code" href="fat__string_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) ||</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;      ((code == <a class="code" href="prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869eaec493420d61c80a21981b1aa32befe1f">ICMP6_TE_FRAG</a>) &amp;&amp; (type == <a class="code" href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afae9848904bc4b4b4aa716a7a9a2d7fe">ICMP6_TYPE_TE</a>))) {</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    <span class="comment">/* Special case, as ip6_current_xxx is either NULL, or points</span></div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;<span class="comment">     * to a different packet than the one that expired.</span></div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="comment">     * We must use the addresses that are stored in the expired packet. */</span></div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    ip6hdr = (<span class="keyword">struct </span><a class="code" href="structip6__hdr.html">ip6_hdr</a> *)p-&gt;<a class="code" href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">payload</a>;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="comment">/* copy from packed address to aligned address */</span></div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    ip6_addr_copy(reply_dest_local, ip6hdr-&gt;src);</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    ip6_addr_copy(reply_src_local, ip6hdr-&gt;dest);</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    reply_dest = &amp;reply_dest_local;</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    reply_src = &amp;reply_src_local;</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    <a class="code" href="structnetif.html">netif</a> = ip6_route(reply_src, reply_dest);</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structnetif.html">netif</a> == <a class="code" href="fat__string_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) {</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;      <span class="comment">/* drop */</span></div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;      <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(q);</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;      <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.rterr);</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    }</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;  }</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;  <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    <a class="code" href="structnetif.html">netif</a> = <a class="code" href="ip_8h.html#aabecef3c7653a9767c79245c44fcab9f">ip_current_netif</a>();</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    reply_dest = ip6_current_src_addr();</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160; </div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    <span class="comment">/* Select an address to use as source. */</span></div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    reply_src = <a class="code" href="ip__addr_8h.html#a06e75bcd198012b5ba39480c233608bd">ip_2_ip6</a>(ip6_select_source_address(<a class="code" href="structnetif.html">netif</a>, reply_dest));</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    <span class="keywordflow">if</span> (reply_src == <a class="code" href="fat__string_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>) {</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;      <span class="comment">/* drop */</span></div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;      <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(q);</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;      <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.rterr);</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;      <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    }</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;  }</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160; </div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;  <span class="comment">/* calculate checksum */</span></div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;  icmp6hdr-&gt;chksum = 0;</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;<span class="preprocessor">#if CHECKSUM_GEN_ICMP6</span></div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;  <a class="code" href="netif_8h.html#ad968df1b35c2fae368e087966e3bc677">IF__NETIF_CHECKSUM_ENABLED</a>(<a class="code" href="structnetif.html">netif</a>, NETIF_CHECKSUM_GEN_ICMP6) {</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    icmp6hdr-&gt;chksum = ip6_chksum_pseudo(q, <a class="code" href="prot_2ip6_8h.html#ab277ee09b6e7200fc1cfe28482b886a6">IP6_NEXTH_ICMP6</a>, q-&gt;<a class="code" href="structpbuf.html#a5259e7ec29bab9c0999b64f2e86b411f">tot_len</a>,</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;      reply_src, reply_dest);</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;  }</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHECKSUM_GEN_ICMP6 */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160; </div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;  <a class="code" href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a>(icmp6.xmit);</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  ip6_output_if(q, reply_src, reply_dest, <a class="code" href="lwipopts_8h.html#a82193577b4045e1ac1533c4341a2bd79">LWIP_ICMP6_HL</a>, 0, <a class="code" href="prot_2ip6_8h.html#ab277ee09b6e7200fc1cfe28482b886a6">IP6_NEXTH_ICMP6</a>, <a class="code" href="structnetif.html">netif</a>);</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;  <a class="code" href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a>(q);</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;}</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160; </div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LWIP_ICMP6 &amp;&amp; LWIP_IPV6 */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858afae9848904bc4b4b4aa716a7a9a2d7fe"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858afae9848904bc4b4b4aa716a7a9a2d7fe">ICMP6_TYPE_TE</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00053">icmp6.h:53</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858ac6b91695c06bfc7fb2360310d7b8e78a"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ac6b91695c06bfc7fb2360310d7b8e78a">ICMP6_TYPE_EREP</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00066">icmp6.h:66</a></div></div>
<div class="ttc" id="aopt_8h_html"><div class="ttname"><a href="opt_8h.html">opt.h</a></div></div>
<div class="ttc" id="astructpbuf_html_a6f82449625e36e294f5d210268c0703f"><div class="ttname"><a href="structpbuf.html#a6f82449625e36e294f5d210268c0703f">pbuf::len</a></div><div class="ttdeci">u16_t len</div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8h_source.html#l00159">pbuf.h:159</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858a906dd689f0aa9b4796f49f299d4e3eb0"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a906dd689f0aa9b4796f49f299d4e3eb0">ICMP6_TYPE_MLR</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00070">icmp6.h:70</a></div></div>
<div class="ttc" id="alwipopts_8h_html_aa88c55e37e5d7b865b91a9399313bbbf"><div class="ttname"><a href="lwipopts_8h.html#aa88c55e37e5d7b865b91a9399313bbbf">LWIP_ICMP6_DATASIZE</a></div><div class="ttdeci">#define LWIP_ICMP6_DATASIZE</div><div class="ttdef"><b>Definition:</b> <a href="lwipopts_8h_source.html#l00375">lwipopts.h:375</a></div></div>
<div class="ttc" id="and6_8h_html"><div class="ttname"><a href="nd6_8h.html">nd6.h</a></div></div>
<div class="ttc" id="adebug_8h_html_a94ad086267808462beae2b38f91996ed"><div class="ttname"><a href="debug_8h.html#a94ad086267808462beae2b38f91996ed">LWIP_ASSERT</a></div><div class="ttdeci">#define LWIP_ASSERT(message, assertion)</div><div class="ttdef"><b>Definition:</b> <a href="debug_8h_source.html#l00116">debug.h:116</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858a63114feac8140031b74424d4a7cf6b26"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a63114feac8140031b74424d4a7cf6b26">ICMP6_TYPE_PP</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00055">icmp6.h:55</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858a670d95494c9282f646ac442d81d9a780"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a670d95494c9282f646ac442d81d9a780">ICMP6_TYPE_RS</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00074">icmp6.h:74</a></div></div>
<div class="ttc" id="apbuf_8h_html"><div class="ttname"><a href="pbuf_8h.html">pbuf.h</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_ad06bbf4ee72635ece968db41cbe6869e"><div class="ttname"><a href="prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869e">icmp6_te_code</a></div><div class="ttdeci">icmp6_te_code</div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00116">icmp6.h:116</a></div></div>
<div class="ttc" id="astring_8h_html"><div class="ttname"><a href="string_8h.html">string.h</a></div></div>
<div class="ttc" id="agroup__pbuf_html_ggaee1baa59bb2f85ba575b5a8619ac1ebfafcc1e506061ba69dfa142eb6b3da5f13"><div class="ttname"><a href="group__pbuf.html#ggaee1baa59bb2f85ba575b5a8619ac1ebfafcc1e506061ba69dfa142eb6b3da5f13">PBUF_IP</a></div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8h_source.html#l00080">pbuf.h:80</a></div></div>
<div class="ttc" id="astructpbuf_html_a5259e7ec29bab9c0999b64f2e86b411f"><div class="ttname"><a href="structpbuf.html#a5259e7ec29bab9c0999b64f2e86b411f">pbuf::tot_len</a></div><div class="ttdeci">u16_t tot_len</div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8h_source.html#l00156">pbuf.h:156</a></div></div>
<div class="ttc" id="agroup__compiler__abstraction_html_ga4c14294869aceba3ef9d4c0c302d0f33"><div class="ttname"><a href="group__compiler__abstraction.html#ga4c14294869aceba3ef9d4c0c302d0f33">u32_t</a></div><div class="ttdeci">uint32_t u32_t</div><div class="ttdef"><b>Definition:</b> <a href="arch_8h_source.html#l00126">arch.h:126</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858a1d52ef5024a5822bd622bcb0b9da323d"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1d52ef5024a5822bd622bcb0b9da323d">ICMP6_TYPE_PTB</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00051">icmp6.h:51</a></div></div>
<div class="ttc" id="agroup__pbuf_html_gab0dd696fb4b6bc65e548944584f1738b"><div class="ttname"><a href="group__pbuf.html#gab0dd696fb4b6bc65e548944584f1738b">pbuf_free</a></div><div class="ttdeci">u8_t pbuf_free(struct pbuf *p)</div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8c_source.html#l00715">pbuf.c:715</a></div></div>
<div class="ttc" id="alwipopts_8h_html_a82193577b4045e1ac1533c4341a2bd79"><div class="ttname"><a href="lwipopts_8h.html#a82193577b4045e1ac1533c4341a2bd79">LWIP_ICMP6_HL</a></div><div class="ttdeci">#define LWIP_ICMP6_HL</div><div class="ttdef"><b>Definition:</b> <a href="lwipopts_8h_source.html#l00376">lwipopts.h:376</a></div></div>
<div class="ttc" id="astructicmp6__echo__hdr_html"><div class="ttname"><a href="structicmp6__echo__hdr.html">icmp6_echo_hdr</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00154">icmp6.h:154</a></div></div>
<div class="ttc" id="alwipopts_8h_html_af466a10b093489910a773fd1cec74c2d"><div class="ttname"><a href="lwipopts_8h.html#af466a10b093489910a773fd1cec74c2d">CHECKSUM_CHECK_ICMP6</a></div><div class="ttdeci">#define CHECKSUM_CHECK_ICMP6</div><div class="ttdef"><b>Definition:</b> <a href="lwipopts_8h_source.html#l00364">lwipopts.h:364</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858ae649aa45c97b885f28771688957528a3"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae649aa45c97b885f28771688957528a3">ICMP6_TYPE_EREQ</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00064">icmp6.h:64</a></div></div>
<div class="ttc" id="anetif_8h_html_ad968df1b35c2fae368e087966e3bc677"><div class="ttname"><a href="netif_8h.html#ad968df1b35c2fae368e087966e3bc677">IF__NETIF_CHECKSUM_ENABLED</a></div><div class="ttdeci">#define IF__NETIF_CHECKSUM_ENABLED(netif, chksumflag)</div><div class="ttdef"><b>Definition:</b> <a href="netif_8h_source.html#l00357">netif.h:357</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a3a817e777ebcfd705e8e5a1b4c5ae023"><div class="ttname"><a href="prot_2icmp6_8h.html#a3a817e777ebcfd705e8e5a1b4c5ae023">icmp6_pp_code</a></div><div class="ttdeci">icmp6_pp_code</div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00124">icmp6.h:124</a></div></div>
<div class="ttc" id="astats_8h_html"><div class="ttname"><a href="stats_8h.html">stats.h</a></div></div>
<div class="ttc" id="aicmp6_8h_html"><div class="ttname"><a href="icmp6_8h.html">icmp6.h</a></div></div>
<div class="ttc" id="anetif_8h_html"><div class="ttname"><a href="netif_8h.html">netif.h</a></div></div>
<div class="ttc" id="amld6_8h_html"><div class="ttname"><a href="mld6_8h.html">mld6.h</a></div></div>
<div class="ttc" id="aip_8h_html_aabecef3c7653a9767c79245c44fcab9f"><div class="ttname"><a href="ip_8h.html#aabecef3c7653a9767c79245c44fcab9f">ip_current_netif</a></div><div class="ttdeci">#define ip_current_netif()</div><div class="ttdef"><b>Definition:</b> <a href="ip_8h_source.html#l00133">ip.h:133</a></div></div>
<div class="ttc" id="agroup__pbuf_html_gacfcb0a2af918658ba0afe36499c65f47"><div class="ttname"><a href="group__pbuf.html#gacfcb0a2af918658ba0afe36499c65f47">pbuf_alloc</a></div><div class="ttdeci">struct pbuf * pbuf_alloc(pbuf_layer l, u16_t length, pbuf_type type)</div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8c_source.html#l00248">pbuf.c:248</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858ae4ae04be7df3a2cce614af0a5cdae951"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ae4ae04be7df3a2cce614af0a5cdae951">ICMP6_TYPE_RA</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00076">icmp6.h:76</a></div></div>
<div class="ttc" id="agroup__compiler__abstraction_html_ga4caecabca98b43919dd11be1c0d4cd8e"><div class="ttname"><a href="group__compiler__abstraction.html#ga4caecabca98b43919dd11be1c0d4cd8e">u8_t</a></div><div class="ttdeci">uint8_t u8_t</div><div class="ttdef"><b>Definition:</b> <a href="arch_8h_source.html#l00122">arch.h:122</a></div></div>
<div class="ttc" id="aprot_2ip6_8h_html_ab277ee09b6e7200fc1cfe28482b886a6"><div class="ttname"><a href="prot_2ip6_8h.html#ab277ee09b6e7200fc1cfe28482b886a6">IP6_NEXTH_ICMP6</a></div><div class="ttdeci">#define IP6_NEXTH_ICMP6</div><div class="ttdef"><b>Definition:</b> <a href="prot_2ip6_8h_source.html#l00070">ip6.h:70</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858a0f6702d62de5f873e0afe7431d878207"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0f6702d62de5f873e0afe7431d878207">ICMP6_TYPE_RD</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00082">icmp6.h:82</a></div></div>
<div class="ttc" id="astructnetif_html"><div class="ttname"><a href="structnetif.html">netif</a></div><div class="ttdef"><b>Definition:</b> <a href="netif_8h_source.html#l00233">netif.h:233</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858a0d8d8717c6c34053d1101932c23929fe"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a0d8d8717c6c34053d1101932c23929fe">ICMP6_TYPE_NS</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00078">icmp6.h:78</a></div></div>
<div class="ttc" id="alwipopts_8h_html_a9595904a1cb9bfe0b9b1d958abdc923a"><div class="ttname"><a href="lwipopts_8h.html#a9595904a1cb9bfe0b9b1d958abdc923a">ICMP_DEBUG</a></div><div class="ttdeci">#define ICMP_DEBUG</div><div class="ttdef"><b>Definition:</b> <a href="lwipopts_8h_source.html#l00443">lwipopts.h:443</a></div></div>
<div class="ttc" id="aip__addr_8h_html_a06e75bcd198012b5ba39480c233608bd"><div class="ttname"><a href="ip__addr_8h.html#a06e75bcd198012b5ba39480c233608bd">ip_2_ip6</a></div><div class="ttdeci">#define ip_2_ip6(ipaddr)</div><div class="ttdef"><b>Definition:</b> <a href="ip__addr_8h_source.html#l00301">ip_addr.h:301</a></div></div>
<div class="ttc" id="astructicmp6__hdr_html"><div class="ttname"><a href="structicmp6__hdr.html">icmp6_hdr</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00138">icmp6.h:138</a></div></div>
<div class="ttc" id="agroup__pbuf_html_gaba88511dee3df4b631fde691f421320d"><div class="ttname"><a href="group__pbuf.html#gaba88511dee3df4b631fde691f421320d">pbuf_copy</a></div><div class="ttdeci">err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from)</div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8c_source.html#l00949">pbuf.c:949</a></div></div>
<div class="ttc" id="agroup__pbuf_html_ggab7e0e32fcc292c0d7107721766ed92fbac5e9f28455bca98944a030d4b84ecfab"><div class="ttname"><a href="group__pbuf.html#ggab7e0e32fcc292c0d7107721766ed92fbac5e9f28455bca98944a030d4b84ecfab">PBUF_RAM</a></div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8h_source.html#l00108">pbuf.h:108</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html"><div class="ttname"><a href="prot_2icmp6_8h.html">icmp6.h</a></div></div>
<div class="ttc" id="agroup__infrastructure__errors_html_ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb"><div class="ttname"><a href="group__infrastructure__errors.html#ggae2e66c7d13afc90ffecd6151680fbadcaa26c163b80b1f6786ca81dadc14b00fb">ERR_OK</a></div><div class="ttdef"><b>Definition:</b> <a href="err_8h_source.html#l00063">err.h:63</a></div></div>
<div class="ttc" id="aip_8h_html"><div class="ttname"><a href="ip_8h.html">ip.h</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858aad9d4f207459e4bbd0c33a25adf6fdd7"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858aad9d4f207459e4bbd0c33a25adf6fdd7">ICMP6_TYPE_DUR</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00049">icmp6.h:49</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a11fe21b0a8c1bc73ee887a96bf416ccf"><div class="ttname"><a href="prot_2icmp6_8h.html#a11fe21b0a8c1bc73ee887a96bf416ccf">icmp6_dur_code</a></div><div class="ttdeci">icmp6_dur_code</div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00098">icmp6.h:98</a></div></div>
<div class="ttc" id="aprot_2ip6_8h_html_afb4c1dc527be76d8f27591dfb726c023"><div class="ttname"><a href="prot_2ip6_8h.html#afb4c1dc527be76d8f27591dfb726c023">IP6_HLEN</a></div><div class="ttdeci">#define IP6_HLEN</div><div class="ttdef"><b>Definition:</b> <a href="prot_2ip6_8h_source.html#l00062">ip6.h:62</a></div></div>
<div class="ttc" id="aip6__addr_8h_html"><div class="ttname"><a href="ip6__addr_8h.html">ip6_addr.h</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_ad06bbf4ee72635ece968db41cbe6869eaec493420d61c80a21981b1aa32befe1f"><div class="ttname"><a href="prot_2icmp6_8h.html#ad06bbf4ee72635ece968db41cbe6869eaec493420d61c80a21981b1aa32befe1f">ICMP6_TE_FRAG</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00120">icmp6.h:120</a></div></div>
<div class="ttc" id="alwipopts_8h_html_a8c6e3c1e4f74acb16376188dbf8909ec"><div class="ttname"><a href="lwipopts_8h.html#a8c6e3c1e4f74acb16376188dbf8909ec">SMEMCPY</a></div><div class="ttdeci">#define SMEMCPY(dst, src, len)</div><div class="ttdef"><b>Definition:</b> <a href="lwipopts_8h_source.html#l00044">lwipopts.h:44</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858a04228a1d11f9f88bd165f3430188bfe7"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a04228a1d11f9f88bd165f3430188bfe7">ICMP6_TYPE_MLD</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00072">icmp6.h:72</a></div></div>
<div class="ttc" id="astructip6__hdr_html"><div class="ttname"><a href="structip6__hdr.html">ip6_hdr</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2ip6_8h_source.html#l00080">ip6.h:80</a></div></div>
<div class="ttc" id="astructpbuf_html"><div class="ttname"><a href="structpbuf.html">pbuf</a></div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8h_source.html#l00142">pbuf.h:142</a></div></div>
<div class="ttc" id="adebug_8h_html_a63a04edf7ff63c951bd8706711956cdb"><div class="ttname"><a href="debug_8h.html#a63a04edf7ff63c951bd8706711956cdb">LWIP_DEBUGF</a></div><div class="ttdeci">#define LWIP_DEBUGF(debug, message)</div><div class="ttdef"><b>Definition:</b> <a href="debug_8h_source.html#l00164">debug.h:164</a></div></div>
<div class="ttc" id="aip6_8h_html"><div class="ttname"><a href="ip6_8h.html">ip6.h</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858a1f99d333f425c28d3840e029cc9c46f3"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858a1f99d333f425c28d3840e029cc9c46f3">ICMP6_TYPE_NA</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00080">icmp6.h:80</a></div></div>
<div class="ttc" id="aprot_2icmp6_8h_html_a6e10428d8f6102013b30013065716858ad9794ae12b9ca196cc4fafaf6d834375"><div class="ttname"><a href="prot_2icmp6_8h.html#a6e10428d8f6102013b30013065716858ad9794ae12b9ca196cc4fafaf6d834375">ICMP6_TYPE_MLQ</a></div><div class="ttdef"><b>Definition:</b> <a href="prot_2icmp6_8h_source.html#l00068">icmp6.h:68</a></div></div>
<div class="ttc" id="astats_8h_html_a8bb9ee6af1218b8d9973815fa866260c"><div class="ttname"><a href="stats_8h.html#a8bb9ee6af1218b8d9973815fa866260c">ICMP6_STATS_INC</a></div><div class="ttdeci">#define ICMP6_STATS_INC(x)</div><div class="ttdef"><b>Definition:</b> <a href="stats_8h_source.html#l00436">stats.h:436</a></div></div>
<div class="ttc" id="ainet__chksum_8h_html"><div class="ttname"><a href="inet__chksum_8h.html">inet_chksum.h</a></div></div>
<div class="ttc" id="astructpbuf_html_a8d32dc3e964369d4eec638fc37fbc460"><div class="ttname"><a href="structpbuf.html#a8d32dc3e964369d4eec638fc37fbc460">pbuf::payload</a></div><div class="ttdeci">void * payload</div><div class="ttdef"><b>Definition:</b> <a href="pbuf_8h_source.html#l00147">pbuf.h:147</a></div></div>
<div class="ttc" id="afat__string_8h_html_a070d2ce7b6bb7e5c05602aa8c308d0c4"><div class="ttname"><a href="fat__string_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a></div><div class="ttdeci">#define NULL</div><div class="ttdef"><b>Definition:</b> <a href="fat__string_8h_source.html#l00017">fat_string.h:17</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_e6bb53534ac0e427887cf7a94c0c004e.html">C:</a></li><li class="navelem"><a class="el" href="dir_d99d5d4662bf24521eef49da6a8cd34d.html">Dev</a></li><li class="navelem"><a class="el" href="dir_474a4b306371cf7e7f6fa12cb0b77df6.html">git</a></li><li class="navelem"><a class="el" href="dir_849109bbd106d461b128d63e5babcedf.html">UbixOS</a></li><li class="navelem"><a class="el" href="dir_6ec99f6d7d5182ba8913209ab70c9f18.html">sys</a></li><li class="navelem"><a class="el" href="dir_6ed706464e1919433e32bb89560817da.html">net</a></li><li class="navelem"><a class="el" href="dir_cd4906596c0f2eb6dae79633ab001247.html">core</a></li><li class="navelem"><a class="el" href="dir_55dd03b94777b988453988bedf92c9ac.html">ipv6</a></li><li class="navelem"><a class="el" href="icmp6_8c.html">icmp6.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
  </ul>
</div>
</body>
</html>