arm4::ArmSystemAddress Class Reference
Encapsulates the network addressing information for a system. More...
Public Member Functions | |
ArmSystemAddress () | |
A null system address. | |
ArmSystemAddress (const std::string &hostname, const ArmID &id=ArmID::Null) | |
Constructs a system address from a hostname. | |
const std::vector< uint8_t > & | getAddress () const |
int16_t | getFormat () const |
const ArmID & | getID () const |
Static Public Attributes | |
static const int16_t | FORMAT_HOSTNAME = ARM_SYSADDR_FORMAT_HOSTNAME |
a hostname (characters, not null-terminated). | |
static const int16_t | FORMAT_IPV4 = ARM_SYSADDR_FORMAT_IPV4 |
an IPv4 address. | |
static const int16_t | FORMAT_IPV4PORT = ARM_SYSADDR_FORMAT_IPV4PORT |
an IPv4 address and port number. | |
static const int16_t | FORMAT_IPV6 = ARM_SYSADDR_FORMAT_IPV6 |
an IPv6 address. | |
static const int16_t | FORMAT_IPV6PORT = ARM_SYSADDR_FORMAT_IPV6PORT |
an IPv6 address and port number. | |
static const int16_t | FORMAT_SNA = ARM_SYSADDR_FORMAT_SNA |
an SNA address. | |
static const int16_t | FORMAT_X25 = ARM_SYSADDR_FORMAT_X25 |
an X.25 address. | |
static const int16_t | FORMAT_UUID = ARM_SYSADDR_FORMAT_UUID |
a Universally-unique ID. | |
static const ArmSystemAddress | Null |
A null system address. |
Detailed Description
Encapsulates the network addressing information for a system.
It may be used with ArmTranReport if the reported transaction executed on a different system.
- Address. The system address is the network name or address of the system, as it would be sent in a data frame across a network in network byte order.
-
Format. The format of the system address, such as an SNA address or a hostname. See the description of format constants defined in this interface for available formats and the mapping of the address bytes supplied.
- Note:
- Note that all positive integer values not defined as constant are reserved for future definitions. Currently, this pplies to values 9:32767. All negative values are available for implementation-defined use.
-
ID. An optional 16-byte ID associated with the format and address, if any. The ID value is bound to a unique combination of the format and address. When provided, the ID may be used as a concise alias for the unique combination. It may be
ArmID::Null
.
The fields are set using the constructor ArmSystemAddress()
. There are no setter methods for the individual fields. The object is immutable.
Constructor & Destructor Documentation
arm4::ArmSystemAddress::ArmSystemAddress | ( | const std::string & | hostname, | |
const ArmID & | id = ArmID::Null | |||
) |
Constructs a system address from a hostname.
- Parameters:
-
hostname Name of the host in UTF-8 format. id Optional ID.
Member Function Documentation
const std::vector<uint8_t>& arm4::ArmSystemAddress::getAddress | ( | ) | const |
- Returns:
- a byte array containing the address. The returned value is the same value passed to the
ArmSystemAddress()
constructor.
int16_t arm4::ArmSystemAddress::getFormat | ( | ) | const |
- Returns:
- a short containing the format. The returned value is the same value passed to the
ArmSystemAddress()
constructor.
const ArmID& arm4::ArmSystemAddress::getID | ( | ) | const |
- Returns:
- the optional 16-byte ID associated with the format and address, if any. The returned value, which could be ArmID::Null, is the same value passed to the
ArmSystemAddress()
constructor.
Member Data Documentation
const int16_t arm4::ArmSystemAddress::FORMAT_HOSTNAME = ARM_SYSADDR_FORMAT_HOSTNAME [static] |
a hostname (characters, not null-terminated).
- Bytes 0:?? = hostname
const int16_t arm4::ArmSystemAddress::FORMAT_IPV4 = ARM_SYSADDR_FORMAT_IPV4 [static] |
an IPv4 address.
- Bytes 0:3 = 4-byte IP address.
const int16_t arm4::ArmSystemAddress::FORMAT_IPV4PORT = ARM_SYSADDR_FORMAT_IPV4PORT [static] |
an IPv4 address and port number.
- Bytes 0:3 = 4-byte IP address
- Bytes 4:5 = 2-byte IP port number
const int16_t arm4::ArmSystemAddress::FORMAT_IPV6 = ARM_SYSADDR_FORMAT_IPV6 [static] |
an IPv6 address.
- Bytes 0:15 = 16-byte IP address
const int16_t arm4::ArmSystemAddress::FORMAT_IPV6PORT = ARM_SYSADDR_FORMAT_IPV6PORT [static] |
an IPv6 address and port number.
- Bytes 0:15 = 16-byte IP address
- Bytes 16:17 = 2-byte IP port number
const int16_t arm4::ArmSystemAddress::FORMAT_SNA = ARM_SYSADDR_FORMAT_SNA [static] |
an SNA address.
- Bytes 0:7 = EBCDIC-encoded network ID
- Bytes 8:15 = EBCDIC-encoded network accessible unit (control point or LU)
const int16_t arm4::ArmSystemAddress::FORMAT_UUID = ARM_SYSADDR_FORMAT_UUID [static] |
a Universally-unique ID.
- Bytes 0:15 = UUID in binary.
This is useful for applications that define their system by a UUID rather than a network address or hostname or some other address form.
const int16_t arm4::ArmSystemAddress::FORMAT_X25 = ARM_SYSADDR_FORMAT_X25 [static] |
an X.25 address.
- Bytes 0:15 = The X.25 address (also referred to as an X.121 address). This is up to 16 ASCII character digits ranging from 0-9.
The documentation for this class was generated from the following file:
- Arm4/ArmSystemAddress