Share via


CreateProxyArpEntry

A version of this page is also available for

Windows Embedded CE 6.0 R3

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 dwAddress parameter. 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 dwAddress parameter. In other words, when an ARP request for dwAddress is 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 FormatMessage to obtain the message string for the returned error. For a complete list of error codes, see Error Values or 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

Reference

IP Helper Functions
DeleteProxyArpEntry
MIB_PROXYARP