Redigera

Dela via


IP Helper Overview

Internet Protocol Helper (IP Helper) enables drivers to retrieve information about the network configuration of the local computer and to modify that configuration. IP Helper also provides notification mechanisms to make sure that a driver is notified when certain aspects of the local computer network configuration change. IP Helper is available in Windows Vista and later versions of the Microsoft Windows operating systems.

Many of the IP Helper functions pass structure parameters that represent data types that are associated with the Management Information Base (MIB) technology. The IP Helper functions use these MIB structures to represent various networking information.

The IP Helper documentation uses the terms "adapter" and "interface" extensively. An adapter is a legacy term that is an abbreviated form of network adapter, which originally referred to some form of network hardware. An adapter is a data link-level abstraction.

An interface is described in the IETF RFC documents as an abstract concept that represents a node's attachment to a link. An interface is an IP-level abstraction.

Your driver can use the following kernel-mode functions, MIB structures, and MIB and Network Layer (NL) enumerations to retrieve and modify configuration settings for Transmission Control Protocol/Internet Protocol (TCP/IP) transport on a local computer.

Note

 When you are developing driver code, follow the instructions for including header files.

Interface Conversion Functions

Function Description

ConvertInterfaceAliasToLuid

Converts a locally unique identifier (LUID) for a network interface to the Unicode interface name.

ConvertInterfaceGuidToLuid

Converts a globally unique identifier (GUID) for a network interface to the LUID for the interface.

ConvertInterfaceIndexToLuid

Converts a local index for a network interface to the LUID for the interface.

ConvertInterfaceLuidToAlias

Converts a LUID for a network interface to an interface alias.

ConvertInterfaceLuidToGuid

Converts a LUID for a network interface to a GUID for the interface.

ConvertInterfaceLuidToIndex

Converts a LUID for a network interface to the local index for the interface.

ConvertInterfaceLuidToNameA

Converts a LUID for a network interface to the ANSI interface name.

ConvertInterfaceLuidToNameW

Converts a LUID for a network interface to the Unicode interface name.

ConvertInterfaceNameToLuidA

Converts an ANSI network interface name to the LUID for the interface.

ConvertInterfaceNameToLuidW

Converts a Unicode network interface name to the LUID for the interface.

if_indextoname

Converts the local index for a network interface to the ANSI interface name.

if_nametoindex

Converts the ANSI interface name for a network interface to the local index for the interface.

Interface Management Functions

Function Description

GetIfEntry2

Retrieves information for the specified interface on the local computer.

GetIfStackTable

Retrieves a table of network interface stack row entries that specify the relationship of the network interfaces on an interface stack.

GetIfTable2

Retrieves the MIB-II interface table.

GetIfTable2Ex

Retrieves the MIB-II interface table, given a level of interface information to retrieve.

GetInvertedIfStackTable

Retrieves a table of inverted network interface stack row entries that specify the relationship of the network interfaces on an interface stack.

GetIpInterfaceEntry

Retrieves IP information for the specified interface on the local computer.

GetIpInterfaceTable

Retrieves the IP interface entries on the local computer.

InitializeIpInterfaceEntry

Initializes the members of a MIB_IPINTERFACE_ROW structure entry with default values.

SetIpInterfaceEntry

Sets the properties of an IP interface on the local computer.

IP Address Management Functions

Function Description

CreateAnycastIpAddressEntry

Adds a new anycast IP address entry on the local computer.

CreateSortedAddressPairs

Pairs a supplied list of destination addresses together with the host machine's local IP addresses and sorts the pairs according to the preferred order of communication.

CreateUnicastIpAddressEntry

Adds a new unicast IP address entry on the local computer.

DeleteAnycastIpAddressEntry

Deletes an existing anycast IP address entry on the local computer.

DeleteUnicastIpAddressEntry

Deletes an existing unicast IP address entry from the local computer.

GetAnycastIpAddressEntry

Retrieves information for an existing anycast IP address entry on the local computer.

GetAnycastIpAddressTable

Retrieves the anycast IP address table on the local computer.

GetMulticastIpAddressEntry

Retrieves information for an existing multicast IP address entry on the local computer.

GetMulticastIpAddressTable

Retrieves the multicast IP address table on the local computer.

GetUnicastIpAddressEntry

Retrieves information for an existing unicast IP address entry on the local computer.

GetUnicastIpAddressTable

Retrieves the unicast IP address table on the local computer.

InitializeUnicastIpAddressEntry

Initializes a MIB_UNICASTIPADDRESS_ROW structure with default values for a unicast IP address entry on the local computer.

NotifyStableUnicastIpAddressTable

Retrieves the stable unicast IP address table on a local computer.

SetUnicastIpAddressEntry

Sets the properties of an existing unicast IP address entry on the local computer.

IP Neighbor Address Management Functions

Function Description

CreateIpNetEntry2

Creates a new neighbor IP address entry on the local computer.

DeleteIpNetEntry2

Deletes a neighbor IP address entry from the local computer.

FlushIpNetTable2

Flushes the IP neighbor table on the local computer.

GetIpNetEntry2

Retrieves information for a neighbor IP address entry on the local computer.

GetIpNetTable2

Retrieves the IP neighbor table on the local computer.

ResolveIpNetEntry2

Resolves the physical address for a neighbor IP address entry on the local computer.

SetIpNetEntry2

Sets the physical address of an existing neighbor IP address entry on the local computer.

IP Path Management Functions

Function Description

FlushIpPathTable

Flushes the IP path table on the local computer.

GetIpPathEntry

Retrieves information for an IP path entry on the local computer.

GetIpPathTable

Retrieves information for an IP path entry on the local computer.

IP Route Management Functions

Function Description

CreateIpForwardEntry2

Creates a new IP route entry on the local computer.

DeleteIpForwardEntry2

Deletes an IP route entry from the local computer.

GetBestRoute2

Retrieves the IP route entry on the local computer for the best route to the specified destination IP address.

GetIpForwardEntry2

Retrieves information for an IP route entry on the local computer.

GetIpForwardTable2

Retrieves the IP route entries on the local computer.

InitializeIpForwardEntry

Initializes a MIB_IPFORWARD_ROW2 structure with default values for an IP route entry on the local computer.

SetIpForwardEntry2

Sets the properties of an IP route entry on the local computer.

IP Table Memory Management Functions

Function Description

FreeMibTable

Frees the buffer that is allocated by the functions that return tables of network interfaces, addresses, and routes (for example, GetIfTable2 and GetAnycastIpAddressTable).

Notification Functions

Function Description

CancelMibChangeNotify2

Deregisters the driver for change notifications for IP interface changes, IP address changes, IP route changes, and requests to retrieve the stable unicast IP address table.

NotifyIpInterfaceChange

Registers the driver to be notified for changes to all IP interfaces, IPv4 interfaces, or IPv6 interfaces on a local computer.

NotifyRouteChange2

Registers to be notified for changes to IP route entries on a local computer.

NotifyUnicastIpAddressChange

Registers to be notified for changes to all unicast IP interfaces, unicast IPv4 addresses, or unicast IPv6 addresses on a local computer.

Teredo IPv6 Client Management Functions

Function Description

GetTeredoPort

Retrieves the dynamic UDP port number that the Teredo client uses on the local computer.

NotifyTeredoPortChange

Registers to be notified for changes to the UDP port number that the Teredo client uses for the Teredo service port on a local computer.

NotifyStableUnicastIpAddressTable

Retrieves the stable unicast IP address table on a local computer.

MIB Structures

Structure Description

IP_ADDRESS_PREFIX

Stores an IP address prefix.

MIB_ANYCASTIPADDRESS_ROW

Stores information about an anycast IP address.

MIB_ANYCASTIPADDRESS_TABLE

Contains a table of anycast IP address entries.

MIB_IF_ROW2

Stores information about a particular interface.

MIB_IF_TABLE2

Contains a table of logical and physical interface entries.

MIB_IFSTACK_ROW

Represents the relationship between two network interfaces.

MIB_IFSTACK_TABLE

Contains a table of row entries in the network interface stack. This table specifies the relationship of the network interfaces on an interface stack.

MIB_INVERTEDIFSTACK_ROW

Represents the relationship between two network interfaces.

MIB_INVERTEDIFSTACK_TABLE

Contains a table of inverted network interface stack row entries. This table specifies the relationship of the network interfaces on an interface stack in reverse order.

MIB_IPFORWARD_ROW2

Stores information about an IP route entry.

MIB_IPFORWARD_TABLE2

Contains a table of IP route entries.

MIB_IPINTERFACE_ROW

Stores interface management information for a particular IP address family on a network interface.

MIB_IPINTERFACE_TABLE

Contains a table of IP interface entries.

MIB_IPNET_ROW2

Stores information about a neighbor IP address.

MIB_IPNET_TABLE2

Contains a table of neighbor IP address entries.

MIB_IPPATH_ROW

Stores information about an IP path entry.

MIB_IPPATH_TABLE

Contains a table of IP path entries.

MIB_MULTICASTIPADDRESS_ROW

Stores information about a multicast IP address.

MIB_MULTICASTIPADDRESS_TABLE

Contains a table of multicast IP address entries.

MIB_UNICASTIPADDRESS_ROW

Stores information about a unicast IP address.

MIB_UNICASTIPADDRESS_TABLE

Contains a table of unicast IP address entries.

MIB Enumerations

Enumeration Description

MIB_IF_TABLE_LEVEL

Defines the level of interface information to retrieve.

MIB_NOTIFICATION_TYPE

Defines the notification type that is passed to a callback function when a notification occurs.

NL Enumerations

Enumeration Description

NL_ADDRESS_TYPE

Specifies the IP address type of the network layer.

NL_DAD_STATE

Defines the duplicate address detection (DAD) state.

NL_LINK_LOCAL_ADDRESS_BEHAVIOR

Defines the link local address behavior.

NL_NEIGHBOR_STATE

Defines the state of a network layer neighbor IP address, as described in RFC 2461, section 7.3.2.

NL_PREFIX_ORIGIN

Defines the origin of the prefix or network part of the IP address.

NL_ROUTE_ORIGIN

Defines the origin of the IP route.

NL_ROUTE_PROTOCOL

Defines the routing mechanism that an IP route was added with, as described in RFC 4292.

NL_ROUTER_DISCOVERY_BEHAVIOR

Defines the router discovery behavior, as described in RFC 2461.

NL_SUFFIX_ORIGIN

Defines the origin of the suffix or host part of the IP address.