3#include "../global.hpp"
5#include "../network_connection.hpp"
6#include "gevserver.hpp"
8#include "../_cexports/c_img.h"
15inline HandleGuard<CExports::GEVIFACELIST>::HandleGuard(
void *handle) noexcept
16 : HandleGuard<CExports::GEVIFACELIST>(handle, [](
void *handle) { CVB_CALL_CAPI(ReleaseObject(handle)); })
40 HandleGuard<CExports::GEVIFACELIST> guard(CVB_CALL_CAPI(CreateInterfaceList()));
44 auto numInterfaces = CVB_CALL_CAPI(ILCount(guard.Handle()));
49 CExports::gsipv4 ip = 0;
50 if(CVB_CALL_CAPI(ILIPv4Address(guard.Handle(), i, ip)))
53 CExports::gsipv4 subnetMask = 0;
54 if(CVB_CALL_CAPI(ILIPv4SubnetMask(guard.Handle(), i, subnetMask)))
63 LogicalNetworkInterface(
const IPAddressType &ip,
const IPv4MaskType &ipv4Mask) : ipAddress_{ip}, ipv4Mask_{ipv4Mask}
67 LogicalNetworkInterface(
const IPAddressTypeUInt &ipUInt,
const IPv4MaskType &ipv4Mask)
68 : ipAddressUInt_{ipUInt}, ipv4Mask_{ipv4Mask}
82 ipAddress_ = ipAddress;
96 ipAddressUInt_ = ipAddressUInt;
110 IPAddressType ipAddress_;
111 IPAddressTypeUInt ipAddressUInt_ = 0;
112 IPv4MaskType ipv4Mask_;
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24
An IP network interface the GevServer can be bound to.
Definition: logical_network_interface.hpp:27
void IPv4Mask(const IPAddressType &ipv4Mask)
Sets the subnet mask of the Address.
Definition: logical_network_interface.hpp:108
static std::vector< LogicalNetworkInterface > GetAllAvailable()
Gets all available network interfaces usable by the GevServer.
Definition: logical_network_interface.hpp:38
void SetIPAddress(const IPAddressType &ipAddress)
Sets the address of the interface as string and converted uint.
Definition: logical_network_interface.hpp:80
void SetIPAddressUInt(const IPAddressTypeUInt &ipAddressUInt)
Sets the address of the interface as unsigned integer and converted string ip address.
Definition: logical_network_interface.hpp:94
IPAddressTypeUInt IPAddressUInt() const
Gets the address of the interface as unsigned integer.
Definition: logical_network_interface.hpp:89
IPAddressType IPAddress() const
Gets the address of the interface.
Definition: logical_network_interface.hpp:75
IPAddressType IPv4Mask() const
Gets the subnet mask of the Address.
Definition: logical_network_interface.hpp:103
static IPAddress ToIPAddress(const IPAddressUInt &ipAddressInt)
Creates an IPAddress from the given uint ip .
Definition: network_connection.hpp:42
static IPAddressUInt ToIPAddressUInt(const IPAddress &ip)
Creates an uint ip . from the given IPAddress
Definition: network_connection.hpp:64