aboutsummaryrefslogtreecommitdiff
path: root/darwin-bootstrap/substituted-messages.h
diff options
context:
space:
mode:
authorcomex2015-02-28 21:18:20 -0500
committercomex2015-02-28 21:18:20 -0500
commitbfce3bf03e7bc285bc5bbf3df561a6f4e9169899 (patch)
tree115e02d7a4d44ca6e0a13c4a02a335dffe9b54e2 /darwin-bootstrap/substituted-messages.h
parentRename ios-bootstrap to darwin-bootstrap; cleanup posixspawn-hook and unrestr... (diff)
downloadsubstitute-bfce3bf03e7bc285bc5bbf3df561a6f4e9169899.tar.gz
Add substituted and fix things up to use it. Still untested.
Diffstat (limited to 'darwin-bootstrap/substituted-messages.h')
-rw-r--r--darwin-bootstrap/substituted-messages.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/darwin-bootstrap/substituted-messages.h b/darwin-bootstrap/substituted-messages.h
new file mode 100644
index 0000000..62b92b3
--- /dev/null
+++ b/darwin-bootstrap/substituted-messages.h
@@ -0,0 +1,37 @@
+#pragma once
+#include <mach/mach.h>
+#include <sys/param.h>
+
+enum {
+ SUBSTITUTED_PROTO_VERSION = 1
+};
+
+enum substituted_msg_id {
+ SUBSTITUTED_MSG_HELLO = 10000,
+ SUBSTITUTED_MSG_HELLO_RESP = 10001,
+};
+
+struct substituted_msg_body_hello {
+ int proto_version;
+ char argv0[/*0..*/MAXPATHLEN];
+};
+
+struct substituted_msg_body_hello_resp {
+ mach_msg_body_t body;
+ mach_msg_ool_descriptor_t bundle_list_ool;
+ int error;
+};
+
+/* bundle_list: a bunch of substituted_bundle_list_ops */
+
+enum substituted_bundle_list_opc {
+ SUBSTITUTED_TEST_BUNDLE,
+ SUBSTITUTED_TEST_CLASS,
+ SUBSTITUTED_USE_DYLIB,
+};
+
+struct substituted_bundle_list_op {
+ uint16_t namelen;
+ uint8_t opc;
+ /* char name[namelen + 1]; */
+};