X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttsessiondcomm%2Fliblttsessiondcomm.h;h=f4180cf0a4cd65413b46f6e6f575068cdf7cac02;hp=0e2c4f07f8814b0c290e1366b8861b7a3fd4e71c;hb=5716705821202372fd16168f66f347ba293ef6b4;hpb=686204ab689fc20afc4aaf014f1f4a877b1e581d diff --git a/liblttsessiondcomm/liblttsessiondcomm.h b/liblttsessiondcomm/liblttsessiondcomm.h index 0e2c4f07f..f4180cf0a 100644 --- a/liblttsessiondcomm/liblttsessiondcomm.h +++ b/liblttsessiondcomm/liblttsessiondcomm.h @@ -31,11 +31,6 @@ /* 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; };