36 #include <sys/socket.h> 37 #include <sys/syslog.h> 38 #include <sys/types.h> 81 if(write(conn->
receiver->
fd, msg, msg_size) > 0)
110 int sendserialheader)
119 if (sendserialheader)
153 while (current && !((1 << current->
type) & type_mask))
155 current = current->
next;
224 #ifdef DLT_SYSTEMD_WATCHDOG_ENABLE 287 #ifdef DLT_SYSTEMD_WATCHDOG_ENABLE 373 dlt_log(LOG_CRIT,
"Allocation of client handle failed\n");
384 "Unable to get receiver from %d connection.\n",
DltConnection * dlt_event_handler_find_connection(DltEventHandler *ev, int fd)
Find connection with a specific fd in the connection list.
struct DltConnection * next
STATIC int dlt_connection_send(DltConnection *conn, void *msg, size_t msg_size)
Generic sending function.
int dlt_gateway_process_gateway_timer(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
DltConnectionStatus status
int dlt_daemon_process_control_connect(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
int dlt_daemon_process_one_s_timer(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *recv, int verbose)
int dlt_daemon_process_sixty_s_timer(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *recv, int verbose)
#define DLT_DAEMON_RCVBUFSIZESERIAL
#define DLT_DAEMON_ERROR_OK
DltReturnValue dlt_log(int prio, char *s)
#define DLT_DAEMON_ERROR_UNKNOWN
int dlt_daemon_process_client_messages(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
static DltConnectionId connectionId
uintptr_t DltConnectionId
int dlt_gateway_process_passive_node_messages(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
DltReturnValue dlt_receiver_init(DltReceiver *receiver, int fd, int buffersize)
void * dlt_connection_get_callback(DltConnection *con)
Get the callback from a specific connection.
int dlt_daemon_process_systemd_timer(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *recv, int verbose)
STATIC DltReceiver * dlt_connection_get_receiver(DltDaemonLocal *daemon_local, DltConnectionType type, int fd)
Get the receiver structure associated to a connection.
void dlt_connection_destroy(DltConnection *to_destroy)
Destroys a connection.
int dlt_daemon_process_user_messages(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
const char dltSerialHeader[DLT_ID_SIZE]
DltReceiver * dlt_gateway_get_connection_receiver(DltGateway *gateway, int fd)
int dlt_daemon_process_client_messages_serial(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
int dlt_event_handler_register_connection(DltEventHandler *evhdl, DltDaemonLocal *daemon_local, DltConnection *connection, int mask)
Registers a connection for event handling and takes its ownership.
DltConnection * dlt_connection_get_next(DltConnection *current, int type_mask)
Get the next connection filtered with a type mask.
#define DLT_DAEMON_RCVBUFSIZESOCK
int dlt_daemon_socket_sendreliable(int sock, void *buffer, int message_size)
dlt_daemon_socket_sendreliable - sends data to socket with additional checks and resending functional...
int dlt_daemon_process_control_messages(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
int dlt_connection_send_multiple(DltConnection *con, void *data1, int size1, void *data2, int size2, int sendserialheader)
Send up to two messages through a connection.
STATIC void dlt_connection_destroy_receiver(DltConnection *con)
#define DLT_DAEMON_RCVBUFSIZE
int dlt_daemon_process_client_connect(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *receiver, int verbose)
#define DLT_DAEMON_TEXTBUFSIZE
int dlt_connection_create(DltDaemonLocal *daemon_local, DltEventHandler *evh, int fd, int mask, DltConnectionType type)
Creates a connection and registers it to the DltEventHandler.
DltReturnValue dlt_receiver_free(DltReceiver *receiver)