PADD_INTERFACE callback function (routprot.h)
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 router manager enables the interface by calling InterfaceStatus with the RIS_INTERFACE_ENABLED flag.
When a user calls MprAdminInterfaceTransportAdd, the dynamic interface manager for the transport calls the router manager (for the transport) which calls this function for each of the routing protocols associated with that transport.
Syntax
PADD_INTERFACE PaddInterface;
DWORD PaddInterface(
[in] LPWSTR InterfaceName,
[in] ULONG InterfaceIndex,
[in] NET_INTERFACE_TYPE InterfaceType,
[in] DWORD MediaType,
[in] WORD AccessType,
[in] WORD ConnectionType,
[in] PVOID InterfaceInfo,
[in] ULONG StructureVersion,
[in] ULONG StructureSize,
[in] ULONG StructureCount
)
{...}
Parameters
[in] 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.
[in] InterfaceIndex
Specifies the interface in the set of interfaces configured on the router.
[in] InterfaceType
Specifies the type of the interface.
[in] MediaType
Reserved for future use.
[in] AccessType
Reserved for future use.
[in] ConnectionType
Reserved for future use.
[in] InterfaceInfo
Pointer to a buffer that specifies protocol-defined configuration information associated with the interface. This information is private to the routing protocol.
[in] StructureVersion
Specifies the version of the information structures pointed to by the InterfaceInfo parameter. In some cases, this is equal to the version of the routing protocol.
[in] StructureSize
Specifies the size of each of the information structures pointed to by the InterfaceInfo parameter. Since some information structures contain variable length members, the routing protocol isn't necessarily able to determine the size of the information from the version.
[in] StructureCount
Specifies a count of the number of information structures pointed to by the InterfaceInfo parameter. This parameter is always one.
Return value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
Value | Description |
---|---|
|
The attempt to add the interface failed. |
|
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. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | routprot.h |