Freigeben über


NET_IF_INFORMATION (Compact 2013)

3/26/2014

This structure provides NDIS with information about a registered network interface.

Syntax

typedef struct _NET_IF_INFORMATION {
  NDIS_OBJECT_HEADER  Header;
  ULONG  Flags;  
  NET_PHYSICAL_LOCATION  PhysicalLocation; 
  ULONG  WanTunnelType; 
  ULONG  PortNumber; 
  NET_IF_ACCESS_TYPE  AccessType;
  NET_IF_DIRECTION_TYPE  DirectionType;
  NET_IF_CONNECTION_TYPE  ConnectionType;
  BOOLEAN  ifConnectorPresent; 
  USHORT  PhysAddressLength; 
  USHORT  PhysAddressOffset; 
  USHORT  PermanentPhysAddressOffset;  
  USHORT  FriendlyNameLength; 
  USHORT  FriendlyNameOffset; 
  GUID  InterfaceGuid;  
  NET_IF_NETWORK_GUID  NetworkGuid; 
  ULONG  SupportedStatistics;
  NDIS_MEDIUM  MediaType;
  NDIS_PHYSICAL_MEDIUM  PhysicalMediumType;
} NET_IF_INFORMATION, *PNET_IF_INFORMATION;

Members

  • Header
    The NDIS_OBJECT_HEADER structure for the interface information structure (NET_IF_INFORMATION). The provider sets the Type member of the structure that Header specifies to NDIS_OBJECT_TYPE_DEFAULT, the Revision member to NDIS_OBJECT_REVISION_1, and the Size member to NDIS_SIZEOF_NET_IF_INFORMATION_REVISION_1.
  • Flags
    Flags that provide information about the interface that this structure describes. These flags are combined with a bitwise OR operation. If none of the flags applies, set this member to zero. The following flag values are defined:

    • NIIF_HARDWARE_INTERFACE
      Set if the network interface is for hardware.
    • NIIF_FILTER_INTERFACE
      Set if the network interface is for a filter module.
    • NIIF_NDIS_RESERVED1
      Reserved for NDIS.
    • NIIF_NDIS_RESERVED2
      Reserved for NDIS.
    • NIIF_NDIS_RESERVED3
      Reserved for NDIS.
  • PhysicalLocation
    The physical location for the hardware that is associated with an interface specified in a NET_PHYSICAL_LOCATION structure.
  • WanTunnelType
    The tunnelIfEncapsMethod (from RFC 2667) for WAN devices. If the WAN tunnel type is unknown, set this member to NIIF_WAN_TUNNEL_TYPE_UNKNOWN.
  • PortNumber
    The NDIS port number for the interface.
  • ifConnectorPresent
    A Boolean value that indicates if a connector is present. Set this value to TRUE if there is a physical adapter or FALSE if there is no physical adapter.
  • PhysAddressLength
    The length, in bytes, of the physical address or MAC address. This length is the length of the byte arrays that are located at the offsets that the PhysAddressOffset and PermanentPhysAddressOffset members specify.
  • PhysAddressOffset
    The offset of the current physical address, in bytes, from the beginning of this structure. The current physical address is an array of bytes. The length of the array is specified in the PhysAddressLength member. The current physical address is the same value that the OID_802_3_CURRENT_ADDRESS OID returns.
  • PermanentPhysAddressOffset
    The offset of the permanent physical address, in bytes, from the beginning of this structure. The permanent physical address is an array of bytes. The length of the array is specified in the PhysAddressLength member. The permanent physical address is the same value that the OID_802_3_PERMANENT_ADDRESS OID returns.
  • FriendlyNameLength
    The length, in bytes, of the friendly name for the interface that this structure describes. This length is the length of the WCHAR array that is located at the offset in the FriendlyNameOffset member.
  • FriendlyNameOffset
    The offset of the beginning of the friendly name, in bytes, from the beginning of this structure. This name should include the name of the manufacturer, the product, and the version of the interface hardware and software. The name is specified as an array of WCHAR values. The FriendlyNameLength member specifies the length of the array.
  • InterfaceGuid
    The GUID that is associated with the interface. The interface provider generates the interface GUID for the interface. The provider can call the ExUuidCreate routine to create the GUID. The interface GUID should be associated with the NET_LUID value that is assigned to the interface. If the provider keeps information about the interface in persistent storage, it should save the GUID and reuse the GUID when it reregisters the interface after the device restarts.
  • NetworkGuid
    The GUID that is associated with the network that the interface belongs to. If the interface provider cannot provide the network GUID, it can pass a zero GUID. In this case, NDIS will register the interface in the default network of the primary compartment.

Remarks

A network interface provider initializes a NET_IF_INFORMATION structure to provide NDIS with information about a registered interface. To register an interface, a provider passes a pointer to a NET_IF_INFORMATION structure to the NdisIfRegisterInterface function.

The interface provider should allocate sufficient memory for the structure and the arrays that the PhysAddressOffset, PermanentPhysAddressOffset, and FriendlyNameOffset members specify. The provider must provide the values for the arrays after the structure and set the offset members to identify the location of the arrays.

Requirements

Header

ifdef.h,
ndis.h

See Also

Reference

NDIS Network Interface Structures
NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES
NDIS_OBJECT_HEADER
NdisIfRegisterInterface
NET_IF_ACCESS_TYPE
NET_IF_CONNECTION_TYPE
NET_IF_DIRECTION_TYPE
NET_PHYSICAL_LOCATION
OID_802_3_CURRENT_ADDRESS
OID_802_3_PERMANENT_ADDRESS
OID_GEN_PHYSICAL_MEDIUM
OID_GEN_STATISTICS

Other Resources

NET_LUID