| 1 | /* |
| 2 | * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; only version 2 |
| 7 | * of the License. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ |
| 18 | |
| 19 | #ifndef _LTT_UST_CTL_H |
| 20 | #define _LTT_UST_CTL_H |
| 21 | |
| 22 | #include <lttng/lttng.h> |
| 23 | |
| 24 | #include "trace-ust.h" |
| 25 | |
| 26 | #ifdef CONFIG_LTTNG_TOOLS_HAVE_UST |
| 27 | |
| 28 | int ustctl_register_done(int sock); |
| 29 | int ustctl_create_channel(int sock, struct ltt_ust_session *session, |
| 30 | struct lttng_channel *channel); |
| 31 | int ustctl_create_session(int sock, struct ltt_ust_session *session); |
| 32 | int ustctl_destroy_session(int sock, struct ltt_ust_session *session); |
| 33 | int ustctl_disable_channel(int sock, struct ltt_ust_session *session, |
| 34 | struct ltt_ust_channel *chan); |
| 35 | int ustctl_enable_channel(int sock, struct ltt_ust_session *session, |
| 36 | struct ltt_ust_channel *chan); |
| 37 | |
| 38 | #else |
| 39 | |
| 40 | static inline |
| 41 | int ustctl_register_done(int sock) |
| 42 | { |
| 43 | return -ENOSYS; |
| 44 | } |
| 45 | static inline |
| 46 | int ustctl_create_channel(int sock, struct ltt_ust_session *session, |
| 47 | struct lttng_channel *channel) |
| 48 | { |
| 49 | return -ENOSYS; |
| 50 | } |
| 51 | static inline |
| 52 | int ustctl_create_session(int sock, struct ltt_ust_session *session) |
| 53 | { |
| 54 | return -ENOSYS; |
| 55 | } |
| 56 | static inline |
| 57 | int ustctl_destroy_session(int sock, struct ltt_ust_session *session) |
| 58 | { |
| 59 | return -ENOSYS; |
| 60 | } |
| 61 | static inline |
| 62 | int ustctl_disable_channel(int sock, struct ltt_ust_session *session, |
| 63 | struct ltt_ust_channel *chan) |
| 64 | { |
| 65 | return -ENOSYS; |
| 66 | } |
| 67 | static inline |
| 68 | int ustctl_enable_channel(int sock, struct ltt_ust_session *session, |
| 69 | struct ltt_ust_channel *chan) |
| 70 | { |
| 71 | return -ENOSYS; |
| 72 | } |
| 73 | |
| 74 | #endif |
| 75 | |
| 76 | #endif /* _LTT_UST_CTL_H */ |