Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function creates a Proxy Address Resolution Protocol (PARP) entry on the local computer for the specified IP address.

Syntax

DWORD CreateProxyArpEntry(
  DWORD 
dwAddress,
  DWORD 
dwMask,
  DWORD 
dwIfIndex
);

Parameters

dwAddress

[in] The IP address for which this computer acts as a proxy. The address must meet the following condition: (dwAddress & dwMask)==dwAddress.

dwMask

[in] The mask for the IP address specified by the dwAddressparameter. This can be either a host mask, for example, 255.255.255.255, or a subnet mask. If a host mask is used, a proxy is created only for the specified address. If a subnet mask is used, a proxy is created for all IP addresses within the subnet, except for the subnet broadcast address. In the subnet broadcast address, unmasked bits are either all set to zero (0) or all set to 1.

dwIfIndex

[in] The index of the interface on which to proxy ARP for the IP address specified by the dwAddressparameter. In other words, when an ARP request for dwAddressis received on this interface, the local computer responds with the physical address of this interface. If this interface is of a type that does not support ARP, such as PPP, then the call fails.

Return Value

Returns NO_ERROR if successful. If the function fails, the caller should use FormatMessageto obtain the message string for the returned error. For a complete list of error codes, see Error Valuesor the SDK header file Winerror.h.

Requirements

Header iphlpapi.h
Library Iphlpapi.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also