Initial addition of lttng ring buffer clients
[lttng-ust.git] / deprecated / ustctl.h
CommitLineData
2298f329
NC
1/* Copyright (C) 2009 Pierre-Marc Fournier
2 *
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17
18#ifndef _USTCTL_H
19#define _USTCTL_H
20
21#include <stdio.h>
22#include <unistd.h>
23#include <getopt.h>
24#include <stdlib.h>
25#include <fcntl.h>
26
27#define USTCTL_ERR_CONN 1 /* Process connection error */
28#define USTCTL_ERR_ARG 2 /* Invalid function argument */
29#define USTCTL_ERR_GEN 3 /* General ustctl error */
30
31#define USTCTL_MS_CHR_OFF '0' /* Marker state 'on' character */
32#define USTCTL_MS_CHR_ON '1' /* Marker state 'on' character */
33#define USTCTL_MS_OFF 0 /* Marker state 'on' value */
34#define USTCTL_MS_ON 1 /* Marker state 'on' value */
35
36#define USTCTL_SOCK_PATH "/tmp/socks/"
37
38/* Channel/marker/state/format string (cmsf) info. structure */
b521931e
MD
39struct ust_marker_status {
40 char *channel; /* Channel name (end of ust_marker_status array if NULL) */
41 char *ust_marker; /* Marker name (end of ust_marker_status array if NULL) */
2298f329 42 int state; /* State (0 := marker disabled, 1 := marker enabled) */
b521931e 43 char *fs; /* Format string (end of ust_marker_status array if NULL) */
2298f329
NC
44};
45
46struct trace_event_status {
47 char *name;
48};
49
50extern pid_t *ustctl_get_online_pids(void);
8b26d56b
NC
51
52extern int ustctl_connect_pid(pid_t pid);
53
b521931e
MD
54extern int ustctl_set_ust_marker_state(int sock, const char *trace,
55 const char *channel, const char *ust_marker,
8b26d56b
NC
56 int state);
57
58extern int ustctl_set_subbuf_size(int sock, const char *trace,
59 const char *channel,
60 unsigned int subbuf_size);
61
62extern int ustctl_set_subbuf_num(int sock, const char *trace,
63 const char *channel,
64 unsigned int num);
65
66extern int ustctl_get_subbuf_size(int sock, const char *trace,
67 const char *channel);
68
69extern int ustctl_get_subbuf_num(pid_t pid, const char *trace,
70 const char *channel);
71
72extern int ustctl_destroy_trace(int sock, const char *trace);
73
74extern int ustctl_setup_and_start(int sock, const char *trace);
75
76extern int ustctl_stop_trace(int sock, const char *trace);
77
78extern int ustctl_create_trace(int sock, const char *trace);
79
80extern int ustctl_start_trace(int sock, const char *trace);
81
82extern int ustctl_alloc_trace(int sock, const char *trace);
83
b521931e 84extern int ustctl_free_cmsf(struct ust_marker_status *);
2298f329 85extern int ustctl_free_tes(struct trace_event_status *);
8b26d56b
NC
86extern unsigned int ustctl_count_nl(const char *);
87
b521931e 88extern int ustctl_get_cmsf(int sock, struct ust_marker_status **);
8b26d56b
NC
89
90extern int ustctl_get_tes(int sock, struct trace_event_status **);
91
92extern int ustctl_set_sock_path(int sock, const char *sock_path);
93
94extern int ustctl_get_sock_path(int sock, char **sock_path);
95
96extern int ustctl_force_switch(int sock, const char *trace);
2298f329
NC
97
98#endif /* _USTCTL_H */
This page took 0.02804 seconds and 4 git commands to generate.