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_NTP_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_OPTION_MGMT_PORT_TYPE = 65536,
100 OPEN_BOOTP_DHCP_OPTION_INT_IF_NUM = 131072,
101 OPEN_BOOTP_DHCP_OPTION_CHANGE_TYPE = 262144
102 } open_bootp_dhcp_offered_options_e;
114 unsigned char optHostName[OPEN_HOSTNAME_MAX_LEN + 1];
115 uint32_t optNtpServerIpAddr[OPEN_NTP_MAX_SERVER_ENTRIES];
116 unsigned char bootFile[OPEN_BOOTP_FILE_LEN + 1];
117 unsigned char optBootFile[OPEN_BOOTP_FILE_LEN + 1];
118 unsigned char sname[OPEN_BOOTP_SNAME_LEN + 1];
119 unsigned char optTftpSvrName[OPEN_BOOTP_SNAME_LEN + 1];
uint32_t ip
Host IP address.
open_dhcp_option125_t opt125
Opt 125.
uint32_t offeredOptionsMask
Mask holds offered options IDs.
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.
uint32_t mgmtPortType
Management port type.
uint32_t netMask
Host netmask.
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.
uint32_t intIfNum
Internal interface number if port type is not service or network.
uint32_t optTftpSvrIpAddr
IP addres of TFTP server, got from option 150 field.
#define OPENAPI_DNS_HOST_NAME_LEN_MAX
maximum value
OPEN_BOOL_t dhcpAddressFlushFlag
Flag indicating DHCP address removal in progress.
open_dhcp_vendor_specific_option_t * vendSpecificOptions
DHCP Option-43.
#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.
uint32_t siaddr
Next server address.
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.
uint32_t changeType
Type of change to the DHCP info.