bash completion: Remove --event for add-context

--event has been remove in 601d5acf42ebdb05ff8aa19f12fd9bdad3602781.

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
bash completion: Remove underscores in handler function names

If the command name contains a dash, it is removed to derive the
function name that will handle completion. For example, add-context
becomes _lttng_cmd_addcontext. The functions with erroneous names
were not getting called.

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Extras: Remove deprecated consumer commands in bash completion

enable/disable consumer were removed a while ago. Remove autocomplete
for them to discourage people of using them.

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
bash completion: Fix copy-paste typo

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
bash completion: add calls to _lttng_complete_sessions

Improve a little bit the dummy implementation of
_lttng_complete_sessions and add two calls where it can be useful.

Reported-by: Daniel U. Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Introduce LTTNG_NETWORK_SOCKET_TIMEOUT env. var

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Implement timeout for connect ipv4/ipv6

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
inet/inet6 sockets: apply timeout

Close #546

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: LTTNG_ERR_NEED_ROOT_SESSIOND error message

A root session daemon _and_ "tracing" group user membership are required
to trace the kernel.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Bump version to 2.4.0-pre1

We need to bump the version early in the development cycle since we
extend the relayd protocol.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Live timer set up

Add a new option to create to enable the live_timer.
This timer is responsible to check all streams of a live session and
make sure the viewer receives periodic updates even for low-throughput
channels.

This patch only enables the parameter from the UI to the consumer.
A couple of FIXMEs to check (changes to the ABI/API especially).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
basic handling of live_timer, for now just a printf

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Create relayd session from the sessiond

Move the relayd session creation from the consumer to the relayd. No
change in behaviour expected here, just prepare for the next patch to
allow the sessiond to pass additionnal parameters in the relayd session
creation required for live tracing (hostname, session name, flags, etc).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Create relayd session with live parameters

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Relay listen on 2 additionnal ports

Copy the structure of the threads management of the main relayd for the
live viewer.
So we have 3 new threads live_listener, live_dispatcher, live_worker. It
maybe is a lot of duplicated code, but it is too early in the dev to
identify precisely the code that could be merged.
For now we don't do anything useful on these ports, but that's the next
step.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Cleanup line-wrap, add lttng-viewer.h

Viewer command VIEWER_VERSION working (tested with separate test program
using only lttng-viewer.h as "internal" header).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Viewer list sessions

Add a session_list HT in the relayd and allow the viewer to list the
sessions.
Introduce a relay_local_data struct to have a simple way to share data
between threads.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Attach session + list streams

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>