+/*
+ * Start tracing for all trace of the session.
+ */
+int lttng_start_tracing(const char *session_name)
+{
+ copy_string(lsm.session.name, session_name, NAME_MAX);
+ return ask_sessiond(LTTNG_START_TRACE, NULL);
+}
+
+/*
+ * Stop tracing for all trace of the session.
+ */
+int lttng_stop_tracing(const char *session_name)
+{
+ copy_string(lsm.session.name, session_name, NAME_MAX);
+ return ask_sessiond(LTTNG_STOP_TRACE, NULL);
+}
+
+/*
+ * lttng_add_context
+ */
+int lttng_add_context(struct lttng_domain *domain,
+ struct lttng_event_context *ctx, const char *event_name,
+ const char *channel_name)
+{
+ copy_string(lsm.u.context.channel_name, channel_name, NAME_MAX);
+ copy_string(lsm.u.context.event_name, event_name, NAME_MAX);
+ copy_lttng_domain(domain);
+
+ if (ctx) {
+ memcpy(&lsm.u.context.ctx, ctx, sizeof(struct lttng_event_context));