RASCONNSTATE enumeration

The RASCONNSTATE enumeration type contains values that specify the states that can occur during a RAS connection operation. If the RasDial function is used to establish a RAS connection, specify a window, or a RasDialFunc, RasDialFunc1, or RasDialFunc2 callback function to receive notification messages that report the current connection state. Also, use the RasGetConnectStatus function to get the connection state for a specified connection.

Syntax


typedef enum _RASCONNSTATE { 
  RASCS_OpenPort,
   RASCS_PortOpened,
  RASCS_ConnectDevice,
  RASCS_DeviceConnected,
  
   RASCS_AllDevicesConnected,
  
   RASCS_Authenticate,
  
    RASCS_AuthNotify,
  
   RASCS_AuthRetry,
  
   RASCS_AuthCallback,
  RASCS_AuthChangePassword,
  
   RASCS_AuthProject,
  
   RASCS_AuthLinkSpeed,
  RASCS_AuthAck,
  
   RASCS_ReAuthenticate,
  
   RASCS_Authenticated,
  RASCS_PrepareForCallback,
  
   RASCS_WaitForModemReset,
  
    RASCS_WaitForCallback,
  
   RASCS_Projected,
  
   RASCS_SubEntryConnected,
  
   RASCS_SubEntryDisconnected,
  RASCS_ApplySettings,
  
   RASCS_Interactive           = RASCS_PAUSED,
  
   RASCS_RetryAuthentication,
  
   RASCS_CallbackSetByCaller,
  
   RASCS_PasswordExpired,
  
   RASCS_InvokeEapUI,
  
   RASCS_Connected             = RASCS_DONE,
  
   RASCS_Disconnected
} RASCONNSTATE;

Constants

RASCS_OpenPort

The communication port is about to be opened.

RASCS_PortOpened

The communication port has been opened successfully.

RASCS_ConnectDevice

A device is about to be connected. RasGetConnectStatus can be called to determine the name and type of the device being connected.

RASCS_DeviceConnected

A device has connected successfully. RasGetConnectStatus can be called to determine the name and type of the device being connected.

For a simple modem connection, RASCS_ConnectDevice and RASCS_DeviceConnected is called only once. For a dial-up X.25 PAD connection, the pair is called first for the modem, then for the PAD. If a preconnect switch is configured, the pair will be called for the switch before any other devices connect. Likewise, the pair is called for a postconnect switch after any other devices connect.

RASCS_AllDevicesConnected

All devices in the device chain have successfully connected. At this point, the physical link is established.

RASCS_Authenticate

The authentication process is starting. Remote access does not allow the remote client to generate any traffic on the LAN until authentication has been successfully completed.

Remote access authentication consists of:

  • Validating the user name/password on the specified domain.
  • Projecting the client onto the LAN. This means that the remote access server does what is necessary to send and receive data on the LAN on behalf of the client. For example, the remote access server might need to add a NetBIOS name that corresponds to the client's computer name.
  • Call-back processing in which the client hangs up and the server calls back. (The user needs special permissions on the remote access server for this.)
  • Calculating the link speed. This is necessary to correctly set transport time-outs to match the relatively slow speed of the remote link.
RASCS_AuthNotify

An authentication event has occurred. If dwError is zero, this event will be immediately followed by one of the more specific authentication states following. If dwError is nonzero, authentication has failed, and the error value indicates why.

RASCS_AuthRetry

The client has requested another validation attempt with a new user name/password/domain.

RASCS_AuthCallback

The remote access server has requested a callback number. This occurs only if the user has "Set By Caller" callback privilege on the server.

RASCS_AuthChangePassword

The client has requested to change the password on the account.

RASCS_AuthProject

The projection phase is starting.

RASCS_AuthLinkSpeed

The link-speed calculation phase is starting.

RASCS_AuthAck

An authentication request is being acknowledged.

RASCS_ReAuthenticate

Reauthentication (after callback) is starting.

RASCS_Authenticated

The client has successfully completed authentication.

RASCS_PrepareForCallback

The line is about to disconnect in preparation for callback.

RASCS_WaitForModemReset

The client is delaying in order to give the modem time to reset itself in preparation for callback.

RASCS_WaitForCallback

The client is waiting for an incoming call from the remote access server.

RASCS_Projected

This state occurs after the RASCS_AuthProject state. It indicates that projection result information is available. Access the projection result information by calling RasGetProjectionInfo.

RASCS_SubEntryConnected

When dialing a multilink phone-book entry, this state indicates that a subentry has been connected during the dialing process. The dwSubEntry parameter of a RasDialFunc2 callback function indicates the index of the subentry. When the final state of all subentries in the phone-book entry has been determined, the connection state is RASCS_Connected if one or more subentries have been connected successfully.

RASCS_SubEntryDisconnected

When dialing a multilink phone-book entry, this state indicates that a subentry has been disconnected during the dialing process. The dwSubEntry parameter of a RasDialFunc2 callback function indicates the index of the subentry.

RASCS_ApplySettings

When dialing a multilink phone-book entry, this state occurs just before a connection goes to the RASCS_SubEntryConnected state.

Note  Supported in Windows 7 and later versions of Windows.

RASCS_Interactive

This state has a value of RASCS_PAUSED and corresponds to the terminal state supported by RASPHONE.EXE.

RASCS_RetryAuthentication

This state corresponds to the retry authentication state supported by RASPHONE.EXE.

RASCS_CallbackSetByCaller

This state corresponds to the callback state supported by RASPHONE.EXE.

RASCS_PasswordExpired

This state corresponds to the change password state supported by RASPHONE.EXE.

RASCS_InvokeEapUI

An application can use this paused state to bring up a custom authentication UI. The application should call the RasInvokeEapUI function to invoke the custom UI. RASCS_InvokeEapUI is a paused state.

RASCS_Connected

This state has a value of RASCS_DONE and corresponds to a successful connection.

RASCS_Disconnected

This state indicates a disconnected or failed connection.

Remarks

The connection process states are divided into three classes: running states, paused states, and terminal states.

An application can easily determine the class of a specific state by performing Boolean bit operations with the RASCS_PAUSED and RASCS_DONE bitmasks. Here are some examples:


fDoneState = (state & RASCS_DONE); 
fPausedState = (state & RASCS_PAUSED); 
fRunState = !(fDoneState || fPausedState);


Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ras.h

See also

Remote Access Service (RAS) Overview
Remote Access Service Enumerations
RasDial
RasInvokeEapUI
RasGetConnectStatus
RasGetProjectionInfo
RASCONNSTATUS

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.