Поделиться через


MIB_IPINTERFACE_ROW (Compact 2013)

3/26/2014

This structure stores interface management information for a particular IP address family on a network interface.

Syntax

typedef struct _MIB_IPINTERFACE_ROW {
  ADDRESS_FAMILY Family;
  NET_LUID InterfaceLuid;
  NET_IFINDEX InterfaceIndex;
  ULONG MaxReassemblySize;
  ULONG64 InterfaceIdentifier;
  ULONG MinRouterAdvertisementInterval;
  ULONG MaxRouterAdvertisementInterval;
  BOOLEAN AdvertisingEnabled;
  BOOLEAN ForwardingEnabled;
  BOOLEAN WeakHostSend;
  BOOLEAN WeakHostReceive;
  BOOLEAN UseAutomaticMetric;
  BOOLEAN UseNeighborUnreachabilityDetection;
  BOOLEAN ManagedAddressConfigurationSupported;
  BOOLEAN OtherStatefulConfigurationSupported;
  BOOLEAN AdvertiseDefaultRoute;
  NL_ROUTER_DISCOVERY_BEHAVIOR RouterDiscoveryBehavior;
  ULONG DadTransmits;
  ULONG BaseReachableTime;
  ULONG RetransmitTime;
  ULONG PathMtuDiscoveryTimeout;
  NL_LINK_LOCAL_ADDRESS_BEHAVIOR LinkLocalAddressBehavior;
  ULONG LinkLocalAddressTimeout;
  ULONG ZoneIndices[ScopeLevelCount];
  ULONG SitePrefixLength;
  ULONG Metric;  ULONG NlMtu;
  BOOLEAN Connected;
  BOOLEAN SupportsWakeUpPatterns;
  BOOLEAN SupportsNeighborDiscovery;
  BOOLEAN SupportsRouterDiscovery;
  ULONG ReachableTime;
  NL_INTERFACE_OFFLOAD_ROD TransmitOffload;
  NL_INTERFACE_OFFLOAD_ROD ReceiveOffload;
  BOOLEAN DisableDefaultRoutes;
} MIB_IPINTERFACE_ROW,
  *PMIB_IPINTERFACE_ROW;

Members

  • Family
    The address family. Possible values are listed in the Winsock2.h header file. Be aware that the values for the AF_ address family and PF_ protocol family constants are identical (for example, AF_INET and PF_INET). Therefore, either constant can be used.

    The header files organization has changed, and possible values for this member are defined in the Ws2def.h header file. Be aware that the Ws2def.h header file is automatically included in Winsock2.h, and should never be used directly.

    The values currently supported are AF_INET or AF_INET6. These are the Internet address family formats for IPv4 and IPv6:

    Value

    Meaning

    AF_UNSPEC

    0

    The address family is unspecified.

    AF_INET

    2

    The Internet Protocol version 4 (IPv4) address family.

    AF_INET6

    23

    The Internet Protocol version 6 (IPv6) address family.

  • InterfaceLuid
    The LUID for the network interface.
  • InterfaceIndex
    The local index value for the network interface. This index value may change when a network adapter is disabled and then enabled, or under other circumstances, and should not be considered persistent.
  • MaxReassemblySize
    The maximum reassembly size, in bytes, of a fragmented IP packet. Reserved, set to 0 (zero).
  • InterfaceIdentifier
    Reserved, set to 0 (zero).
  • MinRouterAdvertisementInterval
    The minimum router advertisement interval, in milliseconds, on this IP interface. This member uses 200 for IPv6. This member is only applicable if the AdvertisingEnabled member is set to TRUE.
  • MaxRouterAdvertisementInterval
    The maximum router advertisement interval, in milliseconds, on this IP interface. This member uses 600 for IPv6. This member is only applicable if the AdvertisingEnabled member is set to TRUE.
  • AdvertisingEnabled
    A value that indicates if router advertising is enabled on this IP interface. The default for IPv6 is that router advertisement is enabled only if the interface is configured to act as a router. The default for IPv4 is that router advertisement is disabled.
  • ForwardingEnabled
    A value that indicates if IP forwarding is enabled on this IP interface.
  • WeakHostSend
    A value that indicates if weak host send mode is enabled on this IP interface.
  • WeakHostReceive
    A value that indicates if weak host receive mode is enabled on this IP interface.
  • UseAutomaticMetric
    A value that indicates if the IP interface uses automatic metric.
  • UseNeighborUnreachabilityDetection
    A value that indicates if neighbor unreachability detection is enabled on this IP interface.
  • ManagedAddressConfigurationSupported
    A value that indicates if the IP interface supports managed address configuration by using DHCP.
  • OtherStatefulConfigurationSupported
    A value that indicates if the IP interface supports other stateful configuration (route configuration, for example).
  • AdvertiseDefaultRoute
    A value that indicates if the IP interface advertises the default route. This member is only applicable if the AdvertisingEnabled member is set to TRUE.
  • RouterDiscoveryBehavior
    The router discovery behavior. This member can be one of the values from the NL_ROUTER_DISCOVERY_BEHAVIOR enumeration type that is defined in the Nldef.h header file. The member is described in RFC 2461.

    Value

    Meaning

    RouterDiscoveryDisabled

    0

    Router discovery is disabled.

    RouterDiscoveryEnabled

    1

    Router discovery is enabled. This is the default value for IPv6.

    RouterDiscoveryDhcp

    2

    Router discovery is configured based on DHCP. This is the default value for IPv4.

    RouterDiscoveryUnchanged

    -1

    This value is used when you set the properties for an IP interface when the value for router discovery should be unchanged.

  • DadTransmits
    The number of consecutive messages sent while performing duplicate address detection on a tentative IP unicast address. A value of zero indicates that duplicate address detection is not performed on tentative IP addresses. A value of one indicates a single transmission without any follow up retransmissions. For IPv4, the default for this member is 3. For IPv6, the default for this member is 1. For IPv6, these messages will be sent as neighbor solicitation requests. This member is defined as DupAddrDetectTransmits in RFC 2462.
  • BaseReachableTime
    The base for random reachable time, in milliseconds. The member is described in RFC 2461.
  • RetransmitTime
    The neighbor solicitation time-out, in milliseconds. The member is described in RFC 2461.
  • PathMtuDiscoveryTimeout
    The path MTU discovery time-out, in milliseconds.
  • LinkLocalAddressBehavior
    The link local address behavior. This member can be one of the values from the NL_LINK_LOCAL_ADDRESS_BEHAVIOR enumeration type that is defined in the Nldef.h header file:

    Value

    Meaning

    LinkLocalAlwaysOff

    0

    Never use a link local IP address.

    LinkLocalDelayed

    1

    Use a link local IP address only if no other address is available. This is the default setting for an IPv4 interface.

    LinkLocalAlwaysOn

    2

    Always use a link local IP address. This is the default setting for an IPv6 interface.

    LinkLocalUnchanged

    -1

    This value is used when you set the properties for an IP interface when the value for link local address behavior should be unchanged.

  • LinkLocalAddressTimeout
    The link local IP address time-out, in milliseconds.
  • ZoneIndices
    An array that specifies the zone part of scope IDs.
  • SitePrefixLength
    The site prefix length, in bits, of the IP interface address. The length, in bits, of the site prefix or network part of the IP interface address. For an IPv4 address, any value larger than 32 is an illegal value. For an IPv6 address, any value larger than 128 is an illegal value. A value of 255 is typically used to represent an illegal value.
  • Metric
    The interface metric. Note the actual route metric used to compute the route preference is the summation of the route metric offset specified in the Metric member of the MIB_IPFORWARD_ROW2 structure and the interface metric specified in this member.
  • NlMtu
    The network layer MTU size, in bytes.
  • Connected
    A value that indicates if the interface is connected to a network access point.
  • SupportsWakeUpPatterns
    A value that specifies if the network interface supports Wake on LAN.
  • SupportsNeighborDiscovery
    A value that specifies if the IP interface support neighbor discovery.
  • SupportsRouterDiscovery
    A value that specifies if the IP interface support neighbor discovery.
  • ReachableTime
    The reachable time-out, in milliseconds
  • TransmitOffload
    A set of flags that indicate the transmit offload capabilities for the IP interface. The NL_INTERFACE_OFFLOAD_ROD structure is defined in the Nldef.h header file.
  • ReceiveOffload
    A set of flags that indicate the receive offload capabilities for the IP interface. The NL_INTERFACE_OFFLOAD_ROD structure is defined in the Nldef.h header file.
  • DisableDefaultRoutes
    A value that indicates if using default route on the interface should be disabled. This member can be used by VPN clients to restrict split tunneling.

Remarks

The Family, InterfaceLuid, and InterfaceIndex members uniquely identify a MIB_IPINTERFACE_ROW entry.

When a unicast packet arrives at a host, IP must determine whether the packet is locally destined (its destination matches an address that is assigned to an interface of the host). IP implementations that follow a weak host model accept any locally destined packet, regardless of the interface on which the packet was received. IP implementations that follow the strong host model only accept locally destined packets if the destination address in the packet matches an address assigned to the interface on which the packet was received. The weak host model provides better network connectivity. However, it also makes hosts susceptible to multihome-based network attacks.

A metric is a value that is assigned to an IP route for a particular network interface that identifies the cost that is associated with using that route. For example, the metric can be valued as link speed, hop count, or time delay.

The automatic metric feature can be useful when the routing table contains multiple routes for the same destination. For example, a device with a 10 megabit network interface and a 100 megabit network interface has a default gateway that is configured on both network interfaces. When UseAutomaticMetric is TRUE, this feature can force all the traffic that is destined for the Internet, for example, to use the fastest network interface that is available.

The interface metric specified in the Metric member represents only the metric for the interface. The complete routing metric is a combination of this interface metric added to the route metric offset specified in the Metric member of the MIB_IPFORWARD_ROW2 structure of a route entry specified on this interface.

Unprivileged concurrent access to multiple networks of different security requirements creates a security hole and allows an unprivileged application to accidentally relay data between the two networks. A typical example is concurrent access to a virtual private network (VPN) and the Internet.

Be aware that the Netioapi.h header file is automatically included in the Iphlpapi.h header file. The Netioapi.h header file should never be used directly.

Example Code

To view an example that retrieves the MIB_IPINTERFACE_TABLE structure and then prints out several members of the MIB_IPINTERFACE_ROW structure entries in this table, see the GetIpInterfaceTable function.

Requirements

Header

ws2def.h,
ws2ipdef.h

See Also

Reference

MIB Structures
GetBestRoute
GetBestRoute2
GetIpInterfaceEntry
GetIpInterfaceTable
MIB_IPFORWARD_ROW2
MIB_IPINTERFACE_TABLE
NET_LUID
NL_INTERFACE_OFFLOAD_ROD
NL_LINK_LOCAL_ADDRESS_BEHAVIOR
NL_ROUTER_DISCOVERY_BEHAVIOR
SetIpInterfaceEntry