automotive-dlt
dlt_daemon_connection_types.h
Go to the documentation of this file.
1 /*
2  * @licence app begin@
3  * SPDX license identifier: MPL-2.0
4  *
5  * Copyright (C) 2015 Advanced Driver Information Technology.
6  * This code is developed by Advanced Driver Information Technology.
7  * Copyright of Advanced Driver Information Technology, Bosch and DENSO.
8  *
9  * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
10  *
11  * This Source Code Form is subject to the terms of the
12  * Mozilla Public License (MPL), v. 2.0.
13  * If a copy of the MPL was not distributed with this file,
14  * You can obtain one at http://mozilla.org/MPL/2.0/.
15  *
16  * For further information see http://www.genivi.org/.
17  * @licence end@
18  */
19 
30 #ifndef DLT_DAEMON_CONNECTION_TYPES_H
31 #define DLT_DAEMON_CONNECTION_TYPES_H
32 #include "dlt_common.h"
33 
34 typedef enum {
35  UNDEFINED, /* Undefined status */
36  INACTIVE, /* Connection is inactive, excluded from epoll handling */
37  ACTIVE, /* Connection is actively handled by epoll */
38  DEACTIVATE,/* Request for deactivation of the connection */
39  ACTIVATE /* Request for activation of the connection */
41 
42 typedef enum {
56 
57 #define DLT_CON_MASK_CLIENT_CONNECT (1 << DLT_CONNECTION_CLIENT_CONNECT)
58 #define DLT_CON_MASK_CLIENT_MSG_TCP (1 << DLT_CONNECTION_CLIENT_MSG_TCP)
59 #define DLT_CON_MASK_CLIENT_MSG_SERIAL (1 << DLT_CONNECTION_CLIENT_MSG_SERIAL)
60 #define DLT_CON_MASK_APP_MSG (1 << DLT_CONNECTION_APP_MSG)
61 #define DLT_CON_MASK_ONE_S_TIMER (1 << DLT_CONNECTION_ONE_S_TIMER)
62 #define DLT_CON_MASK_SIXTY_S_TIMER (1 << DLT_CONNECTION_SIXTY_S_TIMER)
63 #define DLT_CON_MASK_SYSTEMD_TIMER (1 << DLT_CONNECTION_SYSTEMD_TIMER)
64 #define DLT_CON_MASK_CONTROL_CONNECT (1 << DLT_CONNECTION_CONTROL_CONNECT)
65 #define DLT_CON_MASK_CONTROL_MSG (1 << DLT_CONNECTION_CONTROL_MSG)
66 #define DLT_CON_MASK_GATEWAY (1 << DLT_CONNECTION_GATEWAY)
67 #define DLT_CON_MASK_GATEWAY_TIMER (1 << DLT_CONNECTION_GATEWAY_TIMER)
68 #define DLT_CON_MASK_ALL (0xffff)
69 
70 typedef uintptr_t DltConnectionId;
71 
72 /* TODO: squash the DltReceiver structure in there
73  * and remove any other duplicates of FDs
74  */
75 typedef struct DltConnection {
80  struct DltConnection *next;
81  int ev_mask;
83 
84 #endif /* DLT_DAEMON_CONNECTION_TYPES_H */
struct DltConnection * next
DltConnectionStatus status
uintptr_t DltConnectionId
struct DltConnection DltConnection
DltConnectionType type