summaryrefslogtreecommitdiffstats
path: root/src/trans.h
diff options
context:
space:
mode:
authorJiri Olsa <Jiri Olsa jolsa@redhat.com>2010-03-25 08:42:19 +0100
committerJiri Olsa <Jiri Olsa jolsa@redhat.com>2010-03-25 08:42:19 +0100
commit24e91dc5627b181f90c800cf613614e5787e76da (patch)
tree630eb6e8b18492b5d3c3624ab94be3f3e21bc8c0 /src/trans.h
downloadtsnif-24e91dc5627b181f90c800cf613614e5787e76da.tar.gz
tsnif-24e91dc5627b181f90c800cf613614e5787e76da.tar.xz
tsnif-24e91dc5627b181f90c800cf613614e5787e76da.zip
initial commit
Diffstat (limited to 'src/trans.h')
-rw-r--r--src/trans.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/trans.h b/src/trans.h
new file mode 100644
index 0000000..38589d4
--- /dev/null
+++ b/src/trans.h
@@ -0,0 +1,41 @@
+
+#ifndef TRANS_H
+#define TRANS_H
+
+struct trans_handle;
+struct trans_msg;
+
+typedef int(*trans_cb_t)(struct trans_handle *h, struct trans_msg *msg);
+
+struct trans_msg {
+ int cmd;
+ int type;
+ int idx;
+ int err;
+
+ union {
+ /* data message */
+ struct {
+ void *ptr;
+ int len;
+ uint flags;
+ } data;
+ /* notify message */
+ int action;
+ /* error message */
+ int error;
+ /* group message */
+ int group;
+ };
+};
+
+int trans_init(struct trans_handle *h, trans_cb_t cb);
+int trans_close(struct trans_handle *h);
+int trans_process(struct trans_handle *h);
+int trans_send(struct trans_handle *h, struct trans_msg *msg);
+int trans_group(struct trans_handle *h, int group);
+int trans_fd(struct trans_handle *h);
+
+#include "trans-libnl.h"
+
+#endif /* !TRANS_H */