GEV Server (CVGevServer.dll) 14.0
String Conversion Functions

Functions

cvbres_t GSIPv4ToString (gsipv4 IPv4, char *IPString, size_t &Length)
 Converts the given IPv4 (or subnet mask) into a string representation. More...
 
cvbres_t GSMACToString (ILMAC MACAddress, char *MACString, size_t &Length)
 Converts the given MACAddress into a string representation. More...
 
cvbres_t GSStringToIPv4 (const char *IPString, gsipv4 &IPv4)
 Converts the given IPString (or subnet mask) into a IP version 4 address. More...
 
cvbres_t GSStringToMAC (const char *MACString, ILMAC &MACAddress)
 Converts the given MACString into an ILMAC representation. More...
 

Detailed Description

Function Documentation

◆ GSIPv4ToString()

cvbres_t GSIPv4ToString ( gsipv4  IPv4,
char *  IPString,
size_t &  Length 
)

Converts the given IPv4 (or subnet mask) into a string representation.

Parameters
[in]IPv4IP version 4 address to convert to string.
[in]IPStringPointer of char array to contain c-string representation. nullptr for size inquiry.
[in,out]LengthNumber of bytes allocated in IPString if it is unequal nullptr. Receives minimal number of bytes needed for full string representation including zero-termination.
Returns
Smaller than zero on error (Use GSGetLastErrorString function for a human readable error description).
Supported platforms:
Win32
Win64
Linux
Related Topics:
GSGetLocalIPv4, GSGetRemoteIPv4, ILIPv4Address, ILIPv4SubnetMask, GSStringToIPv4
Examples:
Visual C++ - VC GevServer Example
Sample in Visual C++:
For an example see the CreateInterfaceList function's documentation.

◆ GSMACToString()

cvbres_t GSMACToString ( ILMAC  MACAddress,
char *  MACString,
size_t &  Length 
)

Converts the given MACAddress into a string representation.

Parameters
[in]MACAddress6 byte MAC address to convert into a string.
[in]MACStringPointer of char array to contain c-string representation. nullptr for size inquiry.
[in,out]LengthNumber of bytes allocated in MACString if it is unequal nullptr. Receives minimal number of bytes needed for full string representation including zero-termination otherwise.
Returns
Smaller than zero on error (Use GSGetLastErrorString function for a human readable error description).
Supported platforms:
Win32
Win64
Linux
Related Topics:
ILMACAddress, GSStringToMAC

◆ GSStringToIPv4()

cvbres_t GSStringToIPv4 ( const char *  IPString,
gsipv4 &  IPv4 
)

Converts the given IPString (or subnet mask) into a IP version 4 address.

Parameters
[in]IPStringC-string representation of the IPv4 address, e.g. "192.168.1.1".
[out]IPv4Parsed value of the IPString.
Returns
Smaller than zero on error (Use GSGetLastErrorString function for a human readable error description).
Supported platforms:
Win32
Win64
Linux
Related Topics:
GSGetLocalIPv4, GSGetRemoteIPv4, ILIPv4Address, ILIPv4SubnetMask, GSIPv4ToString

◆ GSStringToMAC()

cvbres_t GSStringToMAC ( const char *  MACString,
ILMAC &  MACAddress 
)

Converts the given MACString into an ILMAC representation.

Parameters
[in]MACStringC-string representation of a MAC address.
[out]MACAddress6 byte address representation of the MAC address.
Returns
Smaller than zero on error (Use GSGetLastErrorString function for a human readable error description).
Supported platforms:
Win32
Win64
Linux
Related Topics:
ILMACAddress, GSMACToString