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

📄 bootplib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
       unsigned short *            intfaceMTU;       unsigned char *             allSubnetsLocal;       struct in_addr *            broadcastAddr;       unsigned char *             maskDiscover;       unsigned char *             maskSupplier;       unsigned char *             routerDiscover;       struct in_addr *            routerDiscAddr;       struct in_addr_list *       staticRoutes;       unsigned char *             arpTrailers;       unsigned long *             arpTimeout;       unsigned char *             etherPacketType;       unsigned char *             tcpTTL;       unsigned long *             tcpInterval;       unsigned char *             tcpGarbage;       char *                      nisDomain;       struct in_addr_list *       nisServers;       struct in_addr_list *       ntpServers;       char *                      vendString;       struct in_addr_list *       nbnServers;       struct in_addr_list *       nbddServers;       unsigned char *             nbNodeType;       char *                      nbScope;       struct in_addr_list *       xFontServers;       struct in_addr_list *       xDisplayManagers;       char *                      nispDomain;       struct in_addr_list *       nispServers;       struct in_addr_list *       ipAgents;       struct in_addr_list *       smtpServers;       struct in_addr_list *       pop3Servers;       struct in_addr_list *       nntpServers;       struct in_addr_list *       wwwServers;       struct in_addr_list *       fingerServers;       struct in_addr_list *       ircServers;       struct in_addr_list *       stServers;       struct in_addr_list *       stdaServers;        };</pre>This structure allows the retrieval of any BOOTP option specified inRFC 1533. The list of 2-byte (unsigned short) values is defined as:<p><pre>   struct ushort_list       {       unsigned char       num;       unsigned short *    shortlist;       };</pre>The IP address lists use the following similar definition:<p><pre>   struct in_addr_list       {       unsigned char       num;       struct in_addr *    addrlist;       };</pre>When these lists are present, the routine stores values retrieved fromthe BOOTP reply in the location indicated by the <b>shortlist</b> or <b>addrlist</b>members.  The amount of space available is indicated by the <b>num</b> member.When the routine returns, the <b>num</b> member indicates the actual number ofentries retrieved.  In the case of <b>bootpParams.policyFilter.num</b> and <b>bootpParams.staticRoutes.num</b>, the <b>num</b> member value should be interpreted as the number of IP address pairs requested and received.<p>The following members of the <b>bootpParams</b> structure are also used for both input and output:<p><dl><dt><b>clientAddr</b><dd>Contains a pointer that holds the client's Internet address.  On input, if it contains a non-NULL value, it is interpreted as a pointer to an Internet address of type <b>struct in_addr</b> and passed on to the BOOTP server in the <b>bp_ciaddr</b> member of the BOOTP message structure (<b>BOOTP_MSG</b>).  The server will use it as a lookup field into the BOOTP database.  When a reply is received, the client'sassigned Internet address is copied to the <b>clientAddr</b> member.<p><dt><b>bootHostAddr</b><dd> Contains a pointer that holds the host's IP address.  On input, if it contains a non-NULL value, it is interpreted as the host where the BOOTP message is to be sent.  Note that this host must be localto the <i>pIf</i> network.  If NULL, the BOOTP message is sent to the localbroadcast address.  On return, the host's IP address is copied tothe <b>bootHostAddr</b> member.<p>On input, if the <b>bootpParams.bootfile</b> member  points to a non-empty string, the contents are passed to the BOOTP server in the <b>bp_file</b> member of the BOOTP message structure (<b>BOOTP_MSG</b>).  When a reply is received, the file name retrieved from the BOOTP server is copied to the <b>bootpParams.bootfile</b> member as a NULL-terminated string.<p></dl><p>The remaining elements in the BOOTP parameters descriptor are used to selectoptions for retrieval from the BOOTP server.  The BOOTP library attempts toretrieve the values for any options whose corresponding field pointers arenon-NULL values.  To obtain these parameters, the BOOTP server must supportthe vendor-specific options described in RFC 1048 (or its successors) and the corresponding parameters must be specified in the BOOTP server database. Where meaningful, the values are returned in host byte order. <p>The BOOTP request issued during system startup attempts to retrieve a subnetmask for the boot device, in addition to the host and client addresses,and the boot file name.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bootpLib.html#top">bootpLib</a></b>, <b><a href="./bootLib.html#top">bootLib</a></b>, RFC 1048, RFC 1533<hr><a name="bootpMsgSend"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>bootpMsgSend</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>bootpMsgSend</i>(&nbsp;)</strong> - send a BOOTP request message</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS bootpMsgSend    (    char *           ifName,    /* network interface name */    struct in_addr * pIpDest,   /* destination IP address */    int              port,      /* port number */    BOOTP_MSG *      pBootpMsg, /* pointer to BOOTP message */    u_int            timeOut    /* timeout in ticks */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sends the BOOTP message indicated by <i>pBootpMsg</i> using the network interface specified by <i>ifName</i>.  The <i>pIpDest</i> argument specifies the destination IP address.  In most cases, the broadcast address(255.255.255.255) is used.  However, this parameter also accepts the IPaddress of a particular BOOTP server.  That server must reside on thesame subnet as the specified network interface.<p>A non-zero value for <i>port</i> specifies an alternate BOOTP server port.Otherwise, the default port (67) is used.<p>This routine always sets the values of the <b>bp_op</b>, <b>bp_xid</b>, and <b>bp_secs</b> members in the BOOTP message structure, but it allows the caller to assign values to any of the other members.  However, if the <b>bp_hlen</b> member is 0, the routine uses the Ethernet address of the specified network interface for the <b>bp_chaddr</b> member and sets <b>bp_type</b> to 1 and <b>bp_hlen</b> to 6 as required for that address.<p>The <b><i><a href="./bootpLib.html#bootpMsgSend">bootpMsgSend</a></i>(&nbsp;)</b> routine will retransmit the BOOTP message if it gets noreply.  The retransmission time increases exponentially but is boundedby the number of ticks specified in the <i>timeOut</i> parameter.  If no reply isreceived within this period, an error is returned.  A value of zero specifiesan infinite timeout value.<p></blockquote><h4>NOTE</h4><blockquote><p>If <b>bp_ciaddr</b> is specified, the BOOTP server may assume that theclient will respond to an ARP request.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_bootpLib_INVALID_ARGUMENT<br>&nbsp;S_bootpLib_NO_BROADCASTS<br>&nbsp;S_bootpLib_TIME_OUT</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bootpLib.html#top">bootpLib</a></b></body></html>

⌨️ 快捷键说明

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