GetInterfaceInfoAtIndex
Top  Previous  Next

Description

Returns the parameters of the network interface at the specified index in the system interface list.


Syntax


[C++]
int
 GetInterfaceAtIndex(unsigned int index, InterfaceInfo* pInfo)


Parameters
[C/C++]
 
[in] unsigned int index  
Index of the requested interface in the system interface list.  
 
[out] const InterfaceInfo* advOpt  
Pointer to an InterfaceInfo structure containing the following fields:  
unsigned int ip  
     
The IPv4 address of the interface in network byte order.

unsigned int mask  
     The subnet mask of the interface in network byte order.  
unsigned int gateway  
     The IPv4 address of the gateway in network byte order.  
unsigned int speed  
     The speed of the interface in bits per second.  
unsigned int mtu  
     The Maximum Transmission Unit (MTU) size in bytes.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Index outside of range  
 

Example


This fragment of code browses through the network interfaces and fills out an array of records with the information about each interface.

InterfaceInfo Info[16];  
for (int i = 0; i < m_pCamera->GetInterfaceCount(); i++)  
{  
   char buf[20];  
   m_pCamera->GetInterfaceInfoAtIndex(i, Info);  
}  
 
 
Remarks

This method is typically used in combination with GetInterfaceCount to list all network interfaces installed on the system. A virtual camera can then be bound to one of the interfaces by calling Connect.

The list of system interfaces contains all network interfaces including Wi-Fi and some virtual interfaces that are not compatible with the GigE Vision standard. They may be utilized for connecting to a client application on the local host, but only GigE interfaces should be used for remote connections.
 


Remarks


This method is typically used in combination with GetInterfaceAtIndex to retrieve information about network interfaces installed on the system. A virtual camera can then be bound to one of the interfaces by calling Connect.

The list of system interfaces contains all network interfaces including Wi-Fi and some virtual interfaces that are not compatible with the GigE Vision standard. They may be utilized for connecting to a client application on the local host, but only GigE interfaces should be used for remote connections.