21 #include <sys/types.h>
55 const char *config_file;
59 uint64_t last_timestamp;
64 #define OP_PROC_FLAGS 1
66 #define OP_BLOCK_FLAGS 3
71 #define OP_LAST_TIMESTAMP 8
76 #define adtn_setcodopt(...) adtn_var_setcodopt((set_opt_args){__VA_ARGS__});
77 #define adtn_socket(...) adtn_var_socket((socket_params){__VA_ARGS__});
84 int adtn_var_socket(socket_params in);
90 int adtn_setcodopt(
int fd,
int option_name,
const char *code,
int from_file);
91 int adtn_setcodopt(
int fd,
int option_name,
const char *code,
int from_file,
int replace);
100 int adtn_var_setcodopt(set_opt_args in);
104 int adtn_getsockopt(
int fd,
const int optname,
void *optval,
int *optlen);
107 int adtn_recv(
int fd,
void *buffer,
size_t len);
int adtn_bind(int fd, sock_addr_t *addr)
Associates the information given to the socket.
int adtn_rmcodopt(int fd, const int option)
Removes an associated code from a socket.
int adtn_recv(int fd, void *buffer, size_t len)
Recive a message.
int adtn_close(int fd)
Closes an adtn_socket and frees the memory associated to the socket.
int adtn_getsockopt(int fd, const int optname, void *optval, int *optlen)
Get message options.
int adtn_port
Port to identify the own application.
int adtn_recvfrom(int fd, void *buffer, size_t len, sock_addr_t *addr)
Recive a message, filling sender information.
int adtn_setsockopt(int fd, const int optname, const void *optval)
Set message options.
int adtn_shutdown(int fd)
Same as adtn_close(1), deleting also waiting data.
int adtn_socket()
Creates a adtn sockets to send or recv information using the adtn platform with the default configura...
int adtn_setcodopt(int fd, int option_name, const char *code)
Associate codes to a socket.
int adtn_sendto(int fd, const void *buffer, size_t buffer_l, const sock_addr_t addr)
Sends a message over ADTN platform.
char * id
IP addres that is associated with the socket.