}
/**********************************************************************
-*%FUNCTION: discovery
+*%FUNCTION: discovery1
*%ARGUMENTS:
* conn -- PPPoE connection info structure
*%RETURNS:
* Nothing
*%DESCRIPTION:
-* Performs the PPPoE discovery phase
+* Performs the PPPoE discovery phase 1
***********************************************************************/
void
-discovery(PPPoEConnection *conn)
+discovery1(PPPoEConnection *conn)
{
int padiAttempts = 0;
- int padrAttempts = 0;
int timeout = conn->discoveryTimeout;
do {
timeout *= 2;
} while (conn->discoveryState == STATE_SENT_PADI);
+}
+
+/**********************************************************************
+*%FUNCTION: discovery2
+*%ARGUMENTS:
+* conn -- PPPoE connection info structure
+*%RETURNS:
+* Nothing
+*%DESCRIPTION:
+* Performs the PPPoE discovery phase 2
+***********************************************************************/
+void
+discovery2(PPPoEConnection *conn)
+{
+ int padrAttempts = 0;
+ int timeout = conn->discoveryTimeout;
- timeout = conn->discoveryTimeout;
do {
padrAttempts++;
if (got_sigterm || padrAttempts > conn->discoveryAttempts) {