📄 dhcpd.h
字号:
/** Copyright (c) 1998-2001 by NETsilicon Inc.** This software is copyrighted by and is the sole property of* NETsilicon. All rights, title, ownership, or other interests* in the software remain the property of NETsilicon. This* software may only be used in accordance with the corresponding* license agreement. Any unauthorized use, duplication, transmission,* distribution, or disclosure of this software is expressly forbidden.** This Copyright notice may not be removed or modified without prior* written consent of NETsilicon.** NETsilicon, reserves the right to modify this software* without notice.** NETsilicon* 411 Waverley Oaks Road USA 781.647.1234* Suite 227 http://www.netsilicon.com* Waltham, MA 02452 AmericaSales@netsilicon.com*************************************************************************** $Name: Fusion 6.52 Fusion 6.51 $* $Date: 2001/09/19 10:38:31 $* $Source: M:/psisrc/dhcp_svr/incl/rcs/dhcpd.h $* $Revision: 1.2 $*************************************************************************** File Description:* DHCP include file. For use by DHCP library files only.***************************************************************************/#define MAGIC_COOKIE 0x63825363 /* magic cookie in the option field */#define MAGIC_COOKIE_U8 99,130,83,99 /* equiv to MAGIC_COOKIE in dhcp.h */#define MAXNOPT 312 /* max number of DHCP options */#define DEFAULT_LEASE_TIME 180*60 /* default lease time in second */#define INFINITE_LEASE_TIME 0xffffffffL /* infinite lease time */#define N_REXMIT_DISCOVER 4 /* # of rexmit of DHCPDISCOVER msg */#define N_REXMIT_REQUEST 10#define N_REXMIT_REQ_REBOOT 4/* UDP port numbers for DHCP */#define DHCP_SERVER_PORT 67 /* from client to server */#define DHCP_CLIENT_PORT 68 /* from server to client *//* DHCP message OP code */#define BOOTREQUEST 1#define BOOTREPLY 2/* DHCP message type */#define DHCP_DISCOVER 1#define DHCP_OFFER 2#define DHCP_REQUEST 3#define DHCP_DECLINE 4#define DHCP_ACK 5#define DHCP_NAK 6#define DHCP_RELEASE 7#define DHCP_INFORM 8typedef u8 DHCP_MESSAGE;#define DHCP_OP 0 /* message type, 1 byte */#define DHCP_HTYPE DHCP_OP+1 /* hardware address type, 1 byte */#define DHCP_HLEN DHCP_HTYPE+1 /* hardware address length, 1 byte */#define DHCP_HOPS DHCP_HLEN+1 /* should be zero in client's message, 1 byte */#define DHCP_XID DHCP_HOPS+1 /* transaction id, 4 bytes */#define DHCP_SECS DHCP_XID+4 /* elapssed time in sec. from trying to boot, 2 bytes */#define DHCP_FLAGS DHCP_SECS+2 /* 2 bytes */#define DHCP_CIADDR DHCP_FLAGS+2 /* (previously allocated) client IP address, 4 bytes */#define DHCP_YIADDR DHCP_CIADDR+4 /* 'your' client IP address, 4 bytes */#define DHCP_SIADDR DHCP_YIADDR+4 /* should be zero in client's messages, 4 bytes */#define DHCP_GIADDR DHCP_SIADDR+4 /* should be zero in client's messages, 4 bytes */#define DHCP_CHADDR DHCP_GIADDR+4 /* client's hardware address, 16 bytes */#define DHCP_SNAME DHCP_CHADDR+16 /* server host name, null terminated string, 64 bytes */#define DHCP_FILE DHCP_SNAME+64 /* boot file name, null terminated string, 128 bytes */#define DHCP_OPTIONS DHCP_FILE+128 /* message options, MAXOPT bytes */#define SIZEOF_DHCP_MESSAGE (DHCP_OPTIONS + MAXNOPT)#define ETH_P_ARP 0x0806#define ETH_P_IP 2048#define ARPOP_REQUEST 1#define ARPOP_REPLY 2#define ARPHRD_ETHER 1 /* DHCP option type */enum { OT_STRING = 1, /* string */ OT_ADDR = 2 /* addresses */};/* DHCP option and value (cf. RFC1533) */#define PAD_OPTION 0#define END_OPTION 255#define SUBNET_MASK 1#define TIMER_OFFSET 2#define ROUTERS_ON_SUBNET 3#define TIME_SERVER 4#define NAME_SERVER 5#define DNS 6#define LOG_SERVER 7#define COOKIE_SERVER 8#define LPR_SERVER 9#define IMPRESS_SERVER 10#define RESOURCE_LOCATION_SERVER 11#define HOST_NAME 12#define BOOT_FILE_SIZE 13#define MERIT_DUMP_FILE 14#define DOMAIN_NAME 15#define SWAP_SERVER 16#define ROOT_PATH 17#define EXTENTIONS_PATH 18#define IP_FORWARDING 19#define NON_LOCAL_SOURCE_ROUTING 20#define POLICY_FILTER 21#define MAX_DGRAM_REASM_SIZE 22#define DEFAULT_IP_TTL 23#define PATH_MTU_AGING_TIMEOUT 24#define PATH_MTU_PLATEAU_TABLE 25#define IF_MTU 26#define ALL_SUBNETS_LOCAL 27#define BROADCAST_ADDR 28#define PERFORM_MASK_DISCOVERY 29#define MASK_SUPPLIER 30#define PERFORM_ROUTER_DISCOVERY 31#define ROUTER_SOLICITATION_ADDR 32#define STATIC_ROUTE 33#define TRAILER_ENCAPSULATION 34#define ARP_CACHE_TIMEOUT 35#define ETHERNET_ENCAPSULATION 36#define TCP_DEFAULT_TTL 37#define TCP_KEEP_ALIVE_INTERVAL 38#define TCP_KEEP_ALIVE_GARBAGE 39#define NIS_DOMAIN_NAME 40#define NIS_SERVERS 41#define NTP_SERVERS 42#define VENDOR_SPECIFIC_INFO 43#define NET_BIOS_NAME_SERVER 44#define NET_BIOS_DGRAM_DIST_SERVER 45#define NET_BIOS_NODE_TYPE 46#define NET_BIOS_SCOPE 47#define X_FONT_SERVER 48#define X_DISPLAY_MANAGER 49#define DHCP_REQUESTED_IP_ADDR 50#define DHCP_IP_ADDR_LEASE_TIME 51#define DHCP_OPTION_OVERLOAD 52#define DHCP_MESSAGE_TYPE 53#define DHCP_SERVER_IDENTIFIER 54#define DHCP_PARAM_REQUEST 55#define DHCP_MSG 56#define DHCP_MAX_MSG_SIZE 57#define DHCP_T1_VALUE 58#define DHCP_T2_VALUE 59#define DHCP_CLASS_IDENTIFIER 60#define DHCP_CLIENT_IDENTIFIER 61#ifdef DHCPD_DEBUG#define DHCPD_DEBUG0(s) os_printf(s)#define DHCPD_DEBUG1(s,x) os_printf(s,x)#define DHCPD_DEBUG2(s,x,y) os_printf(s,x,y)#define DHCPD_DEBUG3(s,x,y,z) os_printf(s,x,y,z)#define DHCPD_DEBUG4(s,w,x,y,z) os_printf(s,w,x,y,z)#else#define DHCPD_DEBUG0(s)#define DHCPD_DEBUG1(s,x)#define DHCPD_DEBUG2(s,x,y)#define DHCPD_DEBUG3(s,x,y,z)#define DHCPD_DEBUG4(s,w,x,y,z)#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -