Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

dhcp.h

00001 #ifndef _DHCP_H
00002 #define _DHCP_H
00003 
00004 /*
00005  * Copyright (C) 2001-2002 by egnite Software GmbH. All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted provided that the following conditions
00009  * are met:
00010  *
00011  * 1. Redistributions of source code must retain the above copyright
00012  *    notice, this list of conditions and the following disclaimer.
00013  * 2. Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in the
00015  *    documentation and/or other materials provided with the distribution.
00016  * 3. All advertising materials mentioning features or use of this
00017  *    software must display the following acknowledgement:
00018  *
00019  *    This product includes software developed by egnite Software GmbH
00020  *    and its contributors.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00023  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00025  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00026  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00027  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00028  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00029  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00030  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00031  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00032  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00033  * SUCH DAMAGE.
00034  *
00035  * For additional information see http://www.ethernut.de/
00036  *
00037  * -
00038  * Portions Copyright (c) 1983, 1993 by
00039  *  The Regents of the University of California.  All rights reserved.
00040  *
00041  * Redistribution and use in source and binary forms, with or without
00042  * modification, are permitted provided that the following conditions
00043  * are met:
00044  * 1. Redistributions of source code must retain the above copyright
00045  *    notice, this list of conditions and the following disclaimer.
00046  * 2. Redistributions in binary form must reproduce the above copyright
00047  *    notice, this list of conditions and the following disclaimer in the
00048  *    documentation and/or other materials provided with the distribution.
00049  * 3. All advertising materials mentioning features or use of this software
00050  *    must display the following acknowledgement:
00051  *  This product includes software developed by the University of
00052  *  California, Berkeley and its contributors.
00053  * 4. Neither the name of the University nor the names of its contributors
00054  *    may be used to endorse or promote products derived from this software
00055  *    without specific prior written permission.
00056  *
00057  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00058  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00059  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00060  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00061  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00062  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00063  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00064  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00065  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00066  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00067  * SUCH DAMAGE.
00068  * -
00069  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
00070  *
00071  * Permission to use, copy, modify, and distribute this software for any
00072  * purpose with or without fee is hereby granted, provided that the above
00073  * copyright notice and this permission notice appear in all copies, and that
00074  * the name of Digital Equipment Corporation not be used in advertising or
00075  * publicity pertaining to distribution of the document or software without
00076  * specific, written prior permission.
00077  * 
00078  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
00079  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
00080  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
00081  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
00082  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
00083  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
00084  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00085  * SOFTWARE.
00086  */
00087 
00088 /*
00089  * $Log: dhcp.h,v $
00090  * Revision 1.2  2003/01/24 12:01:07  przemko
00091  * Obciecie dosowych znakow konca lini
00092  *
00093  * Revision 1.1.1.1  2002/12/07 07:16:53  marwi
00094  *
00095  *
00096  * Revision 1.2  2002/08/01 19:50:38  harald
00097  * First public release
00098  *
00099  * Revision 1.1  2002/08/01 17:34:29  harald
00100  * First check in
00101  *
00102  */
00103 
00108 
00109 #define DHCP_SERVERPORT     67
00110 #define DHCP_CLIENTPORT     68
00111 
00112 #define DHCPOPT_PAD         0
00113 #define DHCPOPT_NETMASK     1
00114 #define DHCPOPT_GATEWAY     3
00115 #define DHCPOPT_DNS         6
00116 #define DHCPOPT_HOSTNAME    12
00117 #define DHCPOPT_DOMAIN      15
00118 #define DHCPOPT_BROADCAST   28
00119 #define DHCPOPT_REQUESTIP   50
00120 #define DHCPOPT_LEASETIME   51
00121 #define DHCPOPT_MSGTYPE     53
00122 #define DHCPOPT_SID         54
00123 #define DHCPOPT_RENEWALTIME 58
00124 #define DHCPOPT_REBINDTIME  59
00125 #define DHCPOPT_END         255
00126 
00127 #define DHCP_DISCOVER   1
00128 #define DHCP_OFFER      2
00129 #define DHCP_REQUEST    3
00130 #define DHCP_DECLINE    4
00131 #define DHCP_ACK        5
00132 #define DHCP_NAK        6
00133 #define DHCP_RELEASE    7
00134 #define DHCP_INFORM     8
00135 
00136 typedef struct bootp {
00137     u_char  bp_op;              
00138     u_char  bp_htype;           
00139     u_char  bp_hlen;            
00140     u_char  bp_hops;            
00141     u_long  bp_xid;             
00142     u_short bp_secs;            
00143     u_short bp_flags;           
00144     u_long  bp_ciaddr;          
00145     u_long  bp_yiaddr;          
00146     u_long  bp_siaddr;          
00147     u_long  bp_giaddr;          
00148     u_char  bp_chaddr[16];      
00149     char    bp_sname[64];       
00150     char    bp_file[128];       
00151     u_char  bp_options[312];    
00152 } BOOTPHDR;
00153 
00156 extern int DhcpQuery(void);
00157 
00158 #endif

Generated on Thu Jan 30 22:30:44 2003 for EduNet by doxygen1.2.18