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

📄 dhcpdb.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: 2001/09/19 10:38:31 $*  $Source: M:/psisrc/dhcp_svr/incl/rcs/dhcpdb.h $*  $Revision: 1.3 $*************************************************************************/#define CLIENTIDMAX 6              /* Client ID bytes (e.g. ethernet addr)   */#define HOSTNAMEMAX 64             /* bytes in DHCP sname field              */#define BOOTFILEMAX 128            /* bytes in DHCP file field               */typedef struct {    char    nd_name[MAX_DEV_NAME];  /* server instance's device name */                } DHCPD_CONFIG;typedef structDhcpConfig {                       /* Client Database record                 */     u8 dhcnf_clid[CLIENTIDMAX];   /* e.g. 6-byte ethernet address           */     u16 dhcnf_clid_length;        /* e.g. 6 (must be <= CLIENTIDMAX)        */     u32 dhcnf_ipMin;              /* range of IP addresses                  */     u32 dhcnf_ipMax;              /*   (inclusive, host byte order)         */     u32 dhcnf_secLease;           /* lease seconds                          */     u8 dhcnf_sname[HOSTNAMEMAX];  /* for DHCP 'sname' field                 */     u8 dhcnf_file[BOOTFILEMAX];   /* for DHCP 'file' field                  */     u8 dhcnf_options[MAXNOPT];    /* optional (not msgtype,IP,server ID,etc)*/                                   /* (must start with 4-byte magic cookie)  */                                   /* (must end with endOption=255)          */                                   /* As returned by dhcpConfigLookup() the  */                                   /* dhcnf_options field must leave room    */                                   /* for all the options added by calls to  */                                   /* dhcpPutOption() in dhcpReply().        */} DhcpConfig;typedef structDHCP_LEASE {                       /* Lease of an IP address                 */     struct DHCP_LEASE *p_previous; /* pointer to previous lease in list */     struct DHCP_LEASE *p_next;     /* pointer to next lease in list */     u32 ip;                       /* assigned ip address (host byte order)  */     u8 clid[CLIENTIDMAX];         /* client identifier (e.g. ethernet addr) */     u8 clid_length;               /* e.g. 6 (must be <= CLIENTIDMAX)        */     u8 flags;#       define DHL_ACKED        0x01 /*   false during pre-lease, true afterwd */#       define DHL_RELEASED     0x02 /*   received DHCPRELEASE                 */#       define DHL_CHANGED      0x04 /*   for efficient persisting of leases   */#       define DHL_UNAVAILABLE  0x08     u32 tstart;                   /* 'time' at start of lease (seconds)     */     u32 secLease;                 /* duration in seconds                    */} DHCP_LEASE;                                   /* dhcpConfigLookup() return codes:       */#define DHCP_CNF_OK        0       /* *config points to client config info   */#define DHCP_CNF_NOTFOUND -1       /* client id not recognized (req ignored) */     voiddhlSave(void);                     /* stub for saving lease linked list      */     voiddhlRestore(void);                  /* stub for restoring lease linked list   */

⌨️ 快捷键说明

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