tf6DhcpUserAddKey
Table of Contents >> Optional Protocols >> DHCPv6
| #include <trsocket.h> |
| int tf6DhcpUserAddKey | ( |
| ttUserInterface interfaceHandle, | |
| const ttUser8BitPtr realmPtr, | |
| int realmLen, | |
| ttUser32Bit keyId, | |
| const ttUser8BitPtr keyPtr, | |
| int keyLen, | |
| ttUser32Bit lifetime | |
| ); |
Function Description
Store a key for use with DHCPv6 authentication. Note: Shared key and distribution should be done through out-of-band channels. Network administrator should make sure that the keys added to the clients are inline with keys configured to the server via the tf6DhcpdUserConfigFromFile or tf6DhcpdUserConfigFromBuffer . When authentication is requested, and the client does not have the key requested by the server, event TM_6_DEV_DHCP_KEY_NOT_FOUND will be notified via the device notification function. If the key has expired, TM_6_DEV_DHCP_KEY_EXPIRED will be notified.
Parameters
- interfaceHandle
- Handle to the interface on which to store the key
- realmPtr
- Pointer to a buffer containing the keyâs realm. Must match realm provided by server.
- realmLen
- Length of the realm pointed to by realmPtr, in bytes.
- keyId
- Number used to identify the key. Unique per realm. Must match key id provided by server.
- keyPtr
- Pointer to a buffer containing the key. Must match key used by server.
- keyLen
- Length of the key pointed to by keyPtr, in bytes.
- lifetime
- Key life time in seconds, 0 and 0xFFFF means the key never expires.
Returns
- TM_ENOERROR
- Successful
- TM_EINVAL
- Invalid parameter
- TM_ENOBUFS
- No memory available to save new key