#include <iostream>
#include <vector>
#include <iCVGEVServer.h>
void PrintLastError()
{
size_t bufferSize = 0;
if(bufferSize == 0)
return;
std::vector buffer(bufferSize);
std::cout << &buffer[0] << std::endl;
}
void PrintIP(gsipv4 ip)
{
size_t vufferSize = 0;
if(result < 0)
{
PrintLastError();
return;
}
if(bufferSize == 0)
return;
std::vector buffer(bufferSize);
std::cout << &buffer[0] << std::endl;
}
void main()
{
if(hList == nullptr)
{
PrintLastError();
return;
}
size_t ifaceCount =
ILCount(hList);
for(size_t i = 0; i < ifaceCount; i++)
{
gsipv4 ip = 0;
if(result < 0)
PrintLastError();
else
PrintIP(ip);
}
ReleaseObject(hList);
}
cvbres_t GSGetLastErrorString(char *Error, size_t &Length)
Gets the last string describing the reason of the last error.
Definition: GevServerExports.cpp:1401
size_t ILCount(GEVIFACELIST List)
Gets the number of available network interfaces in the given List.
Definition: GevServerExports.cpp:928
cvbres_t ILIPv4Address(GEVIFACELIST List, size_t Index, gsipv4 &IPv4)
Gets the IP address of the logical interface at the given Index.
Definition: GevServerExports.cpp:984
GEVIFACELIST CreateInterfaceList()
Creates the ref-counted GEVIFACELIST object.
Definition: GevServerExports.cpp:859
cvbres_t GSIPv4ToString(gsipv4 IPv4, char *IPString, size_t &Length)
Converts the given IPv4 (or subnet mask) into a string representation.
Definition: GevServerExports.cpp:1180
void * GEVIFACELIST
Handle of a logical interface list object.
Definition: iCVGevServer.h:30