⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dhcpapi.h

📁 用于嵌入式系统的TCP/IP协议栈及若干服务
💻 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: 2002/01/16 12:58:04 $*  $Source: M:/psisrc/dhcp_cli/incl/rcs/dhcpapi.h $*  $Revision: 1.10 $***************************************************************************  File Description:*           DHCP client APIs.***************************************************************************/#ifndef _DHCPAPI_HDR_#define _DHCPAPI_HDR_#ifndef DHCP_MAX_DNS_SERVERS#define DHCP_MAX_DNS_SERVERS 5#endif#ifndef DHCP_MAX_ROUTERS#define DHCP_MAX_ROUTERS 5#endif#ifndef DHCP_FILENAME_LENGTH#define DHCP_FILENAME_LENGTH 128#endif#define MAXNOPT 312                 /* max number of DHCP options *//* DHCP option and value (cf. RFC2132) */#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#define NETWORK_INFORMATION_SERVICE_DOMAIN  64#define NETWORK_INFORMATION_SERVICE_SERVERS 65#define TFTP_SERVER_NAME            66#define BOOTFILE_NAME               67#define MOBILE_IP_HOME_AGENT        68#define SMTP_SERVERS                69#define POP3_SERVERS                70#define NNTP_SERVERS                71#define WWW_SERVERS                 72#define FINGER_SERVERS              73#define IRC_SERVERS                 74#define STREETTALK_SERVERS          75#define STREETTALK_DIRECTORY_ASSISTANCE 76#define DHCP_INITIALIZE_CALLBACK 0#define DHCP_FIRST_BIND_FAIL    1#define DHCP_LEASE_BOUND        2#define DHCP_RENEW_LEASE        3#define DHCP_LEASE_EXPIRED      4    /* DHCP option types returned by fns_dhcp_client_get_option */                            /* this option returns : */#define DHCP_NONE   0       /* no data (pad) */#define DHCP_U8     1       /* unsigned 8 bit data */#define DHCP_U16    2       /* unsigned 16 bit network byte order data */#define DHCP_U32    3       /* unsigned 32 bit network byte order data */#define DHCP_ASCII  4       /* ASCII data                   */#define DHCP_LEN_N  5       /* variable length data         */#define DHCP_NOT_USED 0xFF  /* option is not used           */typedef struct {int state;                u32 addr;           /* ip address (network byte order) */                u32 mask;           /* network mask (network byte order) */                u8  *p_next_option;     /* pointer to option list */                int options_in_list;    /* number of options in current list */                int option_length;                u32 file_server;                char filename[DHCP_FILENAME_LENGTH];                u8  options[MAXNOPT];                        } DHCP_USER_INFO;extern int fns_dhcp_client_initialize(void);extern int fns_dhcp_client_configure(char *p_name,                                     void (*p_initialize_callback)(DHCP_USER_INFO *),                                     void (*p_bind_fail_callback)(DHCP_USER_INFO *),                                     void (*p_lease_bound_callback)(DHCP_USER_INFO *),                                     void (*p_lease_renew_callback)(DHCP_USER_INFO *),                                     void (*p_lease_expire_callback)(DHCP_USER_INFO *));extern int fns_dhcp_client_register_callback(char *p_name, int callback, void (*p_callback)(DHCP_USER_INFO *));extern int fns_dhcp_client_delete_callback(char *p_name, int callback);extern int fns_dhcp_client_get_option(DHCP_USER_INFO *p_info, int option,                                      u8 **p_data, int *p_type, int *p_length);extern int fns_dhcp_client_get_next_option(DHCP_USER_INFO *p_info, u8 **p_data);extern int fns_dhcp_client_delete(char *p_name);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -