⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inetlib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<b><a href="./inetLib.html#top">inetLib</a></b>, <b><i><a href="./inetLib.html#inet_makeaddr_b">inet_makeaddr_b</a></i>(&nbsp;)</b><hr><a name="inet_netof"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>inet_netof</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>inet_netof</i>(&nbsp;)</strong> - return the network number from an Internet address</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int inet_netof    (    struct in_addr inetAddress /* inet address */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine extracts the network portion of an Internet address.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following example returns 0x5a:<pre>    inet_netof (0x5a000002);</pre></blockquote><h4>RETURNS</h4><blockquote><p>The network portion of <i>inetAddress</i>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./inetLib.html#top">inetLib</a></b><hr><a name="inet_netof_string"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>inet_netof_string</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>inet_netof_string</i>(&nbsp;)</strong> - extract the network address in dot notation</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void inet_netof_string    (    char * inetString, /* inet addr to extract local portion from */    char * netString   /* net inet address to return */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine extracts the network Internet address from a host Internetaddress (specified in dotted decimal notation).  The routine handles class A, B, and C network addresses.  The buffer <i>netString</i> should be <b>INET_ADDR_LEN</b> bytes long.<p></blockquote><h4>NOTE</h4><blockquote><p>This is the only routine in <b><a href="./inetLib.html#top">inetLib</a></b> that handles subnet masks correctly.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following example copies "90.0.0.0" to <i>netString</i>:<pre>    inet_netof_string ("90.0.0.2", netString);</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./inetLib.html#top">inetLib</a></b><hr><a name="inet_network"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>inet_network</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>inet_network</i>(&nbsp;)</strong> - convert an Internet network number from string to address</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>u_long inet_network    (    char * inetString /* string version of inet addr */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine forms a network address from an ASCII string containingan Internet network number.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following example returns 0x5a:<pre>    inet_network ("90");</pre></blockquote><h4>RETURNS</h4><blockquote><p>The Internet address version of an ASCII string.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./inetLib.html#top">inetLib</a></b><hr><a name="inet_ntoa_b"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>inet_ntoa_b</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>inet_ntoa_b</i>(&nbsp;)</strong> - convert an network address to dot notation, store it in a buffer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void inet_ntoa_b    (    struct in_addr inetAddress, /* inet address */    char *         pString      /* where to return ASCII string */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine converts an Internet address in network format to dotteddecimal notation.<p>This routine is identical to the UNIX <b><i><a href="./inetLib.html#inet_ntoa">inet_ntoa</a></i>(&nbsp;)</b> routineexcept that you must provide a buffer of size <b>INET_ADDR_LEN</b>.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following example copies the string "90.0.0.2" to <i>pString</i>:<pre>    struct in_addr iaddr;     ...    iaddr.s_addr = 0x5a000002;     ...    inet_ntoa_b (iaddr, pString);</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./inetLib.html#top">inetLib</a></b><hr><a name="inet_ntoa"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>inet_ntoa</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>inet_ntoa</i>(&nbsp;)</strong> - convert a network address to dotted decimal notation</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char *inet_ntoa    (    struct in_addr inetAddress /* inet address */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine converts an Internet address in network format to dotteddecimal notation.<p></blockquote><h4>WARNING</h4><blockquote><p>This routine is supplied for UNIX compatibility only.  Each time thisroutine is called, 18 bytes are allocated from memory.  Use <b><i><a href="./inetLib.html#inet_ntoa_b">inet_ntoa_b</a></i>(&nbsp;)</b>instead.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following example returns a pointer to the string "90.0.0.2":<pre>    struct in_addr iaddr;     ...    iaddr.s_addr = 0x5a000002;     ...    inet_ntoa (iaddr);</pre></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the string version of an Internet address.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./inetLib.html#top">inetLib</a></b>, <b><i><a href="./inetLib.html#inet_ntoa_b">inet_ntoa_b</a></i>(&nbsp;)</b><hr><a name="inet_aton"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>inet_aton</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>inet_aton</i>(&nbsp;)</strong> - convert a network address from dot notation, store in a structure</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS inet_aton    (    char *           pString,    /* string containing address, dot notation */    struct in_addr * inetAddress /* struct in which to store address */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine interprets an Internet address.  All the network libraryroutines call this routine to interpret entries in the data basesthat are expected to be an address.  The value returned is stored innetwork byte order in the structure provided.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>The following example returns 0x5a000002 in the <b>s_addr</b> member of the structure pointed to by <i>pinetAddr</i>:<pre>    inet_addr ("90.0.0.2", pinetAddr);</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./inetLib.html#top">inetLib</a></b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -