Function Prototypes:ttUserLnkNotifyFunc
Table of Contents >> Optional Protocols >> PPP over Ethernet (PPPoE) Interface
void ttUserLnkNotifyFunc | ( |
ttUserInterface interfaceHandle, | |
int flags | |
); |
Function Description
This user function will be called when the stack transitions between PPPoE states as specified by the flags parameter.
Parameters
- interfaceHandle
- A pointer to the interface.
- flags
- Flags specifying the PPPoE transisions. See the table below for a list of the flags and their meanings.
- optionPtr
- Pointer to a tfIoctlInterface() specific parameter.
- optionLen
- Length of the option.
Flags
Flag | Description |
---|---|
TM_LL_PPPOE_DISC_COMPLETE | PPPoE discovery is now complete, ready to start the PPP session. |
TM_LL_LCP_UP | PPP LCP is up |
TM_LL_CHAP_UP | PPP CHAP is up |
TM_LL_PAP_UP | PPP PAP is up |
TM_LL_EAP_UP | PPP EAP is up |
TM_LL_IPCP_START | PPP IPCP negotiation is starting |
TM_LL_LQM_UP | LQM is enabled on the link. |
TM_LL_LQM_DISABLED | LQM is enabled on the link. |
TM_LL_LQM_LINK_BAD | Link quality is bad, user recovery should be attempted. |
TM_LL_IP4_OPEN_COMPLETE | PPP open for IPv4 is complete |
TM_LL_IP6_OPEN_COMPLETE | PPP open for IPv6 is complete |
TM_LL_OPEN_COMPLETE | PPP and PPPoE open are now complete. The user can start sending data on the connection. |
TM_LL_IP4_OPEN_FAILED | PPP IPCP IPv4 open failed. |
TM_LL_IP6_OPEN_FAILED | PPP IPCP IPv46 open failed. |
TM_LL_OPEN_FAILED | PPP and PPPoE open failed. |
TM_LL_CLOSE_STARTED | PPP and PPPoE terminate has started. |
TM_LL_CLOSE_COMPLETE | PPP and PPPoE terminate has completed. |
These events may be used to monitor the status of the PPP connection. The PPP connection should not be used before a TM_LL_OPEN_COMPLETE event is received, and the device should not be restarted (after a tfCloseInterface()) before a TM_LL_CLOSE_COMPLETE event is received.
From these events, it is also possible to determine why PPP negotiation failed. For instance, if authentication fails, a TM_LL_LCP_UP event is first received indicating that the physical link has been negotiated.
However, if authentication fails, the next event will be TM_LL_CLOSE_STARTED and then TM_LL_CLOSE_COMPLETE since the link must be closed if negotiation fails. If authentication is successful the events that are received are TM_LL_LCP_UP, TM_LL_PAP_UP or TM_LL_CHAP_UP and then TM_LL_OPEN_COMPLETE.
Table of Contents >> Optional Protocols >> PPP over Ethernet (PPPoE) Interface