2.2.1.2.81 MPRI_INTERFACE_0

The MPRI_INTERFACE_0 structure contains information for a particular router interface. This structure is used in the following methods:

wszInterfaceName: A null-terminated Unicode string that contains the name of a valid interface. This value MUST be specified during the call to RRouterInterfaceCreate and cannot be modified after the interface is created.

dwInterface: Specifies a unique identifier of the interface. This is a read-only field that cannot be set or modified.

fEnabled: Specifies whether the interface is enabled. The value TRUE is greater than zero (0) if the interface is enabled, or FALSE is zero (0) if the interface is disabled by an administrator.

This member can have one of the following values.

Value

Meaning

TRUE

>0

The interface is enabled.

FALSE

0

The interface is disabled.

dwIfType: A ROUTER_INTERFACE_TYPE (section 2.2.1.1.1) value that specifies the interface type. This value MUST be specified during the call to RRouterInterfaceCreate and cannot be modified after the interface is created.

dwConnectionState: A ROUTER_CONNECTION_STATE (section 2.2.1.1.2) value that specifies the current state of the interface (for example: connected, disconnected, or unreachable). This is a read-only field that cannot be set or modified.

fUnReachabilityReasons: Specifies a value that represents a reason the interface cannot be reached. This is a read-only field that cannot be set or modified. The following table lists constant values that indicate why an interface is unreachable.

Value

Meaning

MPR_INTERFACE_OUT_OF_RESOURCES

0x00000001

No ports or devices are available for use.

MPR_INTERFACE_ADMIN_DISABLED

0x00000002

The administrator has disabled the interface.

MPR_INTERFACE_CONNECTION_FAILURE

0x00000004

The previous connection attempt failed. Look at the dwLastError member for the error code.

MPR_INTERFACE_DIALOUT_HOURS_RESTRICTION

0x00000010

Dialing out is not allowed at the current time.

MPR_INTERFACE_SERVICE_PAUSED

0x00000008

The RRAS is paused.

MPR_INTERFACE_NO_MEDIA_SENSE

0x00000020

The network cable is disconnected from the network card.

MPR_INTERFACE_NO_DEVICE

0x00000040

The network card has been removed from the machine.

dwLastError: Specifies a nonzero value if the interface fails to connect. The value is a Win32 error code as specified in [MS-ERREF]. This is a read-only field that cannot be set or modified.