38 #ifndef OPENAPI_DHCP_CLIENT_H_INCLUDED
39 #define OPENAPI_DHCP_CLIENT_H_INCLUDED
45 #define OPEN_DHCP_VENDOR_SPECIFIC_SUBOPTIONS_NUM 3
46 #define OPEN_DHCP_BOOTP_VEND_OPTIONS_LEN 64
47 #define OPEN_DHCP_OPT125_VENDOR_NUMBER_MAX 3
49 #define OPEN_HOSTNAME_MAX_LEN 64
50 #define OPEN_BOOTP_FILE_LEN 128
51 #define OPEN_BOOTP_SNAME_LEN 64
52 #define OPEN_DNS_NAME_SERVER_ENTRIES 8
53 #define OPEN_SNTP_MAX_SERVER_ENTRIES 12
54 #define OPENAPI_DNS_HOST_NAME_LEN_MAX 255
60 unsigned char option[OPEN_DHCP_BOOTP_VEND_OPTIONS_LEN];
65 unsigned char numSubOptions;
72 unsigned char numSubOptions;
83 OPEN_BOOTP_DHCP_IP_ADDR = 1,
84 OPEN_BOOTP_DHCP_NETMASK = 2,
85 OPEN_BOOTP_DHCP_GATEWAY = 4,
86 OPEN_BOOTP_DHCP_SIADDR = 8,
87 OPEN_BOOTP_DHCP_BOOTFILE = 16,
88 OPEN_BOOTP_DHCP_SNAME = 32,
89 OPEN_BOOTP_DHCP_OPTION_TFTP_SVR_ADDR = 64,
90 OPEN_BOOTP_DHCP_OPTION_DNS_SVR_ADDR = 128,
91 OPEN_BOOTP_DHCP_OPTION_BOOTFILE = 256,
92 OPEN_BOOTP_DHCP_OPTION_TFTP_SVR_NAME = 512,
93 OPEN_BOOTP_DHCP_OPTION_VENDOR_SPECIFIC = 1024,
94 OPEN_BOOTP_DHCP_OPTION_VENDOR_IDENT = 2048,
95 OPEN_BOOTP_DHCP_OPTION_HOSTNAME = 4096,
96 OPEN_BOOTP_DHCP_OPTION_DEF_DOMAIN_NAME = 8192,
97 OPEN_BOOTP_DHCP_OPTION_NTP_SVR_ADDR = 16384,
98 OPEN_BOOTP_DHCP_OPTION_SYSLOG_SVR_ADDR = 32768
99 } open_bootp_dhcp_offered_options_e;
107 uint32_t optTftpSvrIpAddr;
110 unsigned char optHostName[OPEN_HOSTNAME_MAX_LEN + 1];
112 unsigned char bootFile[OPEN_BOOTP_FILE_LEN + 1];
113 unsigned char optBootFile[OPEN_BOOTP_FILE_LEN + 1];
114 unsigned char sname[OPEN_BOOTP_SNAME_LEN + 1];
115 unsigned char optTftpSvrName[OPEN_BOOTP_SNAME_LEN + 1];
117 uint32_t offeredOptionsMask;
open_error_t openapiDhcpClientIPAddrGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, open_inet_addr_t *clientAddr)
Get the DHCP Client IP Address on an interface.
#define OPEN_SNTP_MAX_SERVER_ENTRIES
maximum value
open_error_t openapiDhcpClientOptionsGet(openapiClientHandle_t *client_handle, open_bootp_dhcp_t *networkParams)
Get the DHCP Options returned by the DHCP Server.
open_error_t
OPEN uses these enumerators to indicate the error codes.
#define OPENAPI_DNS_HOST_NAME_LEN_MAX
maximum value
#define OPEN_DNS_NAME_SERVER_ENTRIES
maximum value
open_error_t openapiDhcpClientDhcpServerIPAddrGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, open_inet_addr_t *serverAddr)
Get the DHCP Server IP Address on an interface.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiDhcpClientNetMaskGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, open_inet_addr_t *netmask)
Get the DHCP Client subnet mask on an interface.