1 /* Copyright (C) 2009 Pierre-Marc Fournier
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.
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.
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
27 #define USTCMD_ERR_CONN 1 /* Process connection error */
28 #define USTCMD_ERR_ARG 2 /* Invalid function argument */
29 #define USTCMD_ERR_GEN 3 /* General ustcmd error */
31 #define USTCMD_MS_CHR_OFF '0' /* Marker state 'on' character */
32 #define USTCMD_MS_CHR_ON '1' /* Marker state 'on' character */
33 #define USTCMD_MS_OFF 0 /* Marker state 'on' value */
34 #define USTCMD_MS_ON 1 /* Marker state 'on' value */
36 #define USTCMD_SOCK_PATH "/tmp/socks/"
38 /* Channel/marker/state/format string (cmsf) info. structure */
39 struct marker_status
{
40 char *channel
; /* Channel name (end of marker_status array if NULL) */
41 char *marker
; /* Marker name (end of marker_status array if NULL) */
42 int state
; /* State (0 := marker disabled, 1 := marker enabled) */
43 char *fs
; /* Format string (end of marker_status array if NULL) */
46 struct trace_event_status
{
50 extern pid_t
*ustcmd_get_online_pids(void);
51 extern int ustcmd_set_marker_state(const char *channel
, const char *marker
,
52 int state
, pid_t pid
);
53 extern int ustcmd_set_subbuf_size(const char *channel
, unsigned int subbuf_size
,
55 extern int ustcmd_set_subbuf_num(const char *channel
, unsigned int num
,
57 extern int ustcmd_get_subbuf_size(const char *channel
, pid_t pid
);
58 extern int ustcmd_get_subbuf_num(const char *channel
, pid_t pid
);
59 extern int ustcmd_destroy_trace(pid_t pid
);
60 extern int ustcmd_setup_and_start(pid_t pid
);
61 extern int ustcmd_stop_trace(pid_t pid
);
62 extern int ustcmd_create_trace(pid_t pid
);
63 extern int ustcmd_start_trace(pid_t pid
);
64 extern int ustcmd_alloc_trace(pid_t pid
);
65 extern int ustcmd_free_cmsf(struct marker_status
*);
66 extern unsigned int ustcmd_count_nl(const char *);
67 extern int ustcmd_get_cmsf(struct marker_status
**, pid_t
);
68 extern int ustcmd_free_tes(struct trace_event_status
*);
69 extern int ustcmd_get_tes(struct trace_event_status
**, pid_t
);
70 extern int ustcmd_set_sock_path(const char *sock_path
, pid_t pid
);
71 extern int ustcmd_get_sock_path(char **sock_path
, pid_t pid
);
72 extern int ustcmd_force_switch(pid_t pid
);
74 #endif /* _USTCMD_H */
This page took 0.031245 seconds and 4 git commands to generate.