summaryrefslogtreecommitdiffstats
path: root/runtime/transport/control.h
diff options
context:
space:
mode:
authortrz <trz>2005-05-06 19:16:07 +0000
committertrz <trz>2005-05-06 19:16:07 +0000
commit7aa969cf00075426d30cbce164ccaeb8a1b0a2aa (patch)
treea29210299eb6e372efe96e8b0e3813c5a17dc4cf /runtime/transport/control.h
parent829198553c89ca7f2da93559c61c04ee89079ea1 (diff)
downloadsystemtap-steved-7aa969cf00075426d30cbce164ccaeb8a1b0a2aa.tar.gz
systemtap-steved-7aa969cf00075426d30cbce164ccaeb8a1b0a2aa.tar.xz
systemtap-steved-7aa969cf00075426d30cbce164ccaeb8a1b0a2aa.zip
initial revision
Diffstat (limited to 'runtime/transport/control.h')
-rw-r--r--runtime/transport/control.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/runtime/transport/control.h b/runtime/transport/control.h
new file mode 100644
index 00000000..a614ecb7
--- /dev/null
+++ b/runtime/transport/control.h
@@ -0,0 +1,32 @@
+#ifndef _TRANSPORT_CONTROL_H_ /* -*- linux-c -*- */
+#define _TRANSPORT_CONTROL_H_
+
+/** @file control.h
+ * @brief Header file for transport control channel
+ */
+
+/* command handlers hash table entry struct */
+struct cmd_handler
+{
+ struct hlist_node hlist;
+ int pid;
+ int (*handler) (int pid, int cmd, void *data);
+};
+
+#define HANDLER_SHIFT 5
+#define HANDLER_SLOTS (1 << HANDLER_SHIFT)
+
+/* stp control channel command values */
+enum
+{
+ STP_BUF_INFO = 1,
+ STP_SUBBUFS_CONSUMED,
+ STP_REALTIME_DATA,
+ STP_EXIT,
+};
+
+extern int _stp_ctrl_register(int pid, int (*cmd_handler) (int pid, int cmd, void *data));
+extern void _stp_ctrl_unregister(int pid);
+extern int _stp_ctrl_send(int type, void *reply, int len, int pid);
+
+#endif /* _TRANSPORT_CONTROL_H_ */