summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
{