X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flibltt%2Flibltt.h;h=bb10f459a2487aa91146e307b8cb1ed5cc7a9ce5;hb=994ef399c15db3177006a14a087823ef5fd7d537;hp=b9224bb5a5acc2b58ab7e3aea99db208611f934a;hpb=31d2c6b01b9fd98371607ea4d120db873190779c;p=lttv.git diff --git a/ltt/branches/poly/libltt/libltt.h b/ltt/branches/poly/libltt/libltt.h index b9224bb5..bb10f459 100644 --- a/ltt/branches/poly/libltt/libltt.h +++ b/ltt/branches/poly/libltt/libltt.h @@ -23,24 +23,32 @@ #define _LIBLTT_H #include +#include +#include + +#ifndef NETLINK_LTT +#define NETLINK_LTT 12 +#endif + enum trace_op { OP_CREATE, OP_DESTROY, OP_START, - OP_STOP + OP_STOP, + OP_NONE }; enum trace_mode { - TRACE_NORMAL, - TRACE_FLIGHT + LTT_TRACE_NORMAL, + LTT_TRACE_FLIGHT }; struct lttctl_handle { int fd; - u_int8_t blocking; + //u_int8_t blocking; struct sockaddr_nl local; struct sockaddr_nl peer; }; @@ -53,19 +61,23 @@ typedef struct lttctl_peer_msg { } args; } lttctl_peer_msg_t; +typedef struct lttctl_resp_msg { + int err; +} lttctl_resp_msg_t; -struct lttctl_handle *lttctl_create_handle(u_int32_t flags); +struct lttctl_handle *lttctl_create_handle(void); int lttctl_destroy_handle(struct lttctl_handle *h); -int lttctl_create_trace(char *name, enum trace_mode mode); +int lttctl_create_trace(const struct lttctl_handle * handle, + char *name, enum trace_mode mode); -int lttctl_destroy_trace(char *name); +int lttctl_destroy_trace(const struct lttctl_handle *handle, char *name); -int lttctl_start(char *name); +int lttctl_start(const struct lttctl_handle *handle, char *name); -int lttctl_stop(char *name); +int lttctl_stop(const struct lttctl_handle *handle, char *name); #define LTTCTLM_BASE 0x10 #define LTTCTLM_CONTROL (LTTCTLM_BASE + 1) /* LTT control message */