summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhunt <hunt>2005-06-23 08:17:26 +0000
committerhunt <hunt>2005-06-23 08:17:26 +0000
commit383ca010e82dc5f00afa79250b3e0f15ed04cfed (patch)
tree2b84e1280ccefa313d7cbf5a2c9c7be2d9727d4e
parentd65ab084c857ff87e5ed77742cd8e58b3bc03814 (diff)
downloadsystemtap-steved-383ca010e82dc5f00afa79250b3e0f15ed04cfed.tar.gz
systemtap-steved-383ca010e82dc5f00afa79250b3e0f15ed04cfed.tar.xz
systemtap-steved-383ca010e82dc5f00afa79250b3e0f15ed04cfed.zip
2005-06-23 Martin Hunt <hunt@redhat.com>
* transport.h: Move all the transport open stuff here and provide a convenient macro.
-rw-r--r--runtime/transport/ChangeLog3
-rw-r--r--runtime/transport/transport.h19
2 files changed, 22 insertions, 0 deletions
diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog
index f4dff716..783d9c6e 100644
--- a/runtime/transport/ChangeLog
+++ b/runtime/transport/ChangeLog
@@ -1,5 +1,8 @@
2005-06-23 Martin Hunt <hunt@redhat.com>
+ * transport.h: Move all the transport open stuff here
+ and provide a convenient macro.
+
* control.c: Replace macro DEFINE_SPINLOCK because
some kernels don't have it.
diff --git a/runtime/transport/transport.h b/runtime/transport/transport.h
index 9e98c894..1e272717 100644
--- a/runtime/transport/transport.h
+++ b/runtime/transport/transport.h
@@ -9,6 +9,9 @@
#include "netlink.h"
#include "relayfs.h"
+static unsigned n_subbufs = 4;
+static unsigned subbuf_size = 65536;
+
/* SystemTap transport values */
enum
{
@@ -16,6 +19,22 @@ enum
STP_TRANSPORT_RELAYFS
};
+#ifdef STP_NETLINK_ONLY
+static int transport_mode = STP_TRANSPORT_NETLINK;
+#else
+static int transport_mode = STP_TRANSPORT_RELAYFS;
+#endif
+
+static int pid;
+module_param(pid, int, 0);
+MODULE_PARM_DESC(pid, "daemon pid");
+
+#define TRANSPORT_OPEN \
+ if (_stp_transport_open(transport_mode, n_subbufs, subbuf_size, pid) < 0) {\
+ printk("init_module: Couldn't open transport\n"); \
+ return -1; \
+ }
+
/* transport data structure */
struct stp_transport
{