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

📄 bootplib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
is available (i.e. not NULL) and contains the explicit IP address of aBOOTP server as a non-zero value.<p>The <i>pHostName</i> parameter provides optional storage for the server'shost name (from the <b>sname</b> field of a BOOTP reply). This routine alsocopies any initial string in that buffer into the <b>sname</b> field of theBOOTP request (which restricts booting to a specified host).<p>The <i>pBootFile</i> parameter provides optional storage for the boot filename (from the <b>file</b> field of a BOOTP reply). This routine also copiesany initial string in that buffer into the <b>file</b> field of the BOOTPrequest message, which typically supplies a generic name to the server.<p>The remaining fields in the BOOTP request message use the values whichRFC 1542 defines. In particular, the <b>giaddr</b> field is set to zero andthe suggested "magic cookie" is always inserted in the (otherwise empty)<b>vend</b> field.<p>The <i>pBootpParams</i> argument provides access to any options defined inRFC 1533 using the following definition:<p><pre>   struct bootpParams       {       struct in_addr *            netmask;       unsigned short *            timeOffset;       struct in_addr_list *       routers;       struct in_addr_list *       timeServers;       struct in_addr_list *       nameServers;       struct in_addr_list *       dnsServers;       struct in_addr_list *       logServers;       struct in_addr_list *       cookieServers;       struct in_addr_list *       lprServers;       struct in_addr_list *       impressServers;       struct in_addr_list *       rlpServers;       char *                      clientName;       unsigned short *            filesize;       char *                      dumpfile;       char *                      domainName;       struct in_addr *            swapServer;       char *                      rootPath;       char *                      extoptPath;       unsigned char *             ipForward;       unsigned char *             nonlocalSourceRoute;       struct in_addr_list *       policyFilter;       unsigned short *            maxDgramSize;       unsigned char *             ipTTL;       unsigned long *             mtuTimeout;       struct ushort_list *        mtuTable;       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><p>The contents of the BOOTP parameter descriptor implicitly selects optionsfor retrieval from the BOOTP server.  This routine attempts to retrieve thevalues for any options whose corresponding field pointers are non-NULLvalues.  To obtain these parameters, the BOOTP server must support thevendor-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 with this routine attemptsto retrieve a subnet mask for the boot device, in addition to the host andclient 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="bootpMsgGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>bootpMsgGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>bootpMsgGet(&nbsp;)</strong> - send a BOOTP request message and retrieve reply</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS bootpMsgGet    (    struct ifnet *   pIf,       /* network device for message exchange */    struct in_addr * pIpDest,   /* destination IP address for request */    USHORT           srcPort,   /* UDP source port for request */    USHORT           dstPort,   /* UDP destination port for request */    BOOTP_MSG *      pBootpMsg, /* request template and reply storage */    u_int            maxSends   /* maximum number of transmit attempts */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sends a BOOTP request using the network interfacespecified by <i>pIf</i> and waits for any reply. The <i>pIpDest</i> argumentspecifies the destination IP address.  It must be equal to eitherthe broadcast address (255.255.255.255) or the IP address of a specificBOOTP server which is directly reachable using the given network interface.The given interface must support broadcasting in the first case.<p>The <i>srcPort</i> and <i>dstPort</i> arguments support sending and receiving BOOTP messages with arbitrary UDP ports. To receive replies, any BOOTPserver must send those responses to the source port from the request.To comply with the RFC 1542 clarification, the request message must besent to the reserved BOOTP server port (67) using the reserved BOOTPclient port (68).<p>Except for the UDP port numbers, this routine only sets the <b>bp_xid</b> and<b>bp_secs</b> fields in the outgoing BOOTP message. All other fields in thatmessage use the values from the <i>pBootpMsg</i> argument, which later holdsthe contents of any BOOTP reply received.<p>The <i>maxSends</i> parameter specifies the total number of requests to transmitif no reply is received. The retransmission interval starts at 4 secondsand doubles with each attempt up to a maximum of 64 seconds. Any subsequentretransmissions will occur at that maximum interval. To reduce the chancesof network flooding, the timeout interval before each retransmission includesa randomized delay of plus or minus one second from the base value. Afterthe final transmission, this routine will wait for the current interval toexpire before returning a timeout error.<p></blockquote><h4>NOTE</h4><blockquote><p>The target must be able to respond to an ARP request for any IP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address&nbsp;specified&nbsp;in&nbsp;the&nbsp;request&nbsp;template's&nbsp;<b>bp_ciaddr</b>&nbsp;field.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_bootpLib_INVALID_ARGUMENT</b><br>&nbsp;<b>S_bootpLib_NO_BROADCASTS</b><br>&nbsp;<b>S_bootpLib_TIME_OUT</b></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 + -