summaryrefslogtreecommitdiff
path: root/src/pal/src/include/pal/dtraceprotocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/include/pal/dtraceprotocol.h')
-rw-r--r--src/pal/src/include/pal/dtraceprotocol.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/pal/src/include/pal/dtraceprotocol.h b/src/pal/src/include/pal/dtraceprotocol.h
new file mode 100644
index 0000000000..d1a17a71ae
--- /dev/null
+++ b/src/pal/src/include/pal/dtraceprotocol.h
@@ -0,0 +1,39 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+//
+// File: rotor/pal/corunix/include/pal/dtrace_protocal.h
+//
+
+//
+// Header file for the protocals between CLR and Dtrace server
+//
+// ======================================================================================
+
+#ifndef DTRACE_PROTOCOL_H
+#define DTRACE_PROTOCOL_H
+
+// Start DTrace Consumer by Unix Domain App
+#define kServerSocketPath "/Library/Application Support/com.microsoft.clr.CFDtraceServer/Socket"
+#define kPacketTypeStartDtrace 1
+#define kPacketTypeReply 3
+#define kMaxMessageSize 318
+#define kPacketMaximumSize 102400
+
+struct PacketHeader {
+ int fType; // for request from client to server, it should be kPacketTypeStartDtrace
+ // for reply from server to client, it should be kPacketTypeReply
+ unsigned int fSize; // includes size of header itself
+};
+
+struct PacketStartDTrace { // reply: PacketReply
+ PacketHeader fHeader; // fType is kPacketTypeStartDtrace
+ char fMessage[kMaxMessageSize]; // message to print
+};
+
+struct PacketReply { // reply: n/a
+ PacketHeader fHeader; // fType is kPacketTypeReply
+ int fErr; // result of operation, errno-style
+};
+
+#endif // DTRACE_PROTOCOL