Interface IPHlpAPI
- All Superinterfaces:
- Library
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classThe FIXED_INFO structure contains information that is the same across all the interfaces on a computer.static classThe IP_ADDR_STRING structure represents a node in a linked-list of IPv4 addresses.static classThe IP_ADDRESS_STRING structure stores an IPv4 address in dotted decimal notation.static classThe MIB_IF_ROW2 structure stores information about a particular interface.static classThe MIB_IFROW structure stores information about a particular interface.static interfaceEnumerates different possible TCP states.static classContains information that describes an IPv6 TCP connection.static classContains a table of IPv6 TCP connections on the local computer.static classContains information that describes an IPv4 TCP connection.static classThe MIB_TCPSTATS structure contains statistics for the TCP protocol running on the local computer.static classContains a table of IPv4 TCP connections on the local computer.static classContains information that describes an IPv6 UDP connection.static classContains a table of IPv6 UDP connections on the local computer.static classContains information that describes an IPv6 UDP connection.static classThe MIB_UDPSTATS structure contains statistics for the User Datagram Protocol (UDP) running on the local computer.static classContains a table of IPv6 UDP connections on the local computer.static interfaceDefines the set of values used to indicate the type of table returned by calls toGetExtendedTcpTable(com.sun.jna.Pointer, com.sun.jna.ptr.IntByReference, boolean, int, int, int)static interfaceDefines the set of values used to indicate the type of table returned by calls toGetExtendedUdpTable(com.sun.jna.Pointer, com.sun.jna.ptr.IntByReference, boolean, int, int, int).Nested classes/interfaces inherited from interface com.sun.jna.LibraryLibrary.Handler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final IPHlpAPIstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from interface com.sun.jna.LibraryOPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER
- 
Method SummaryModifier and TypeMethodDescriptionintGetExtendedTcpTable(Pointer pTcpTable, IntByReference pdwSize, boolean bOrder, int ulAf, int TableClass, int Reserved) Retrieves a table that contains a list of TCP endpoints available to the application.intGetExtendedUdpTable(Pointer pUdpTable, IntByReference pdwSize, boolean bOrder, int ulAf, int TableClass, int Reserved) Retrieves a table that contains a list of UDP endpoints available to the application.intGetIfEntry(IPHlpAPI.MIB_IFROW pIfRow) The GetIfEntry function retrieves information for the specified interface on the local computer.intGetIfEntry2(IPHlpAPI.MIB_IF_ROW2 pIfRow2) The GetIfEntry2 function retrieves information for the specified interface on the local computer.intGetNetworkParams(Pointer pFixedInfo, IntByReference pOutBufLen) The GetNetworkParams function retrieves network parameters for the local computer.intGetTcpStatistics(IPHlpAPI.MIB_TCPSTATS Statistics) The GetTcpStatistics function retrieves the TCP statistics for the local computer.intGetTcpStatisticsEx(IPHlpAPI.MIB_TCPSTATS Statistics, int Family) The GetTcpStatisticsEx function retrieves the Transmission Control Protocol (TCP) statistics for the current computer.intGetUdpStatistics(IPHlpAPI.MIB_UDPSTATS Statistics) The GetUdpStatistics function retrieves the User Datagram Protocol (UDP) statistics for the local computer.intGetUdpStatisticsEx(IPHlpAPI.MIB_UDPSTATS Statistics, int Family) The GetUdpStatisticsEx function retrieves the User Datagram Protocol (UDP) statistics for the current computer.
- 
Field Details- 
INSTANCE
- 
IF_MAX_STRING_SIZEstatic final int IF_MAX_STRING_SIZE- See Also:
 
- 
IF_MAX_PHYS_ADDRESS_LENGTHstatic final int IF_MAX_PHYS_ADDRESS_LENGTH- See Also:
 
- 
MAX_INTERFACE_NAME_LENstatic final int MAX_INTERFACE_NAME_LEN- See Also:
 
- 
MAXLEN_IFDESCRstatic final int MAXLEN_IFDESCR- See Also:
 
- 
MAXLEN_PHYSADDRstatic final int MAXLEN_PHYSADDR- See Also:
 
- 
MAX_HOSTNAME_LENstatic final int MAX_HOSTNAME_LEN- See Also:
 
- 
MAX_DOMAIN_NAME_LENstatic final int MAX_DOMAIN_NAME_LEN- See Also:
 
- 
MAX_SCOPE_ID_LENstatic final int MAX_SCOPE_ID_LEN- See Also:
 
- 
AF_UNSPECstatic final int AF_UNSPEC- See Also:
 
- 
AF_INETstatic final int AF_INET- See Also:
 
- 
AF_IPXstatic final int AF_IPX- See Also:
 
- 
AF_NETBIOSstatic final int AF_NETBIOS- See Also:
 
- 
AF_INET6static final int AF_INET6- See Also:
 
- 
AF_IRDAstatic final int AF_IRDA- See Also:
 
- 
AF_BTHstatic final int AF_BTH- See Also:
 
 
- 
- 
Method Details- 
GetIfEntryThe GetIfEntry function retrieves information for the specified interface on the local computer.The dwIndexmember in theIPHlpAPI.MIB_IFROWstructure pointed to by the pIfRow parameter must be initialized to a valid network interface index retrieved by a previous call to the GetIfTable, GetIfTable2, or GetIfTable2Ex function. The GetIfEntry function will fail if the dwIndex member of theIPHlpAPI.MIB_IFROWpointed to by the pIfRow parameter does not match an existing interface index on the local computer.- Parameters:
- pIfRow- A pointer to a MIB_IFROW structure that, on successful return, receives information for an interface on the local computer. On input, set the dwIndex member of- IPHlpAPI.MIB_IFROWto the index of the interface for which to retrieve information.
- Returns:
- If the function succeeds, the return value is
         WinError.NO_ERROR.
 
- 
GetIfEntry2The GetIfEntry2 function retrieves information for the specified interface on the local computer.On input, at least one of the following members in the IPHlpAPI.MIB_IF_ROW2structure passed in the Row parameter must be initialized: InterfaceLuid or InterfaceIndex. The fields are used in the order listed above. So if the InterfaceLuid is specified, then this member is used to determine the interface. If no value was set for the InterfaceLuid member (the value of this member was set to zero), then the InterfaceIndex member is next used to determine the interface. On output, the remaining fields of theIPHlpAPI.MIB_IF_ROW2structure pointed to by the Row parameter are filled in.- Parameters:
- pIfRow2- A pointer to a- IPHlpAPI.MIB_IF_ROW2structure that, on successful return, receives information for an interface on the local computer. On input, the InterfaceLuid or the InterfaceIndex member of the- IPHlpAPI.MIB_IF_ROW2must be set to the interface for which to retrieve information.
- Returns:
- If the function succeeds, the return value is
         WinError.NO_ERROR.
 
- 
GetNetworkParamsThe GetNetworkParams function retrieves network parameters for the local computer.- Parameters:
- pFixedInfo- A pointer to a buffer that contains a- IPHlpAPI.FIXED_INFOstructure that receives the network parameters for the local computer, if the function was successful. This buffer must be allocated by the caller prior to calling the GetNetworkParams function.
- pOutBufLen- A pointer to a ULONG variable that specifies the size of the- IPHlpAPI.FIXED_INFOstructure. If this size is insufficient to hold the information, GetNetworkParams fills in this variable with the required size, and returns an error code of- WinError.ERROR_BUFFER_OVERFLOW.
- Returns:
- If the function succeeds, the return value is
         WinError.ERROR_SUCCESS.
 
- 
GetTcpStatisticsThe GetTcpStatistics function retrieves the TCP statistics for the local computer.- Parameters:
- Statistics- A- IPHlpAPI.MIB_TCPSTATSstructure that receives the TCP statistics for the local computer.
- Returns:
- If the function succeeds, the return value is
         WinError.NO_ERROR.
 
- 
GetTcpStatisticsExThe GetTcpStatisticsEx function retrieves the Transmission Control Protocol (TCP) statistics for the current computer. The GetTcpStatisticsEx function differs from theGetTcpStatistics(com.sun.jna.platform.win32.IPHlpAPI.MIB_TCPSTATS)function in that GetTcpStatisticsEx also supports the Internet Protocol version 6 (IPv6) protocol family.- Parameters:
- Statistics- A- IPHlpAPI.MIB_TCPSTATSstructure that receives the TCP statistics for the local computer.
- Family- The protocol family for which to retrieve statistics. This parameter must be- AF_INETor- AF_INET6.
- Returns:
- If the function succeeds, the return value is
         WinError.NO_ERROR.
 
- 
GetUdpStatisticsThe GetUdpStatistics function retrieves the User Datagram Protocol (UDP) statistics for the local computer.- Parameters:
- Statistics- A- IPHlpAPI.MIB_UDPSTATSstructure that receives the UDP statistics for the local computer.
- Returns:
- If the function succeeds, the return value is
         WinError.NO_ERROR.
 
- 
GetUdpStatisticsExThe GetUdpStatisticsEx function retrieves the User Datagram Protocol (UDP) statistics for the current computer. The GetUdpStatisticsEx function differs from theGetUdpStatistics(com.sun.jna.platform.win32.IPHlpAPI.MIB_UDPSTATS)function in that GetUdpStatisticsEx also supports the Internet Protocol version 6 (IPv6) protocol family.- Parameters:
- Statistics- A- IPHlpAPI.MIB_UDPSTATSstructure that receives the UDP statistics for the local computer.
- Family- The protocol family for which to retrieve statistics. This parameter must be- AF_INETor- AF_INET6.
- Returns:
- If the function succeeds, the return value is
         WinError.NO_ERROR.
 
- 
GetExtendedTcpTableint GetExtendedTcpTable(Pointer pTcpTable, IntByReference pdwSize, boolean bOrder, int ulAf, int TableClass, int Reserved) Retrieves a table that contains a list of TCP endpoints available to the application.- Parameters:
- pTcpTable- A pointer to the table structure that contains the filtered TCP endpoints available to the application.
- pdwSize- The estimated size of the structure returned in pTcpTable, in bytes. If this value is set too small,- ERROR_INSUFFICIENT_BUFFERis returned by this function, and this field will contain the correct size of the structure.
- bOrder- A value that specifies whether the TCP connection table should be sorted. If this parameter is set to TRUE, the TCP endpoints in the table are sorted in ascending order, starting with the lowest local IP address. If this parameter is set to FALSE, the TCP endpoints in the table appear in the order in which they were retrieved. The following values are compared (as listed) when ordering the TCP endpoints: Local IP address, Local scope ID (applicable when the ulAf parameter is set to AF_INET6), Local TCP port, Remote IP address, Remote scope ID (applicable when the ulAf parameter is set to AF_INET6), Remote TCP port.
- ulAf- The version of IP used by the TCP endpoints.
- TableClass- The type of the TCP table structure to retrieve. This parameter can be one of the values from the- IPHlpAPI.TCP_TABLE_CLASSenumeration.
- Reserved- Reserved. This value must be zero.
- Returns:
- If the function succeeds, the return value is NO_ERROR. If the function fails, the return value is an error code.
 
- 
GetExtendedUdpTableint GetExtendedUdpTable(Pointer pUdpTable, IntByReference pdwSize, boolean bOrder, int ulAf, int TableClass, int Reserved) Retrieves a table that contains a list of UDP endpoints available to the application.- Parameters:
- pUdpTable- A pointer to the table structure that contains the filtered UDP endpoints available to the application.
- pdwSize- The estimated size of the structure returned in pTcpTable, in bytes. If this value is set too small,- ERROR_INSUFFICIENT_BUFFERis returned by this function, and this field will contain the correct size of the structure.
- bOrder- A value that specifies whether the TCP connection table should be sorted. If this parameter is set to TRUE, the TCP endpoints in the table are sorted in ascending order, starting with the lowest local IP address. If this parameter is set to FALSE, the TCP endpoints in the table appear in the order in which they were retrieved. The following values are compared (as listed) when ordering the TCP endpoints: Local IP address, Local scope ID (applicable when the ulAf parameter is set to- AF_INET6), Local TCP port, Remote IP address, Remote scope ID (applicable when the ulAf parameter is set to- AF_INET6), Remote TCP port.
- ulAf- The version of IP used by the UDP endpoints.
- TableClass- The type of the TCP table structure to retrieve. This parameter can be one of the values from the- IPHlpAPI.TCP_TABLE_CLASSenumeration.
- Reserved- Reserved. This value must be zero.
- Returns:
- If the function succeeds, the return value is NO_ERROR. If the function fails, the return value is an error code.
 
 
-