Add listing session option
[lttng-tools.git] / liblttsessiondcomm / liblttsessiondcomm.h
index 0e2c4f07f8814b0c290e1366b8861b7a3fd4e71c..f4180cf0a4cd65413b46f6e6f575068cdf7cac02 100644 (file)
 /* Queue size of listen(2) */
 #define MAX_LISTEN 10
 
-/* Maximum amount of PID the list_apps command
- * can send back to the lttng client.
- */
-#define MAX_APPS_PID 20
-
 /* Get the error code index from 0 since
  * LTTCOMM_OK start at 1000
  */
@@ -78,6 +73,8 @@ enum lttcomm_return_code {
        LTTCOMM_SESSION_FAIL,   /* Create session fail */
        LTTCOMM_START_FAIL,             /* Start tracing fail */
        LTTCOMM_LIST_FAIL,              /* Listing apps fail */
+       LTTCOMM_NO_APPS,                /* No traceable application */
+       LTTCOMM_NO_SESS,                /* No sessions available */
        LTTCOMM_NR,                             /* Last element */
 };
 
@@ -126,12 +123,21 @@ 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 {
-                       size_t size;
-                       pid_t pids[MAX_APPS_PID];
+                       pid_t pid;
                } list_apps;
+               /* LTTNG_LIST_SESSIONS */
+               struct {
+                       char name[NAME_MAX];
+                       char uuid[37];  /* See libuuid not exported size UUID_STR_LEN */
+               } list_sessions;
        } u;
 };
 
This page took 0.023365 seconds and 4 git commands to generate.