+ case LTTNG_LIST_SESSIONS:
+ {
+ struct ltt_session *iter = NULL;
+
+ llm.num_pckt = session_count;
+ if (llm.num_pckt == 0) {
+ ret = LTTCOMM_NO_SESS;
+ goto error;
+ }
+
+ cds_list_for_each_entry(iter, <t_session_list.head, list) {
+ uuid_unparse(iter->uuid, llm.u.list_sessions.uuid);
+ strncpy(llm.u.list_sessions.name, iter->name,
+ sizeof(llm.u.list_sessions.name));
+ ret = send_unix_sock(sock, (void*) &llm, sizeof(llm));
+ if (ret < 0) {
+ goto send_error;
+ }
+ llm.num_pckt--;
+ }
+
+ break;
+ }