AddInterface

[This is preliminary documentation and subject to change.]

The AddInterface function adds an interface to be managed by the routing protocol. The protocol should consider the interface to be in a disabled state. The interface can be enabled by calling EnableInterface.

DWORD AddInterface(
  LPWSTR InterfaceName,  // name of the interface
  ULONG InterfaceIndex,  // index for the interface
  NET_INTERFACE_TYPE InterfaceType,
                         // type of the interface
  PVOID InterfaceInfo    // interface information block
);
 

Parameters

InterfaceName
Pointer to a Unicode string. The string contains a name that uniquely identifies the interface in the set of interfaces configured on the router.
InterfaceIndex
Identifies the interface in the set of interfaces configured on the router.
InterfaceType
The type of the interface.
Value Description
PERMANENT Permanent connectivity (e.g., LAN, Frame Relay).
DEMAND_DIAL Demand dial connectivity (analog, ISDN, PPTP, switched FR).
LOCAL_WORKSTATION_DIAL Local workstation connectivity only.
REMOTE_WORKSTATION_DIAL Remote workstation connectivity only.

InterfaceInfo
Pointer to a buffer that contains protocol-defined configuration information associated with the interface. This information is private to the routing protocol.

Return Values

NO_ERROR
The interface was added successfully.
ERROR_CAN_NOT_COMPLETE
The attempt to add the interface failed.
ERROR_INVALID_PARAMETER
The InterfaceIndex parameter is invalid (for example, an interface with that index already exists), or one of the parameters pointed to by InterfaceInfo is invalid.

QuickInfo

  Windows NT: Use version 5.0 and later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in routprot.h.
  Import Library: user-defined.

See Also

AddInterface Sample, DeleteInterface, EnableInterface