summaryrefslogtreecommitdiffstats
path: root/runtime/stpd/librelay.h
diff options
context:
space:
mode:
authorhunt <hunt>2005-08-01 21:40:52 +0000
committerhunt <hunt>2005-08-01 21:40:52 +0000
commit3ca3cf924886beab449d85e1232d0936b501c4f0 (patch)
treebaeb55982c4cbd6643f18e5180319584dd50c243 /runtime/stpd/librelay.h
parent3b971328035c179c41e6175a4feb3a5683588adf (diff)
downloadsystemtap-steved-3ca3cf924886beab449d85e1232d0936b501c4f0.tar.gz
systemtap-steved-3ca3cf924886beab449d85e1232d0936b501c4f0.tar.xz
systemtap-steved-3ca3cf924886beab449d85e1232d0936b501c4f0.zip
2005-08-01 Martin Hunt <hunt@redhat.com>
* librelay.h: Get structs and enums from ../transport/transport_msgs.h to eliminate duplication. * librelay.c (send_request): Retry if send fails. (open_relayfs_files): Use fopen() instead of open() for the percpu tmpfiles. (request_last_buffers): Just send cpu number for STP_BUF_INFO request. (reader_thread): Ditto. (process_subbufs): Use fwrite_unlocked() instead of write(). (sigchld): Removed. (init_stp): Go back to using system() instead of fork and exec to load module. When done, send a TRANSPORT_INFO request. (cleanup_and_exit): Change parameter to simple flag to indicate if the module needs removing. (sigproc): Remove complicated logic and just send STP_EXIT. (stp_main_loop): When receiving STP_TRANSPORT_INFO, set the local params and reply with a STP_START. When receiving STP_START, there was an error, so cleanup and exit. * stpd.c (main): Added new options to set number of buffers and their size.
Diffstat (limited to 'runtime/stpd/librelay.h')
-rw-r--r--runtime/stpd/librelay.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/runtime/stpd/librelay.h b/runtime/stpd/librelay.h
index 59273d8e..371ddfbd 100644
--- a/runtime/stpd/librelay.h
+++ b/runtime/stpd/librelay.h
@@ -1,25 +1,8 @@
-/* SystemTap control channel command values */
-enum
-{
- STP_BUF_INFO = 1,
- STP_SUBBUFS_CONSUMED,
- STP_REALTIME_DATA,
- STP_TRANSPORT_MODE,
- STP_EXIT,
-};
-
-/* SystemTap transport options */
-enum
-{
- STP_TRANSPORT_NETLINK = 1,
- STP_TRANSPORT_RELAYFS
-};
+#include "../transport/transport_msgs.h"
/*
* stp external API functions
*/
-extern int init_stp(const char *modname,
- const char *relay_filebase,
- int print_summary);
+extern int init_stp(const char *relay_filebase, int print_summary);
extern int stp_main_loop(void);
extern int send_request(int type, void *data, int len);