Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/installer/corehost/cli/apphost/bundle/marker.h')
-rw-r--r--src/installer/corehost/cli/apphost/bundle/marker.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/installer/corehost/cli/apphost/bundle/marker.h b/src/installer/corehost/cli/apphost/bundle/marker.h
new file mode 100644
index 00000000000..52e185fbe79
--- /dev/null
+++ b/src/installer/corehost/cli/apphost/bundle/marker.h
@@ -0,0 +1,32 @@
+// 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.
+
+#ifndef __MARKER_H__
+#define __MARKER_H__
+
+#include <cstdint>
+
+namespace bundle
+{
+#pragma pack(push, 1)
+ union marker_t
+ {
+ public:
+ uint8_t placeholder[40];
+ struct
+ {
+ int64_t bundle_header_offset;
+ uint8_t signature[32];
+ } locator;
+
+ static int64_t header_offset();
+ static bool is_bundle()
+ {
+ return header_offset() != 0;
+ }
+ };
+#pragma pack(pop)
+
+}
+#endif // __MARKER_H__