📄 iflib.html
字号:
host part of all ones (e.g., 90.255.255.255). This conforms to currentARPA specifications. However, some older systems use an Internet addresswith a host part of all zeros as the broadcast address.<p></blockquote><h4>NOTE</h4><blockquote><p>VxWorks automatically accepts a host part of all zeros as a broadcastaddress, in addition to the default or specified broadcast address. Butif VxWorks is to broadcast to older systems using a host part of all zerosas the broadcast address, this routine should be used to change thebroadcast address of the interface.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ifLib.html#top">ifLib</a></b><hr><a name="ifBroadcastGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ifBroadcastGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ifBroadcastGet( )</strong> - get the broadcast address for a network interface</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifBroadcastGet ( char * interfaceName, /* name of interface, i.e. ei0 */ char * broadcastAddress /* buffer for broadcast address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the broadcast address for a specified network interface.The broadcast address is copied to the buffer <i>broadcastAddress</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><a href="./ifLib.html#ifBroadcastSet">ifBroadcastSet</a>( )</b><hr><a name="ifDstAddrSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ifDstAddrSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ifDstAddrSet( )</strong> - define an address for the other end of a point-to-point link</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifDstAddrSet ( char * interfaceName, /* name of interface to configure, i.e. ei0 */ char * dstAddress /* Internet address to assign to destination */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine assigns the Internet address of a machine connected to theopposite end of a point-to-point network connection, such as a SLIPconnection. Inherently, point-to-point connection-oriented protocols such asSLIP require that addresses for both ends of a connection be specified.<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><a href="./ifLib.html#ifAddrSet">ifAddrSet</a>( )</b>, <b><a href="./ifLib.html#ifDstAddrGet">ifDstAddrGet</a>( )</b><hr><a name="ifDstAddrGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ifDstAddrGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ifDstAddrGet( )</strong> - get the Internet address of a point-to-point peer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifDstAddrGet ( char * interfaceName, /* name of interface, i.e. ei0 */ char * dstAddress /* buffer for destination address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the Internet address of a machine connected to theopposite end of a point-to-point network connection. The Internet address iscopied to the buffer <i>dstAddress</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><a href="./ifLib.html#ifDstAddrSet">ifDstAddrSet</a>( )</b>, <b><a href="./ifLib.html#ifAddrGet">ifAddrGet</a>( )</b><hr><a name="ifMaskSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ifMaskSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ifMaskSet( )</strong> - define a subnet for a network interface</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ifMaskSet ( char * interfaceName, /* name of interface to set mask for, i.e. ei0 */ int netMask /* subnet mask (e.g. 0xff000000) */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allocates additional bits to the network portion of anInternet address. The network portion is specified with a mask that mustcontain ones in all positions that are to be interpreted as the networkportion. This includes all the bits that are normally interpreted as thenetwork portion for the given class of address, plus the bits to be added.Note that all bits must be contiguous. The mask is specified in host byteorder.<p>In order to correctly interpret the address, a subnet mask should be setfor an interface prior to setting the Internet address of the interfacewith the routine <b><a href="./ifLib.html#ifAddrSet">ifAddrSet</a>( )</b>.<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><a href="./ifLib.html#ifAddrSet">ifAddrSet</a>( )</b><hr><a name="ifMaskGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ifMaskGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ifMaskGet( )</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><a href="./ifLib.html#ifAddrGet">ifAddrGet</a>( )</b>, <b><a href="./ifLib.html#ifFlagGet">ifFlagGet</a>( )</b><hr><a name="ifFlagChange"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ifFlagChange( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ifFlagChange( )</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><a href="./ifLib.html#ifFlagGet">ifFlagGet</a>( )</b> and <b><a href="./ifLib.html#ifFlagSet">ifFlagSet</a>( )</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><a href="./ifLib.html#ifAddrSet">ifAddrSet</a>( )</b>, <b><a href="./ifLib.html#ifMaskSet">ifMaskSet</a>( )</b>, <b><a href="./ifLib.html#ifFlagSet">ifFlagSet</a>( )</b>, <b><a href="./ifLib.html#ifFlagGet">ifFlagGet</a>( )</b><hr><a name="ifFlagSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ifFlagSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ifFlagSet( )</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.<dt><b>IFF_DEBUG</b> (0x4)<dd>Turns on debugging for the driver interface if supported.<dt><b>IFF_LOOPBACK</b> (0x8)<dd>Set for a loopback network.<dt><b>IFF_NOTRAILERS</b> (0x20)<dd>Always set (VxWorks does not use the trailer protocol).<dt><b>IFF_PROMISC</b> (0x100)<dd>Tells the driver to accept all packets, not just broadcast packets andpackets addressed to itself. <dt><b>IFF_ALLMULTI</b> (0x200)<dd>Tells the driver to accept all multicast packets.<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.<dt><b>IFF_RUNNING</b> (0x40)<dd>Set when the device turns on.<dt><b>IFF_BROADCAST</b> (0x2)<dd>Identifies a broadcast interface.</dl><p></blockquote><h4>RETURNS</h4><blockquote><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -