a2cdc58fbd8aa48160d54e1be3e372f34ccfbf6f
[openwrt-10.03/.git] / package / broadcom-wl / src / driver / proto / bcmdhcp.h
1 /*
2  * Copyright 2007, Broadcom Corporation
3  * All Rights Reserved.                
4  *                                     
5  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;   
6  * the contents of this file may not be disclosed to third parties, copied
7  * or duplicated in any form, in whole or in part, without the prior      
8  * written permission of Broadcom Corporation.                            
9  *
10  * Fundamental constants relating to DHCP Protocol
11  *
12  * $Id$
13  */
14
15 #ifndef _bcmdhcp_h_
16 #define _bcmdhcp_h_
17
18 /* DHCP params */
19 #define DHCP_TYPE_OFFSET        0       /* DHCP type (request|reply) offset */
20 #define DHCP_FLAGS_OFFSET       10      /* DHCP flags offset */
21 #define DHCP_CIADDR_OFFSET      12      /* DHCP client IP address offset */
22 #define DHCP_YIADDR_OFFSET      16      /* DHCP your IP address offset */
23 #define DHCP_GIADDR_OFFSET      24      /* DHCP relay agent IP address offset */
24 #define DHCP_CHADDR_OFFSET      28      /* DHCP client h/w address offset */
25
26 #define DHCP_TYPE_REQUEST       1       /* DHCP request (discover|request) */
27 #define DHCP_TYPE_REPLY         2       /* DHCP reply (offset|ack) */
28
29 #define DHCP_PORT_SERVER        67      /* DHCP server UDP port */
30 #define DHCP_PORT_CLIENT        68      /* DHCP client UDP port */
31
32 #define DHCP_FLAG_BCAST 0x8000  /* DHCP broadcast flag */
33
34 #define DHCP_FLAGS_LEN  2       /* DHCP flags field length */
35
36 #endif  /* #ifndef _bcmdhcp_h_ */