embeddedsw/ThirdParty/sw_services/lwip140/doc/html/netif_8c.html
Jagannadha Sutradharudu Teki 2c8f92039d embeddesw: Add initial code support
Added initial support Xilinx Embedded Software.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-06-24 16:45:01 +05:30

611 lines
29 KiB
HTML
Executable file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>2014.1_doc: U:/hsm_publish/HEAD/data/embeddedsw/ThirdParty/sw_services/lwip140_v2_0/src/lwip-1.4.0/src/core/netif.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.5 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li id="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="dir_U_3A_2F.html">U:</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2F.html">hsm_publish</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2F.html">HEAD</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2F.html">data</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2Fembeddedsw_2F.html">embeddedsw</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2Fembeddedsw_2FThirdParty_2F.html">ThirdParty</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2Fembeddedsw_2FThirdParty_2Fsw_5Fservices_2F.html">sw_services</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2Fembeddedsw_2FThirdParty_2Fsw_5Fservices_2Flwip140_5Fv2_5F0_2F.html">lwip140_v2_0</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2Fembeddedsw_2FThirdParty_2Fsw_5Fservices_2Flwip140_5Fv2_5F0_2Fsrc_2F.html">src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2Fembeddedsw_2FThirdParty_2Fsw_5Fservices_2Flwip140_5Fv2_5F0_2Fsrc_2Flwip_2D1_2E4_2E0_2F.html">lwip-1.4.0</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2Fembeddedsw_2FThirdParty_2Fsw_5Fservices_2Flwip140_5Fv2_5F0_2Fsrc_2Flwip_2D1_2E4_2E0_2Fsrc_2F.html">src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_U_3A_2Fhsm_5Fpublish_2FHEAD_2Fdata_2Fembeddedsw_2FThirdParty_2Fsw_5Fservices_2Flwip140_5Fv2_5F0_2Fsrc_2Flwip_2D1_2E4_2E0_2Fsrc_2Fcore_2F.html">core</a></div>
<h1>netif.c File Reference</h1><code>#include &quot;<a class="el" href="opt_8h.html">lwip/opt.h</a>&quot;</code><br>
<code>#include &quot;lwip/def.h&quot;</code><br>
<code>#include &quot;lwip/ip_addr.h&quot;</code><br>
<code>#include &quot;lwip/netif.h&quot;</code><br>
<code>#include &quot;lwip/tcp_impl.h&quot;</code><br>
<code>#include &quot;lwip/snmp.h&quot;</code><br>
<code>#include &quot;lwip/igmp.h&quot;</code><br>
<code>#include &quot;netif/etharp.h&quot;</code><br>
<code>#include &quot;lwip/stats.h&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structnetif.html">netif</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#56b6ce67efac757ebc0e9d7c40857470">netif_add</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#76f3d09ccb2ee7968ba38294c2d01d4b">netif_set_addr</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#4edd295db077ccb63085ca17ab32ab26">netif_remove</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structnetif.html">netif</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#e120e1009b55dd733b90619112c8a3ed">netif_find</a> (char *name)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#12c33473c535c87ebc0c6a892e45810f">netif_set_ipaddr</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>, ip_addr_t *ipaddr)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#5036a2a27bef8f835cd619a6c1e3bab7">netif_set_gw</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>, ip_addr_t *gw)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#3d21671eaa2592413600c64c4c5be748">netif_set_netmask</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>, ip_addr_t *netmask)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#d85f16453fd9c756c8a8f551d9bb4a6e">netif_set_default</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#17e9866053d5ddef2e5c8732ec3a2cb2">netif_set_up</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#374d5f56004ca33785734a90f3f5c654">netif_set_down</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#68f4dadf14023caafb7b656c444c3ab6">netif_set_link_up</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#09d871fa54ef4fcf1573c05789c49794">netif_set_link_down</a> (struct <a class="el" href="structnetif.html">netif</a> *<a class="el" href="structnetif.html">netif</a>)</td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structnetif.html">netif</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#6b00fb4d91d7e043fedbbefeec39f9bc">netif_list</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structnetif.html">netif</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="netif_8c.html#e6b3b13c5795bc447cdf538aec6eb829">netif_default</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
lwIP network interface abstraction <hr><h2>Function Documentation</h2>
<a class="anchor" name="56b6ce67efac757ebc0e9d7c40857470"></a><!-- doxytag: member="netif.c::netif_add" ref="56b6ce67efac757ebc0e9d7c40857470" args="(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a>* netif_add </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>netif</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>ipaddr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>netmask</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>gw</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>void *&nbsp;</td>
<td class="mdname" nowrap> <em>state</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>netif_init_fn&nbsp;</td>
<td class="mdname" nowrap> <em>init</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>netif_input_fn&nbsp;</td>
<td class="mdname" nowrap> <em>input</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Add a network interface to the list of lwIP netifs.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>netif</em>&nbsp;</td><td>a pre-allocated netif structure </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ipaddr</em>&nbsp;</td><td>IP address for the new netif </td></tr>
<tr><td valign="top"></td><td valign="top"><em>netmask</em>&nbsp;</td><td>network mask for the new netif </td></tr>
<tr><td valign="top"></td><td valign="top"><em>gw</em>&nbsp;</td><td>default gateway IP address for the new netif </td></tr>
<tr><td valign="top"></td><td valign="top"><em>state</em>&nbsp;</td><td>opaque data passed to the new netif </td></tr>
<tr><td valign="top"></td><td valign="top"><em>init</em>&nbsp;</td><td>callback function that initializes the interface </td></tr>
<tr><td valign="top"></td><td valign="top"><em>input</em>&nbsp;</td><td>callback function that is called to pass ingress packets up in the protocol layer stack.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>netif, or NULL if failed. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="e120e1009b55dd733b90619112c8a3ed"></a><!-- doxytag: member="netif.c::netif_find" ref="e120e1009b55dd733b90619112c8a3ed" args="(char *name)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a>* netif_find </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">char *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>name</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Find a network interface by searching for its name<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>the name of the netif (like netif-&gt;name) plus concatenated number in ascii representation (e.g. 'en0') </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="4edd295db077ccb63085ca17ab32ab26"></a><!-- doxytag: member="netif.c::netif_remove" ref="4edd295db077ccb63085ca17ab32ab26" args="(struct netif *netif)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_remove </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>netif</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Remove a network interface from the list of lwIP netifs.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>netif</em>&nbsp;</td><td>the network interface to remove </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="76f3d09ccb2ee7968ba38294c2d01d4b"></a><!-- doxytag: member="netif.c::netif_set_addr" ref="76f3d09ccb2ee7968ba38294c2d01d4b" args="(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_addr </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>netif</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>ipaddr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>netmask</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>gw</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Change IP address configuration for a network interface (including netmask and default gateway).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>netif</em>&nbsp;</td><td>the network interface to change </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ipaddr</em>&nbsp;</td><td>the new IP address </td></tr>
<tr><td valign="top"></td><td valign="top"><em>netmask</em>&nbsp;</td><td>the new netmask </td></tr>
<tr><td valign="top"></td><td valign="top"><em>gw</em>&nbsp;</td><td>the new default gateway </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="d85f16453fd9c756c8a8f551d9bb4a6e"></a><!-- doxytag: member="netif.c::netif_set_default" ref="d85f16453fd9c756c8a8f551d9bb4a6e" args="(struct netif *netif)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_default </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>netif</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set a network interface as the default network interface (used to output all packets for which no specific route is found)<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>netif</em>&nbsp;</td><td>the default network interface </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="374d5f56004ca33785734a90f3f5c654"></a><!-- doxytag: member="netif.c::netif_set_down" ref="374d5f56004ca33785734a90f3f5c654" args="(struct netif *netif)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_down </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>netif</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Bring an interface down, disabling any traffic processing.<p>
<dl compact><dt><b>Note:</b></dt><dd>: Enabling DHCP on a down interface will make it come up once configured.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd>dhcp_start() </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="5036a2a27bef8f835cd619a6c1e3bab7"></a><!-- doxytag: member="netif.c::netif_set_gw" ref="5036a2a27bef8f835cd619a6c1e3bab7" args="(struct netif *netif, ip_addr_t *gw)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_gw </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>netif</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>gw</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Change the default gateway for a network interface<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>netif</em>&nbsp;</td><td>the network interface to change </td></tr>
<tr><td valign="top"></td><td valign="top"><em>gw</em>&nbsp;</td><td>the new default gateway</td></tr>
</table>
</dl>
<dl compact><dt><b>Note:</b></dt><dd>call <a class="el" href="netif_8c.html#76f3d09ccb2ee7968ba38294c2d01d4b">netif_set_addr()</a> if you also want to change ip address and netmask </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="12c33473c535c87ebc0c6a892e45810f"></a><!-- doxytag: member="netif.c::netif_set_ipaddr" ref="12c33473c535c87ebc0c6a892e45810f" args="(struct netif *netif, ip_addr_t *ipaddr)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_ipaddr </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>netif</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>ipaddr</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Change the IP address of a network interface<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>netif</em>&nbsp;</td><td>the network interface to change </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ipaddr</em>&nbsp;</td><td>the new IP address</td></tr>
</table>
</dl>
<dl compact><dt><b>Note:</b></dt><dd>call <a class="el" href="netif_8c.html#76f3d09ccb2ee7968ba38294c2d01d4b">netif_set_addr()</a> if you also want to change netmask and default gateway </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="09d871fa54ef4fcf1573c05789c49794"></a><!-- doxytag: member="netif.c::netif_set_link_down" ref="09d871fa54ef4fcf1573c05789c49794" args="(struct netif *netif)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_link_down </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>netif</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Called by a driver when its link goes down </td>
</tr>
</table>
<a class="anchor" name="68f4dadf14023caafb7b656c444c3ab6"></a><!-- doxytag: member="netif.c::netif_set_link_up" ref="68f4dadf14023caafb7b656c444c3ab6" args="(struct netif *netif)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_link_up </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>netif</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Called by a driver when its link goes up </td>
</tr>
</table>
<a class="anchor" name="3d21671eaa2592413600c64c4c5be748"></a><!-- doxytag: member="netif.c::netif_set_netmask" ref="3d21671eaa2592413600c64c4c5be748" args="(struct netif *netif, ip_addr_t *netmask)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_netmask </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>netif</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>ip_addr_t *&nbsp;</td>
<td class="mdname" nowrap> <em>netmask</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Change the netmask of a network interface<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>netif</em>&nbsp;</td><td>the network interface to change </td></tr>
<tr><td valign="top"></td><td valign="top"><em>netmask</em>&nbsp;</td><td>the new netmask</td></tr>
</table>
</dl>
<dl compact><dt><b>Note:</b></dt><dd>call <a class="el" href="netif_8c.html#76f3d09ccb2ee7968ba38294c2d01d4b">netif_set_addr()</a> if you also want to change ip address and default gateway </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="17e9866053d5ddef2e5c8732ec3a2cb2"></a><!-- doxytag: member="netif.c::netif_set_up" ref="17e9866053d5ddef2e5c8732ec3a2cb2" args="(struct netif *netif)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void netif_set_up </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a> *&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>netif</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Bring an interface up, available for processing traffic.<p>
<dl compact><dt><b>Note:</b></dt><dd>: Enabling DHCP on a down interface will make it come up once configured.</dd></dl>
<dl compact><dt><b>See also:</b></dt><dd>dhcp_start() </dd></dl>
</td>
</tr>
</table>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="e6b3b13c5795bc447cdf538aec6eb829"></a><!-- doxytag: member="netif.c::netif_default" ref="e6b3b13c5795bc447cdf538aec6eb829" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a>* <a class="el" href="netif_8c.html#e6b3b13c5795bc447cdf538aec6eb829">netif_default</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
The default network interface. </td>
</tr>
</table>
<a class="anchor" name="6b00fb4d91d7e043fedbbefeec39f9bc"></a><!-- doxytag: member="netif.c::netif_list" ref="6b00fb4d91d7e043fedbbefeec39f9bc" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">struct <a class="el" href="structnetif.html">netif</a>* <a class="el" href="netif_8c.html#6b00fb4d91d7e043fedbbefeec39f9bc">netif_list</a> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
The list of network interfaces. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Fri Feb 14 12:33:21 2014 for 2014.1_doc by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
</body>
</html>