# IP32 Data Type

Topics

:

Overview
Constants
Functions

Overview

The gxIP32 class is used by database applications to represent 32-bit Internet protocol addresses independently of the operating system or hardware platform used.

Constants

    const int ip32MaxStrLen = 255; // Maximum IP32 string length

Functions

gxIP32::gxIP32()
gxIP32::GetByte1()
gxIP32::GetByte2()
gxIP32::GetByte3()
gxIP32::GetByte4()
gxIP32::SetByte1()
gxIP32::SetByte2()
gxIP32::SetByte3()
gxIP32::SetByte4()
gxIP32::SetIPAddress()
gxIP32::SizeOf()
gxIP32::c_str()

gxIP32::gxIP32(unsigned char b1 = 0, unsigned char b2 = 0, unsigned char b3 = 0, unsigned char b4 = 0)

- Default class constructor.

gxIP32::gxIP32(char *ip)

- Class constructor used to construct an object and assign its IP address based on the null terminated "ip" string.

gxIP32::gxIP32(const char *ip)

- Class constructor used to construct an object and assign its IP address based on the null terminated "ip" string.

gxIP32::gxIP32(const gxIP32& ob)

- Class copy constructor.

gxIP32& gxIP32::operator=(const gxIP32& ob)

- Assignment operator.

unsigned char gxIP32::GetByte1()

- Public member function that returns IP address byte 1.

unsigned char gxIP32::GetByte2()

- Public member function that returns IP address byte 2.

unsigned char gxIP32::GetByte3()

- Public member function that returns IP address byte 3.

unsigned char gxIP32::GetByte4()

- Public member function that returns IP address byte 4.

void gxIP32::SetByte1(unsigned char b = 0)

- Public member function used to set IP address byte 1.

void gxIP32::SetByte2(unsigned char b = 0)

- Public member function used to set IP address byte 1.

void gxIP32::SetByte3(unsigned char b = 0)

- Public member function used to set IP address byte 1.

void gxIP32::SetByte4(unsigned char b = 0)

- Public member function used to set IP address byte 1.

int gxIP32::SetIPAddress(char *ip)

- Public member function used to set the IP address using a null terminated character string. Return false if the string is not formatted correctly using the 32-bit dotted notation: 127.0.0.1

int gxIP32::SetIPAddress(const char *ip)

- Public member function used to set the IP address using a null terminated character string. Return false if the string is not formatted correctly using the 32-bit dotted notation: 127.0.0.1

void gxIP32::SetIPAddress(unsigned char b1 = 0, unsigned char b2 = 0, unsigned char b3 = 0, unsigned char b4 = 0)

- Public member function used to set the IP address using individual byte values.

unsigned gxIP32::SizeOf()

- Public member function that returns the size of a gxIP32 object.

char *gxIP32::c_str(char *sbuf)

- Public member function that passes back a null terminated IP32 string in the "sbuf" variable and redundantly return the string. NOTE: The calling function must allocate a memory buffer large enough to hold a single IP32 string in dotted notation: 127.0.0.1

End Of Document