tf6UseDhcp

Jump to: navigation, search

Table of Contents >> Optional Protocols >> DHCPv6


#include <trsocket.h>


int tf6UseDhcp (
ttUserInterface interfaceHandle,
tt6DhcpNotifyFunc notifyFuncPtr,
ttUser32Bit enterpriseNumber,
ttUser8BitPtr duidEnIdPtr,
int duidEnIdLen,
int acceptReconf,
int flags
);


Function Description

Initialize DHCPv6 on the given interface. This saves the notify function on the interface, sets whether Reconfigure messages will be accepted, and generates a client-wide DUID. If duidEnIdPtr is not NULL and duidEnIdLen is not 0, a DUID-EN will be generated from the enterpriseNumber, duidEnIdPtr and duidEnIdLen. Otherwise, a DUID-LL will be generated from a link-layer address. Note that the DUID identifies a client and is not specific to an interface. Only the first call to this API causes the DUID to be generated


Parameters

  • interfaceHandle
    Handle to the interface on which to start DHCPv6
  • notifyFuncPtr
    Pointer to a function to use to notify the user of DHCP related events. See tt6DhcpNotifyFunc.
  • enterpriseNumber
    Vendor's registered Private Enterprise Number as maintained by the IANA
  • duidEnIdPtr
    Pointer to the user’s DUID-EN identifier. If NULL, DUID-LL will be generated and used
  • duidEnIdLen
    Length of the user’s DUID-EN identifier. If 0, DUID-LL will be generated and used
  • acceptReconf
    Indicates whether Reconfigure messages will be accepted on this interface (1 for true, 0 for false). Reconfigure messages will only be processed by the client if authentication has succeeded.
  • flags
    Currently unused


Returns

  • TM_ENOERROR
    Success.
  • TM_EINVAL
    Invalid parameter


Table of Contents >> Optional Protocols >> DHCPv6