tfPppoeSetOption
Table of Contents >> Optional Protocols >> PPP over Ethernet (PPPoE) Interface
| #include <trsocket.h> |
| int tfPppoeSetOption | ( |
| ttUserInterface interfaceHandle, | |
| int optName, | |
| void * optionValuePtr, | |
| int optionLength | |
| ); |
Function Description
This function allows the user to change default values on the PPPoE connection. The list of option names that the user can set are given below.
Parameters
- interfaceHandle
- interface handle as returned by a call to tfAddInterface
- optName
- PPPoE option name as shown in table below.
- optionValuePtr
- pointer to the option value corresponding to the option name
- optionLength
- length of the option value as pointed to by optionValuePtr
| Option Name | Data Type | Description |
|---|---|---|
| TM_PPPOE_OPT_SRVC_NAME_TAG | char* | (Client) Client: PPPoE Service Name Tag. If optionValuePtr is null, or optionLength is 0, same as default.
Default: none |
| TM_PPPOE_OPT_SRVC_NAME_TAG | char* | (Server) PPPoE Service Name Tag. If optionValuePtr is null, or optionLength is 0, same as default. Example of the use of the Service-Name tag is to indicate an ISP name of a class or quality of service.
Default: none |
| TM_PPPOE_OPT_PADI_RETRIES_MAX | int* | PPPoE maximum number of PADI retries
Default: 4 |
| TM_PPPOE_OPT_INITIAL_RETRY_WAIT | ttUser32Bit* | PPPoE initial wait before 1st retransmission (in ms)
Default: 1000 |
| TM_PPPOE_OPT_PADR_RETRIES_MAX | int* | PPPoE maximum number of PADR retries
Default: 4 |
| TM_PPPOE_OPT_DISC_RETRIES_MAX | int* | PPPoE maximum number of DISC retries
Default: 1 |
| TM_PPPOE_OPT_HOST_UNIQ_TAG | char* | PPPoE host uniq id Tag option (client only). Used by the host to uniquely associate an Access Concentrator response (PADO or PADS) to a particular host request (PADI or PADR). It could be any binary data that the user chooses.
Default: None |
| TM_PPPOE_OPT_AC_NAME_TAG | char* | PPPoE AC Name Tag (server only). Uniquely identifies a particular Access Concentrator unit from all others. It may be a combination of trademark, model, and serial id information, or simply an UTF-8 rendition of the MAC address of the box.
Default: None |
| TM_PPPOE_OPT_SRVR_TIMEOUT | ttUser32Bit* | PPPoE server timeout during discovery (in ms)
Default: 10,000 |
Returns
- TM_ENOERROR
- no error
- TM_EINVAL
- parameter error
- TM_ENOBUFS
- No buffer available to allocate a PPPoE vector on the interface.
Example
Change the default number of PPPoE PADI retries on the PPPoE connection:
int errorCode; int numberRetries; numberRetries = 5; errorCode = tfPppSetOption(interfaceHandle, TM_PPPOE_OPT_PADI_RETRIES_MAX, (void *)&numberRetries, sizeof(numberRetries);
Table of Contents >> Optional Protocols >> PPP over Ethernet (PPPoE) Interface