Share via


PfBindInterfaceToIPAddress

[PfBindInterfaceToIPAddress 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 PfBindInterfaceToIPAddress function associates an interface with the IP stack index having the specified address.

DWORD PfBindInterfaceToIPAddress(
  INTERFACE_HANDLE pInterface,
  PFADDRESSTYPE pfatType,
  PBYTE IPAddress
);

Parameters

  • pInterface
    [in] Specifies a handle to the interface to associate with the IP stack index.
  • pfatType
    [in] Specifies the address type for the interface. This parameter is of type PFADDRESSTYPE.
  • IPAddress
    [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.

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

FormatMessage
PFADDRESSTYPE
PfBindInterfaceToIndex