+typedef struct
+{
+ mach_msg_trailer_type_t msgh_trailer_type;
+ mach_msg_trailer_size_t msgh_trailer_size;
+ mach_port_seqno_t msgh_seqno;
+ security_token_t msgh_sender;
+ audit_token_t msgh_audit;
+ mach_port_context_t msgh_context;
+} mach_msg_context_trailer_t;
+
+#if defined(MACH_KERNEL_PRIVATE) && defined(__arm64__)
+typedef struct
+{
+ mach_msg_trailer_type_t msgh_trailer_type;
+ mach_msg_trailer_size_t msgh_trailer_size;
+ mach_port_seqno_t msgh_seqno;
+ security_token_t msgh_sender;
+ audit_token_t msgh_audit;
+ mach_port_context32_t msgh_context;
+} mach_msg_context_trailer32_t;
+
+typedef struct
+{
+ mach_msg_trailer_type_t msgh_trailer_type;
+ mach_msg_trailer_size_t msgh_trailer_size;
+ mach_port_seqno_t msgh_seqno;
+ security_token_t msgh_sender;
+ audit_token_t msgh_audit;
+ mach_port_context64_t msgh_context;
+} mach_msg_context_trailer64_t;
+#endif
+
+
+typedef struct
+{
+ mach_port_name_t sender;
+} msg_labels_t;
+
+/*
+ Trailer type to pass MAC policy label info as a mach message trailer.
+
+*/
+
+typedef struct
+{
+ mach_msg_trailer_type_t msgh_trailer_type;
+ mach_msg_trailer_size_t msgh_trailer_size;
+ mach_port_seqno_t msgh_seqno;
+ security_token_t msgh_sender;
+ audit_token_t msgh_audit;
+ mach_port_context_t msgh_context;
+ int msgh_ad;
+ msg_labels_t msgh_labels;
+} mach_msg_mac_trailer_t;
+
+#if defined(MACH_KERNEL_PRIVATE) && defined(__arm64__)
+typedef struct
+{
+ mach_msg_trailer_type_t msgh_trailer_type;
+ mach_msg_trailer_size_t msgh_trailer_size;
+ mach_port_seqno_t msgh_seqno;
+ security_token_t msgh_sender;
+ audit_token_t msgh_audit;
+ mach_port_context32_t msgh_context;
+ int msgh_ad;
+ msg_labels_t msgh_labels;
+} mach_msg_mac_trailer32_t;
+
+typedef struct
+{
+ mach_msg_trailer_type_t msgh_trailer_type;
+ mach_msg_trailer_size_t msgh_trailer_size;
+ mach_port_seqno_t msgh_seqno;
+ security_token_t msgh_sender;
+ audit_token_t msgh_audit;
+ mach_port_context64_t msgh_context;
+ int msgh_ad;
+ msg_labels_t msgh_labels;
+} mach_msg_mac_trailer64_t;
+
+#endif
+