tf6DhcpdUserStart
Table of Contents >> Optional Protocols >> DHCPv6 Server
| #include <trsocket.h> |
| int tf6DhcpdUserStart | ( |
| int userPort, | |
| int flags | |
| ); |
Function Description
This function starts the Treck DHCP server on the specified port. If successful, the function will return TM_ENOERROR.
Parameters
- userPort
- UDP port the server will listen on. If set to zero, the server will listen on the UDP port 547 as specified by RFC 3315 (68)
- flags
- indicates whether the server will run in blocking mode. If TM_BLOCKING_ON is set, then the Treck DHCP server will run in blocking mode, otherwise, the Treck DHCP server will in in non blocking mode.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- TM_BLOCKING_ON is set, and pending is not enabled in the Treck stack.
- TM_ENOBUFS
- Not enough buffers to start the DHCP server.
- TM_EMFILE
- No more sockets are available.
- TM_EADDRINUSE
- Port already in use.
- TM_ENOENT
- Server has not been configured yet.