Dallas Semiconductor DS80C400 C Libraries Home Page

Main Page   Data Structures   File List   Data Fields   Globals  

rom400_dhcp.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------
00002  *  Copyright (C) 2004 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 
00063 #define ROM400_DHCP_VERSION         10
00064 
00067 #define DHCP_STATUS_INIT            0
00068 
00070 #define DHCP_STATUS_SELECTING       1
00071 
00073 #define DHCP_STATUS_REQUESTING      2
00074 
00076 #define DHCP_STATUS_INITREBOOT      3
00077 
00079 #define DHCP_STATUS_REBOOTING       4
00080 
00082 #define DHCP_STATUS_BOUND           5
00083 
00085 #define DHCP_STATUS_RENEWING        6
00086 
00088 #define DHCP_STATUS_REBINDING       7
00089 
00092 #define DHCP_MSG_DHCPDISCOVER       1
00093 
00095 #define DHCP_MSG_DHCPOFFER          2
00096 
00098 #define DHCP_MSG_DHCPREQUEST        3
00099 
00101 #define DHCP_MSG_DHCPDECLINE        4
00102 
00104 #define DHCP_MSG_DHCPACK            5
00105 
00107 #define DHCP_MSG_DHCPNAK            6
00108 
00110 #define DHCP_MSG_DHCPRELEASE        7
00111 
00113 #define DHCP_MSG_DHCPINFORM         8
00114 
00115 
00129 //---------------------------------------------------------------------------
00130 unsigned char dhcp_init(void);
00131 
00140 //---------------------------------------------------------------------------
00141 unsigned int dhcp_status(void);
00142 
00151 //---------------------------------------------------------------------------
00152 void dhcp_stop(void);
00153 
00169 //---------------------------------------------------------------------------
00170 void dhcp_registernotify(void (*functionptr)(unsigned int newstate, unsigned char far *packet));
00171 
00189 //---------------------------------------------------------------------------
00190 void dhcp_registerparseoption(void (*functionptr)(unsigned char far *option));
00191 
00214 //---------------------------------------------------------------------------
00215 void dhcp_registerbuildpacket(unsigned char (*functionptr)(unsigned char far *option, unsigned char msgtype));
00216 
00222 //---------------------------------------------------------------------------
00223 unsigned int dhcp_version(void);
00224 
00225 
00233 //---------------------------------------------------------------------------
00234 void dhcp_getserverip(struct sockaddr* address, int len);
00235 
00251 //---------------------------------------------------------------------------
00252 void dhcp_getprimarydns(struct sockaddr* address);
00253 
00269 //---------------------------------------------------------------------------
00270 void dhcp_getsecondarydns(struct sockaddr* address);
00271 
00288 //---------------------------------------------------------------------------
00289 unsigned int dhcp_gettaskid();
00290 
00291 
00292 #endif

Copyright 2004 Dallas Semiconductor, Inc.. Documentation generated by Doxygen.