📄 dhcp.h
字号:
/******************************************************************************\
Copyright (c) 2007, UTStarcom,Inc. (ShenZhen R&D Center)
All Rights Reserved.
Subsystem : WIMAX
Group : GW/AnchorEP/DHCP
File : dhcp.h
Version :
Build :
Author : kevin.shi
Maintained by : kevin.shi
Create Date : 2007-01-01
Last Modify :
Description : Common DHCP include file for server, relay agent, and client
\******************************************************************************/
/*
-----------------------------------------------------------
Software Develop CodeName :
Module Reference :
-----------------------------------------------------------
Change History:
07-01.01 kevin.shi create file.
*/
#ifndef _DHCP_H_
#define _DHCP_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "dhcp_client.h"
/*
* tag values used to specify what information is being
* supplied in the options field of the packet.
* Note: single asterisk(*) means RFC 1541 BOOTP
* double asterisk(**) means defines options used only in RFC 2131 by DHCP client
* triple asterisk(***) menas others RFC 3004/3011... by DHCP client
*/
#define _DHCP_PAD_TAG ((char) 0)
#define _DHCP_SUBNET_MASK_TAG ((char) 1) /* client's subnet mask */
#define _DHCP_TIME_OFFSET_TAG ((char) 2) /* offset of the client's subnet in seconds from UTC*/
#define _DHCP_ROUTER_TAG ((char) 3) /* a list of IP addresses for routers on the client's subnet*/
#define _DHCP_TIME_SERVER_TAG ((char) 4) /* a list of RFC 868 [6] time servers available to the client */
#define _DHCP_NAME_SERVER_TAG ((char) 5) /* a list of IEN 116 [7] name servers */
#define _DHCP_DNS_SERVER_TAG ((char) 6) /* a list of Domain Name System */
#define _DHCP_LOG_SERVER_TAG ((char) 7) /* a list of MIT-LCS UDP log servers */
#define _DHCP_COOKIE_SERVER_TAG ((char) 8) /* a list of RFC 865 [9] cookie servers */
#define _DHCP_LPR_SERVER_TAG ((char) 9) /* a list of RFC 1179 [10] line printer servers */
#define _DHCP_IMPRESS_SERVER_TAG ((char) 10) /* a list of Imagen Impress servers */
#define _DHCP_RLS_SERVER_TAG ((char) 11) /* a list of RFC 887 [11] Resource Location */
#define _DHCP_HOSTNAME_TAG ((char) 12) /*the name of the client */
#define _DHCP_BOOTSIZE_TAG ((char) 13) /* length in 512-octet blocks of the default boot image for the client.*/
#define _DHCP_MERIT_DUMP_TAG ((char) 14) /*the path-name of a file to which the client's core image
should be dumped in the event the client crashes.*/
#define _DHCP_DNS_DOMAIN_TAG ((char) 15) /* domain name that client should use when resolving hostname by DNS*/
#define _DHCP_SWAP_SERVER_TAG ((char) 16) /* IP address of the client's swap server */
#define _DHCP_ROOT_PATH_TAG ((char) 17) /* the path-name that contains the client's root disk.*/
#define _DHCP_EXTENSIONS_PATH_TAG ((char) 18) /*specify a file, retrievable via TFTP, which contains information which can be
interpreted in the same way as the 64-octet vendor-extension field within the BOOTP response */
#define _DHCP_IP_FORWARD_TAG ((char) 19) /* specifies whether the client should configure its IP layer for packet forwarding*/
#define _DHCP_NONLOCAL_SRCROUTE_TAG ((char) 20) /* non-local source routing */
#define _DHCP_POLICY_FILTER_TAG ((char) 21) /* non-local source routing */
#define _DHCP_MAX_DGRAM_SIZE_TAG ((char) 22) /* specifies the maximum size datagram that the client should be prepared to reassemble */
#define _DHCP_DEFAULT_IP_TTL_TAG ((char) 23) /* specifies the default time-to-live that the client should use on outgoing datagrams */
#define _DHCP_MTU_AGING_TIMEOUT_TAG ((char) 24) /* specifies the timeout (in seconds) to use when aging Path MTU values discovered
by the mechanism defined in RFC 1191 [12]*/
#define _DHCP_MTU_PLATEAU_TABLE_TAG ((char) 25) /* specifies a table of MTU sizes to use when performing Path MTU Discovery
as defined in RFC 1191*/
#define _DHCP_IF_MTU_TAG ((char) 26) /* specifies the MTU to use on this interface */
#define _DHCP_ALL_SUBNET_LOCAL_TAG ((char) 27) /* All Subnets are Local,1 indicates that all subnets share the same MTU */
#define _DHCP_BRDCAST_ADDR_TAG ((char) 28) /* specifies the broadcast address in use on the client's subnet*/
#define _DHCP_MASK_DISCOVER_TAG ((char) 29) /* specifies whether or not the client should perform subnet mask discovery using ICMP*/
#define _DHCP_MASK_SUPPLIER_TAG ((char) 30) /* specifies whether or not the client should respond to subnet mask requests using ICMP*/
#define _DHCP_ROUTER_DISCOVER_TAG ((char) 31) /* specifies whether or not the client should solicit routers using the
Router Discovery mechanism defined in RFC 1256*/
#define _DHCP_ROUTER_SOLICIT_TAG ((char) 32) /* specifies the address to which the client should transmit router solicitation requests*/
#define _DHCP_STATIC_ROUTE_TAG ((char) 33) /* specifies a list of static routes that the client should install in its routing cache*/
#define _DHCP_TRAILER_TAG ((char) 34) /* specifies whether or not the client should negotiate the use of trailers (RFC 893)
when using the ARP protocol*/
#define _DHCP_ARP_CACHE_TIMEOUT_TAG ((char) 35) /* specifies the timeout in seconds for ARP cache entries */
#define _DHCP_ETHER_ENCAP_TAG ((char) 36) /* specifies whether or not the client should use Ethernet Version 2 (RFC 894)
or IEEE 802.3 (RFC 1042) encapsulation if the interface is an Ethernet */
#define _DHCP_DEFAULT_TCP_TTL_TAG ((char) 37) /* specifies the default TTL that the client should use when sending TCP segments */
#define _DHCP_KEEPALIVE_INTERVAL_TAG ((char) 38) /* the client TCPshould wait before sending a keepalive message on a TCP connection */
#define _DHCP_KEEPALIVE_GARBAGE_TAG ((char) 39) /* whether or not the client should send TCP keepalive messages with a octet of garbage
for compatibility with older implementations */
#define _DHCP_NIS_DOMAIN_TAG ((char) 40) /* Network Information Service Domain, the name of the client's NIS domain */
#define _DHCP_NIS_SERVER_TAG ((char) 41) /* a list of IP addresses indicating NIS servers available to client */
#define _DHCP_NTP_SERVER_TAG ((char) 42) /* a list of IP addresses indicating NTP servers available to the client */
#define _DHCP_VENDOR_SPEC_TAG ((char) 43) /* used by clients and servers to exchange vendor-specific information,
may carry Encapsulated vendor-specific options */
#define _DHCP_NBN_SERVER_TAG ((char) 44) /*NetBIOS name server,NBNS */
#define _DHCP_NBDD_SERVER_TAG ((char) 45) /* NetBIOS datagram distribution server (NBDD) */
#define _DHCP_NB_NODETYPE_TAG ((char) 46) /* NetBIOS node type */
#define _DHCP_NB_SCOPE_TAG ((char) 47) /* NetBIOS scope option */
#define _DHCP_XFONT_SERVER_TAG ((char) 48) /* a list of X Window System Font servers*/
#define _DHCP_XDISPLAY_MANAGER_TAG ((char) 49) /* specifies a list of IP addresses of systems that are running the
X Window System Display Manager */
#define _DHCP_REQUEST_IPADDR_TAG ((char) 50) /** used in a client request (DHCPDISCOVER) to allow the client to
request that a particular IP address be assigned**/
#define _DHCP_LEASE_TIME_TAG ((char) 51) /**used in a client request (DHCPDISCOVER or DHCPREQUEST) to allow the client
to request a lease time for the IP address **/
#define _DHCP_OPT_OVERLOAD_TAG ((char) 52) /**indicate that the DHCP 'sname' or 'file' fields are being overloaded by using them
to carry DHCP options **/
#define _DHCP_MSGTYPE_TAG ((char) 53) /* used to convey the type of the DHCP message */
#define _DHCP_SERVER_ID_TAG ((char) 54) /** IP address of the selected server **/
#define _DHCP_REQ_LIST_TAG ((char) 55) /** used by a DHCP client to request values for specified configuration parameters **/
#define _DHCP_ERRMSG_TAG ((char) 56) /** used by a DHCP server to provide an error message to a DHCP client
in a DHCPNAK message in the event of a failure or DHCPDECLINE by clients **/
#define _DHCP_MAXMSGSIZE_TAG ((char) 57) /** specifies the maximum length DHCP message that it is willing to accept**/
#define _DHCP_T1_TAG ((char) 58) /** specifies the time interval from address assignment until the client transitions
to the RENEWING state**/
#define _DHCP_T2_TAG ((char) 59) /** specifies the time interval from address assignment until the client transitions
to the REBINDING state **/
#define _DHCP_VENDOR_CLASS_ID_TAG ((char) 60) /** used by DHCP clients to optionally identify the vendor type and
configuration of a DHCP client. Servers that respond SHOULD only
use option 43 to return the vendor-specific(43) information to the client
**/
#define _DHCP_CLIENT_ID_TAG ((char) 61) /** used by DHCP clients to specify their unique identifier **/
#define _DHCP_NISP_DOMAIN_TAG ((char) 64) /* the name of the client's NIS+ [17] domain */
#define _DHCP_NISP_SERVER_TAG ((char) 65) /* a list of IP addresses indicating NIS+ servers */
#define _DHCP_TFTP_SERVERNAME_TAG ((char) 66) /**used to identify a TFTP server when the 'sname' field in the DHCP header
has been used for DHCP options **/
#define _DHCP_BOOTFILE_TAG ((char) 67) /**identify a bootfile when the 'file' field in the DHCP header has been used for DHCP options**/
#define _DHCP_MOBILEIP_HA_TAG ((char) 68) /* specifies a list of IP addresses indicating mobile IP home agents*/
#define _DHCP_SMTP_SERVER_TAG ((char) 69) /* specifies a list of SMTP servers */
#define _DHCP_POP3_SERVER_TAG ((char) 70) /* specifies a list of POP3 */
#define _DHCP_NNTP_SERVER_TAG ((char) 71) /* Network News Transport Protocol servers */
#define _DHCP_DFLT_WWW_SERVER_TAG ((char) 72) /*a list of Default WWW Server */
#define _DHCP_DFLT_FINGER_SERVER_TAG ((char) 73) /* a list of Finger available to the client*/
#define _DHCP_DFLT_IRC_SERVER_TAG ((char) 74) /* a list of Internet Relay Chat Server available to the client*/
#define _DHCP_STREETTALK_SERVER_TAG ((char) 75) /* a list of StreetTalk servers */
#define _DHCP_STDA_SERVER_TAG ((char) 76) /* list of STDA servers, StreetTalk Directory Assistance*/
#define _DHCP_USER_CLASS_TAG ((char) 77) /*** RFC 3004 ,User Class option,
This option is used by a DHCP client to optionally identify the type
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -