tfDhcpdUserConfigFromFile
Table of Contents >> Optional Protocols >> DHCP Server
| #include <trsocket.h> |
| int tfDhcpdUserConfigFromFile | (ttUserConstCharPtr fileName); |
Function Description
This function configures the DHCP server with DHCP parameters, and options.
Parameters
- fileName
- Pointer to file name. The file contains all DHCP options and parameters to be used by the DHCP server.
File format
- The File format is described in the DHCP Server#DHCP Server configuration file format.
File example
- A configuration file example is shown in the DHCP Server#DHCP Server configuration file example.
Returns
- TM_EINVAL
- Null file name pointer, or invalid format in file content.
- TM_EACCES
- Could not login into the file system.
- TM_EIO
- Could not open the file for reading.
- TM_ENOBUFS
- This indicates failure due to a failed memory allocation.
- TM_ENOERROR
- The DHCP server loaded the configuration successfully.
Usage
This function is used to load the DHCP server with the DHCP options and parameters to be used to respond to potential DHCP clients. This must be called once prior to calling tfDhcpdUserExecute(), or tfDhcpdUserStart().