00001 /*--------------------------------------------------------------------------- 00002 * Copyright (C) 2004-2006 Dallas Semiconductor Corporation, All Rights Reserved. 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a 00005 * copy of this software and associated documentation files (the "Software"), 00006 * to deal in the Software without restriction, including without limitation 00007 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 * and/or sell copies of the Software, and to permit persons to whom the 00009 * Software is furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included 00012 * in all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00015 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00017 * IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES 00018 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00019 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00020 * OTHER DEALINGS IN THE SOFTWARE. 00021 * 00022 * Except as contained in this notice, the name of Dallas Semiconductor 00023 * shall not be used except as stated in the Dallas Semiconductor 00024 * Branding Policy. 00025 * --------------------------------------------------------------------------- 00026 * 00027 * This file contains function definitions for the built-in ROM functions 00028 * of the Dallas Semiconductor 400 processor. This file is intended for use 00029 * with the Keil MicroVision (uVision) C compiler. 00030 * 00031 * --------------------------------------------------------------------------- 00032 */ 00033 #ifndef __rom400_dhcp_ 00034 #define __rom400_dhcp_ 00035 00069 #define ROM400_DHCP_VERSION 12 00070 00073 #define DHCP_STATUS_INIT 0 00074 00076 #define DHCP_STATUS_SELECTING 1 00077 00079 #define DHCP_STATUS_REQUESTING 2 00080 00082 #define DHCP_STATUS_INITREBOOT 3 00083 00085 #define DHCP_STATUS_REBOOTING 4 00086 00088 #define DHCP_STATUS_BOUND 5 00089 00091 #define DHCP_STATUS_RENEWING 6 00092 00094 #define DHCP_STATUS_REBINDING 7 00095 00098 #define DHCP_MSG_DHCPDISCOVER 1 00099 00101 #define DHCP_MSG_DHCPOFFER 2 00102 00104 #define DHCP_MSG_DHCPREQUEST 3 00105 00107 #define DHCP_MSG_DHCPDECLINE 4 00108 00110 #define DHCP_MSG_DHCPACK 5 00111 00113 #define DHCP_MSG_DHCPNAK 6 00114 00116 #define DHCP_MSG_DHCPRELEASE 7 00117 00119 #define DHCP_MSG_DHCPINFORM 8 00120 00121 00141 //--------------------------------------------------------------------------- 00142 unsigned char dhcp_init(void); 00143 00160 //--------------------------------------------------------------------------- 00161 void dhcp_setrequestip(struct sockaddr* address, int len); 00162 00171 //--------------------------------------------------------------------------- 00172 unsigned int dhcp_status(void); 00173 00186 //--------------------------------------------------------------------------- 00187 void dhcp_stop(int releaseip); 00188 00204 //--------------------------------------------------------------------------- 00205 void dhcp_registernotify(void (*functionptr)(unsigned int newstate, unsigned char far *packet)); 00206 00224 //--------------------------------------------------------------------------- 00225 void dhcp_registerparseoption(void (*functionptr)(unsigned char far *option)); 00226 00249 //--------------------------------------------------------------------------- 00250 void dhcp_registerbuildpacket(unsigned char (*functionptr)(unsigned char far *option, unsigned char msgtype)); 00251 00257 //--------------------------------------------------------------------------- 00258 unsigned int dhcp_version(void); 00259 00260 00268 //--------------------------------------------------------------------------- 00269 void dhcp_getserverip(struct sockaddr* address, int len); 00270 00286 //--------------------------------------------------------------------------- 00287 void dhcp_getprimarydns(struct sockaddr* address); 00288 00304 //--------------------------------------------------------------------------- 00305 void dhcp_getsecondarydns(struct sockaddr* address); 00306 00323 //--------------------------------------------------------------------------- 00324 unsigned int dhcp_gettaskid(); 00325 00337 //--------------------------------------------------------------------------- 00338 int dhcp_getsocket(); 00339 00340 #endif
| Copyright 2005 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |