Add support for auto session creation
[lttng-tools.git] / liblttsessiondcomm / liblttsessiondcomm.h
index 84385ce71d077de12bdccfa95f4d787d931afb30..0993b76c819db939cc8f306acb2e38ad589a3bc7 100644 (file)
@@ -45,6 +45,7 @@ enum lttcomm_command_type {
        LTTNG_GET_SUBBUF_NUM_SIZE,
        LTTNG_LIST_MARKERS,
        LTTNG_LIST_SESSIONS,
+       LTTNG_LIST_TRACES,
        LTTNG_LIST_TRACE_EVENTS,
        LTTNG_SETUP_TRACE,
        LTTNG_SET_SOCK_PATH,
@@ -72,8 +73,15 @@ enum lttcomm_return_code {
        LTTCOMM_CREATE_FAIL,    /* Create trace fail */
        LTTCOMM_SESSION_FAIL,   /* Create session fail */
        LTTCOMM_START_FAIL,             /* Start tracing fail */
+       LTTCOMM_STOP_FAIL,              /* Stop tracing fail */
        LTTCOMM_LIST_FAIL,              /* Listing apps fail */
        LTTCOMM_NO_APPS,                /* No traceable application */
+       LTTCOMM_NO_SESS,                /* No sessions available */
+       LTTCOMM_NO_TRACE,               /* No trace exist */
+       LTTCOMM_FATAL,                  /* Session daemon had a fatal error */
+       LTTCOMM_NO_TRACEABLE,   /* Error for non traceable app */
+       LTTCOMM_SELECT_SESS,    /* Must select a session */
+       LTTCOMM_EXIST_SESS,             /* Session name already exist */
        LTTCOMM_NR,                             /* Last element */
 };
 
@@ -114,7 +122,11 @@ struct lttcomm_session_msg {
 };
 
 /*
- * Data structure for the lttng client response
+ * Data structure for the lttng client response.
+ *
+ * This data structure is the control struct use in
+ * the header of the transmission. NEVER put variable
+ * size data in here.
  */
 struct lttcomm_lttng_msg {
        enum lttcomm_command_type cmd_type;
@@ -122,23 +134,14 @@ struct lttcomm_lttng_msg {
        uuid_t session_id;
        pid_t pid;
        char trace_name[NAME_MAX];
-       /* This flag indicates how many packet are in
-        * the transmission. Ex: If list apps is requested,
-        * and there is 4 pids registered, num_pckt will be 4
-        */
-       unsigned int num_pckt;
-       union {
-               /* UST_LIST_APPS */
-               struct {
-                       pid_t pid;
-               } list_apps;
-       } u;
+       unsigned int size_payload;
 };
 
 extern int lttcomm_create_unix_sock(const char *pathname);
 extern int lttcomm_connect_unix_sock(const char *pathname);
 extern int lttcomm_accept_unix_sock(int sock);
 extern int lttcomm_listen_unix_sock(int sock);
+extern int lttcomm_close_unix_sock(int sock);
 extern ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len);
 extern ssize_t lttcomm_send_unix_sock(int sock, void *buf, size_t len);
 extern const char *lttcomm_get_readable_code(enum lttcomm_return_code code);
This page took 0.024116 seconds and 4 git commands to generate.