iflib.html
来自「vxworks相关论文」· HTML 代码 · 共 593 行 · 第 1/2 页
HTML
593 行
</blockquote><h1><i>ifMaskGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ifMaskGet</i>( )</strong> - get the subnet mask for a network interface</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifMaskGet ( char * interfaceName, /* name of interface, i.e. ei0 */ int * netMask /* buffer for subnet mask */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the subnet mask for a specified network interface.The subnet mask is copied to the buffer <i>netMask</i>. The subnet mask isreturned in host byte order.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b>, <b><i><a href="./ifLib.html#ifAddrGet">ifAddrGet</a></i>( )</b>, <b><i><a href="./ifLib.html#ifFlagGet">ifFlagGet</a></i>( )</b><hr><a name="ifFlagChange"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ifFlagChange</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ifFlagChange</i>( )</strong> - change the network interface flags</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifFlagChange ( char * interfaceName, /* name of the network interface, i.e. ei0 */ int flags, /* the flag to be changed */ BOOL on /* TRUE=turn on, FALSE=turn off */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine changes the flags for the specified network interfaces. Ifthe parameter <i>on</i> is TRUE, the specified flags are turned on; otherwise,they are turned off. The routines <b><i><a href="./ifLib.html#ifFlagGet">ifFlagGet</a></i>( )</b> and <b><i><a href="./ifLib.html#ifFlagSet">ifFlagSet</a></i>( )</b> are calledto do the actual work.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b>, <b><i><a href="./ifLib.html#ifAddrSet">ifAddrSet</a></i>( )</b>, <b><i><a href="./ifLib.html#ifMaskSet">ifMaskSet</a></i>( )</b>, <b><i><a href="./ifLib.html#ifFlagSet">ifFlagSet</a></i>( )</b>, <b><i><a href="./ifLib.html#ifFlagGet">ifFlagGet</a></i>( )</b><hr><a name="ifFlagSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ifFlagSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ifFlagSet</i>( )</strong> - specify the flags for a network interface</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifFlagSet ( char * interfaceName, /* name of the network interface, i.e. ei0 */ int flags /* network flags */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine changes the flags for a specified network interface.Any combination of the following flags can be specified:<p><dl><dt><b>IFF_UP</b> (0x1)<dd>Brings the network up or down.<p><dt><b>IFF_DEBUG</b> (0x4)<dd>Turns on debugging for the driver interface if supported.<p><dt><b>IFF_LOOPBACK</b> (0x8)<dd>Set for a loopback network.<p><dt><b>IFF_NOTRAILERS</b> (0x20)<dd>Always set (VxWorks does not use the trailer protocol).<p><dt><b>IFF_PROMISC</b> (0x100)<dd>Tells the driver to accept all packets, not just broadcast packets andpackets addressed to itself. <p><dt><b>IFF_ALLMULTI</b> (0x200)<dd>Tells the driver to accept all multicast packets.<p><dt><b>IFF_NOARP</b> (0x80)<dd> Disables ARP for the interface. </dl><p></blockquote><h4>NOTE</h4><blockquote><p>The following flags can only be set at interface initialization time.Specifying these flags does not change any settings in the interfacedata structure.<p><dl><dt><b>IFF_POINTOPOINT</b> (0x10)<dd>Identifies a point-to-point interface such as PPP or SLIP.<p><dt><b>IFF_RUNNING</b> (0x40)<dd>Set when the device turns on.<p><dt><b>IFF_BROADCAST</b> (0x2)<dd> Identifies a broadcast interface. </dl><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b>, <b><i><a href="./ifLib.html#ifFlagChange">ifFlagChange</a></i>( )</b>, <b><i><a href="./ifLib.html#ifFlagGet">ifFlagGet</a></i>( )</b><hr><a name="ifFlagGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ifFlagGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ifFlagGet</i>( )</strong> - get the network interface flags</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifFlagGet ( char * interfaceName, /* name of the network interface, i.e. ei0 */ int * flags /* network flags returned here */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the flags for a specified network interface.The flags are copied to the buffer <i>flags</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b>, <b><i><a href="./ifLib.html#ifFlagSet">ifFlagSet</a></i>( )</b><hr><a name="ifMetricSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ifMetricSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ifMetricSet</i>( )</strong> - specify a network interface hop count</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifMetricSet ( char * interfaceName, /* name of the network interface, i.e. ei0 */ int metric /* metric for this interface */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine configures <i>metric</i> for a network interface from the hostmachine to the destination network. This information is used primarily bythe IP routing algorithm to compute the relative distance for a collectionof hosts connected to each interface. For example, a higher <i>metric</i> forSLIP interfaces can be specified to discourage routing a packet to slowerserial line connections. Note that when <i>metric</i> is zero, the IP routingalgorithm allows for the direct sending of a packet having an IP networkaddress that is not necessarily the same as the local network address.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b>, <b><i><a href="./ifLib.html#ifMetricGet">ifMetricGet</a></i>( )</b><hr><a name="ifMetricGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ifMetricGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ifMetricGet</i>( )</strong> - get the metric for a network interface</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifMetricGet ( char * interfaceName, /* name of the network interface, i.e. ei0 */ int * pMetric /* returned interface's metric */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine retrieves the metric for a specified network interface.The metric is copied to the buffer <i>pMetric</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b>, <b><i><a href="./ifLib.html#ifMetricSet">ifMetricSet</a></i>( )</b><hr><a name="ifRouteDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ifRouteDelete</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ifRouteDelete</i>( )</strong> - delete routes associated with a network interface</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int ifRouteDelete ( char * ifName, /* name of the interface */ int unit /* unit number for this interface */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes all routes that have been associated with thespecified interface. A route is associated with an interface if its destination equals to the assigned address, or network number. This routinedoes not remove routes to arbitrary destinations which pass through thegiven interface.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>The number of routes deleted, or ERROR if an interface is not specified.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b><hr><a name="ifunit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ifunit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ifunit</i>( )</strong> - map an interface name to an interface structure pointer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>struct ifnet *ifunit ( char * ifname /* name of the interface */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns a pointer to a network interface structure for <i>name</i> orNULL if no such interface exists. For example:<pre> struct ifnet *pIf; ... pIf = ifunit ("ln0");</pre><b>pIf</b> points to the data structure that describes the first network interfacedevice if ln0 is mapped successfully.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the interface structure, or NULL if an interface is notfound.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b>, <b><a href="./etherLib.html#top">etherLib</a></b></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?