RttcpipDeleteInterfaceAddress

RttcpipDeleteInterfaceAddress deletes the requested IP address of a network interface.

Syntax

Copy
BOOL RttcpipDeleteInterfaceAddress(
    [in]    NET_IFINDEX InterfaceIndex, 
    [in]    RTTCPIPADAPTERADDRESS *pIpv4Address
);

Parameters

[in] InterfaceIndex

The local index for a network interface. Use function if_nametoindex to get the index from the interface name.

[in] pIpv4Address

A pointer to an RTTCPIPV4ADDRESS that describes the IPv4 interface address to delete.

Return Value

If this function succeeds, it returns TRUE. If this function fails, it returns FALSE. To get more information, call the GetLastError function.

Possible error codes:

Error code

Meaning

WSAEINVAL

One of these conditions occurred:

  • Parameter InterfaceIndex doesn’t correspond to any existing interface.
  • Parameter pIpv4Address is NULL.
  • Parameter pIpv4Address is not valid.
  • The IPv4 address or subnet mask in parameter pIpv4Address is not a syntactically correct dotted-quad string.
  • The interface only has one assigned IPv4 address.

WSASYSNOTREADY

The TCP/IP Stack is not running.

WSAEADDRNOTAVAIL

The IPv4 address specified by parameter pIpv4Address doesn’t exist in the list of IPv4 addresses assigned to the interface.

Remarks

Calling this function may disrupt IP traffic on any of the IP addresses used by the interface.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

RttcpipApi.h

RtTcpipApi.lib

See also: