X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=liblttsessiondcomm%2Fliblttsessiondcomm.h;h=84385ce71d077de12bdccfa95f4d787d931afb30;hb=53094c051fe98f0d7288e463b2304e0139324f8c;hp=b52d1dd5b5c19655e617967e773d49ef9d14a15f;hpb=fac6795d6e2c60e79bdc7dab42da94d2025a57d3;p=lttng-tools.git diff --git a/liblttsessiondcomm/liblttsessiondcomm.h b/liblttsessiondcomm/liblttsessiondcomm.h index b52d1dd5b..84385ce71 100644 --- a/liblttsessiondcomm/liblttsessiondcomm.h +++ b/liblttsessiondcomm/liblttsessiondcomm.h @@ -31,15 +31,10 @@ /* 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 */ -#define LTTCOMM_ERR_INDEX(code) code - LTTCOMM_OK +#define LTTCOMM_ERR_INDEX(code) (code - LTTCOMM_OK) enum lttcomm_command_type { LTTNG_CREATE_SESSION, @@ -78,6 +73,7 @@ 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_NR, /* Last element */ }; @@ -126,11 +122,15 @@ 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; } u; };