DTNMA Reference Tools v2.0.0 - 9.gaff6489
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
This header is associated with proxied messaging from the provider side, where the peer identity is accessed and the rest of the message is treated as opaque data. More...
Functions | |
int | cace_amp_proxy_msg_send (int sock_fd, const cace_ari_t *dst, const uint8_t *data_ptr, size_t data_len) |
Send a message via datagram socket proxy to an ultimate destination. | |
int | cace_amp_proxy_msg_recv (int sock_fd, cace_ari_t *src, m_bstring_t data) |
Receive a message via datagram socket proxy from an ultimate source. | |
This header is associated with proxied messaging from the provider side, where the peer identity is accessed and the rest of the message is treated as opaque data.
int cace_amp_proxy_msg_recv | ( | int | sock_fd, |
cace_ari_t * | src, | ||
m_bstring_t | data | ||
) |
Receive a message via datagram socket proxy from an ultimate source.
sock_fd | The socket file descriptor. The socket must be ready for reading (e.g. determined via poll() and POLLIN event) before this call. | |
[out] | src | The ultimate source endpoint being received from. |
[out] | data | The data to populate, which must already be initialized. |
References cace_ari_cbor_decode(), cace_ari_text_encode(), cace_data_init_view(), CACE_LOG_ERR, CACE_LOG_INFO, CACE_LOG_WARNING, and CHKERR1.
int cace_amp_proxy_msg_send | ( | int | sock_fd, |
const cace_ari_t * | dst, | ||
const uint8_t * | data_ptr, | ||
size_t | data_len | ||
) |
Send a message via datagram socket proxy to an ultimate destination.
sock_fd | The socket file descriptor. The socket must be ready for writing (e.g. determined via poll() and POLLOUT event) before this call. | |
[in] | dst | The ultimate destination endpoint to send to. |
References cace_ari_cbor_encode(), cace_data_deinit(), cace_data_init(), CACE_LOG_ERR, CACE_LOG_INFO, CHKERR1, cace_data_t::len, and cace_data_t::ptr.