|
DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
#include "proxy_msg.h"#include "cace/ari/cbor.h"#include "cace/ari/text.h"#include "cace/util/logging.h"#include "cace/util/defs.h"#include <qcbor/qcbor.h>#include <sys/socket.h>#include <errno.h>
Include dependency graph for proxy_msg.c: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. | |
| 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_ENC_OPTS_DEFAULT, cace_ari_text_encode(), cace_data_deinit(), cace_data_init_view(), CACE_LOG_ERR, CACE_LOG_INFO, cace_log_is_enabled_for(), CACE_LOG_WARNING, CHKERR1, and result.
Referenced by sock_worker().
| 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, cace_data_t::ptr, and result.
Referenced by sock_worker().