RTI Connext Modern C++ API
Version 5.3.1
|
Transport-independent addressing scheme using IPv6 presentation strings and numerically stored in network-ordered format. More...
Classes | |
struct | NDDS_Transport_Address_t |
Addresses are stored individually as network-ordered bytes. More... | |
Macros | |
#define | NDDS_TRANSPORT_ADDRESS_INVALID {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} |
An invalid transport address. Used as an initializer. | |
#define | NDDS_TRANSPORT_ADDRESS_STRING_BUFFER_SIZE (40) |
The minimum size of the buffer that should be passed to NDDS_Transport_Address_to_string. | |
Functions | |
RTI_INT32 | NDDS_Transport_Address_to_string (const NDDS_Transport_Address_t *self, char *buffer_inout, RTI_INT32 buffer_length_in) |
Converts a numerical address to a printable string representation. | |
RTIBool | NDDS_Transport_Address_to_string_with_protocol_family_format (const NDDS_Transport_Address_t *me, char *buffer, RTI_INT32 buffer_length_in, RTIOsapiSocketAFKind family) |
Converts a numerical address to a printable string representation with IPv4 dotted notation or IPv6 presentation string depending on the provided protocol family. | |
RTI_INT32 | NDDS_Transport_Address_from_string (NDDS_Transport_Address_t *address_out, const char *address_in) |
Converts an address (IPv4 dotted notation or IPv6 presentation string) into a numerical address. | |
void | NDDS_Transport_Address_print (const NDDS_Transport_Address_t *address_in, const char *desc_in, RTI_INT32 indent_in) |
Prints an address to standard out. | |
RTI_INT32 | NDDS_Transport_Address_is_ipv4 (const NDDS_Transport_Address_t *address_in) |
Checks if an address is an IPv4 address. | |
RTI_INT32 | NDDS_Transport_Address_is_multicast (const NDDS_Transport_Address_t *address_in) |
Checks if an address is an IPv4 or IPv6 multicast address. | |
Transport-independent addressing scheme using IPv6 presentation strings and numerically stored in network-ordered format.
The APIs of RTI Connext uses IPv6 address notation for all transports.
Transport-Plugin implementations that are not IP-based are required to map whatever addressing scheme natively used by the physical transport (if any) to an address in IPv6 notation and vice versa.
IPv6 addresses are numerically stored in 16 bytes. An IPv6 address can be presented In string notation in a variety of ways. For example,
are all valid IPv6 presentation of the same address.
IPv4 address in dot notation can be used to specify the last 4 bytes of the address. For example,
are all valid IPv6 presentation of the same address.
For a complete description of valid IPv6 address notation, consult the IPv6 Addressing Architecture (RFC 2373).
Addresses are divided into unicast addresses and multicast addresses.
Multicast addresses are defined as
FFxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
.or an IPv4 multicast address
[::224.0.0.0, ::239.255.255.255]Multicast addresses do not refer to any specific destination (network interface). Instead, they usually refer to a group of network interfaces, often called a "multicast group".
Unicast addresses always refer to a specific network interface.
#define NDDS_TRANSPORT_ADDRESS_INVALID {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} |
An invalid transport address. Used as an initializer.
For example: NDDS_Transport_Address_t address = NDDS_TRANSPORT_ADDRESS_INVALID
#define NDDS_TRANSPORT_ADDRESS_STRING_BUFFER_SIZE (40) |
The minimum size of the buffer that should be passed to NDDS_Transport_Address_to_string.
The string size includes space for 8 tuples of 4 characters each plus 7 delimiting colons plus a terminating NULL.
RTI_INT32 NDDS_Transport_Address_to_string | ( | const NDDS_Transport_Address_t * | self, |
char * | buffer_inout, | ||
RTI_INT32 | buffer_length_in | ||
) |
Converts a numerical address to a printable string representation.
buffer_inout
provided must be at least NDDS_TRANSPORT_ADDRESS_STRING_BUFFER_SIZE characters long.self | <<in>> The address to be converted. |
buffer_inout | <<inout>> Storage passed in which to return the string corresponding to the address. |
buffer_length_in | <<in>> The length of the storage buffer. Must be >= NDDS_TRANSPORT_ADDRESS_STRING_BUFFER_SIZE |
RTIBool NDDS_Transport_Address_to_string_with_protocol_family_format | ( | const NDDS_Transport_Address_t * | me, |
char * | buffer, | ||
RTI_INT32 | buffer_length_in, | ||
RTIOsapiSocketAFKind | family | ||
) |
Converts a numerical address to a printable string representation with IPv4 dotted notation or IPv6 presentation string depending on the provided protocol family.
buffer_inout
provided must be at least NDDS_TRANSPORT_ADDRESS_STRING_BUFFER_SIZE characters long.me | <<in>> The address to be converted. |
buffer | <<inout>> Storage passed in which to return the string corresponding to the address. |
buffer_length_in | <<in>> The length of the storage buffer. Must be >= NDDS_TRANSPORT_ADDRESS_STRING_BUFFER_SIZE |
family | <<in>> The protocol family RTI_OSAPI_SOCKET_AF_INET or RTI_OSAPI_SOCKET_AF_INET6 |
RTI_INT32 NDDS_Transport_Address_from_string | ( | NDDS_Transport_Address_t * | address_out, |
const char * | address_in | ||
) |
Converts an address (IPv4 dotted notation or IPv6 presentation string) into a numerical address.
The address string must be in IPv4 dotted notation (X.X.X.X) or IPv6 presentation notation. The string cannot be a hostname since this function does not perform a hostname lookup.
address_out | <<out>> Numerical value of the address. |
address_in | <<in>> String representation of an address. |
void NDDS_Transport_Address_print | ( | const NDDS_Transport_Address_t * | address_in, |
const char * | desc_in, | ||
RTI_INT32 | indent_in | ||
) |
RTI_INT32 NDDS_Transport_Address_is_ipv4 | ( | const NDDS_Transport_Address_t * | address_in | ) |
Checks if an address is an IPv4 address.
address_in | <<in>> Address to be tested. |
RTI_INT32 NDDS_Transport_Address_is_multicast | ( | const NDDS_Transport_Address_t * | address_in | ) |
Checks if an address is an IPv4 or IPv6 multicast address.
address_in | <<in>> Address to be tested. |
May be implemented as a macro for efficiency.