header missing
[lttv.git] / ltt / branches / poly / libltt / libltt.h
... / ...
CommitLineData
1/* libltt header file
2 *
3 * Copyright 2005-
4 * Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
5 *
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 *
18 * Inspired from iptables, by James Morris <jmorris@intercode.com.au>.
19 *
20 */
21
22#ifndef _LIBLTT_H
23#define _LIBLTT_H
24
25#include <linux/limits.h>
26#include <asm/types.h>
27#include <linux/netlink.h>
28
29#ifndef NETLINK_LTT
30#define NETLINK_LTT 12
31#endif
32
33
34enum trace_op {
35 OP_CREATE,
36 OP_DESTROY,
37 OP_START,
38 OP_STOP,
39 OP_NONE
40};
41
42enum trace_mode {
43 LTT_TRACE_NORMAL,
44 LTT_TRACE_FLIGHT
45};
46
47
48struct lttctl_handle
49{
50 int fd;
51 //u_int8_t blocking;
52 struct sockaddr_nl local;
53 struct sockaddr_nl peer;
54};
55
56typedef struct lttctl_peer_msg {
57 char trace_name[NAME_MAX];
58 enum trace_op op;
59 union {
60 enum trace_mode mode;
61 } args;
62} lttctl_peer_msg_t;
63
64typedef struct lttctl_resp_msg {
65 int err;
66} lttctl_resp_msg_t;
67
68struct lttctl_handle *lttctl_create_handle(void);
69
70int lttctl_destroy_handle(struct lttctl_handle *h);
71
72
73int lttctl_create_trace(const struct lttctl_handle * handle,
74 char *name, enum trace_mode mode);
75
76int lttctl_destroy_trace(const struct lttctl_handle *handle, char *name);
77
78int lttctl_start(const struct lttctl_handle *handle, char *name);
79
80int lttctl_stop(const struct lttctl_handle *handle, char *name);
81
82#define LTTCTLM_BASE 0x10
83#define LTTCTLM_CONTROL (LTTCTLM_BASE + 1) /* LTT control message */
84
85
86#endif //_LIBLTT_H
This page took 0.02525 seconds and 4 git commands to generate.