PfBindInterfaceToIndex

[PfBindInterfaceToIndex is available for use in the operating systems listed in the Requirements section. In Windows Server "Longhorn", this function returns ERROR_CALL_NOT_SUPPORTED. The MprConfigInterfaceTransportSetInfo function and the Windows Filtering Platform API Management Functions provide similar functionality.]

The PfBindInterfaceToIndex function associates an interface with the specified IP stack index.

DWORD PfBindInterfaceToIndex(
  INTERFACE_HANDLE pInterface,
  DWORD dwIndex,
  PFADDRESSTYPE pfatLinkType,
  PBYTE LinkIPAddress
);

Parameters

  • pInterface
    [in] Specifies a handle to the interface to associate with the IP stack index.
  • dwIndex
    [in] Specifies the IP stack index to which to associate the interface.
  • pfatLinkType
    [in] Specifies the address type for the interface. This parameter is of type PFADDRESSTYPE.
  • LinkIPAddress
    [in] Pointer to an array of bytes that specifies the IP address for the interface.

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 Meaning
ERROR_IPV6_NOT_IMPLEMENTED The IPV6 address type is not yet implemented.
Other Use FormatMessage to obtain the message string for the returned error.

Remarks

Use the IP Helper functions to obtain a stack index.

An application should support the possibility of interface indexes that change due to Plug and Play.

Requirements

Server Requires Windows Server 2003 or Windows 2000 Server.
Header

Declared in Fltdefs.h.

Library

Use Iphlpapi.lib.

DLL Requires Iphlpapi.dll.

See Also

PFADDRESSTYPE
PfBindInterfaceToIPAddress
PfUnBindInterface