| 1 | #ifndef _mach_voucher_attr_control_user_ |
| 2 | #define _mach_voucher_attr_control_user_ |
| 3 | |
| 4 | /* Module mach_voucher_attr_control */ |
| 5 | |
| 6 | #include <string.h> |
| 7 | #include <mach/ndr.h> |
| 8 | #include <mach/boolean.h> |
| 9 | #include <mach/kern_return.h> |
| 10 | #include <mach/notify.h> |
| 11 | #include <mach/mach_types.h> |
| 12 | #include <mach/message.h> |
| 13 | #include <mach/mig_errors.h> |
| 14 | #include <mach/port.h> |
| 15 | |
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ |
| 17 | |
| 18 | #if defined(__has_include) |
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) |
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL |
| 21 | #define USING_MIG_STRNCPY_ZEROFILL |
| 22 | #endif |
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
| 25 | #ifdef __cplusplus |
| 26 | extern "C" { |
| 27 | #endif |
| 28 | extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); |
| 29 | #ifdef __cplusplus |
| 30 | } |
| 31 | #endif |
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ |
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ |
| 34 | #endif /* __has_include */ |
| 35 | |
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ |
| 37 | |
| 38 | |
| 39 | #ifdef AUTOTEST |
| 40 | #ifndef FUNCTION_PTR_T |
| 41 | #define FUNCTION_PTR_T |
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); |
| 43 | typedef struct { |
| 44 | char *name; |
| 45 | function_ptr_t function; |
| 46 | } function_table_entry; |
| 47 | typedef function_table_entry *function_table_t; |
| 48 | #endif /* FUNCTION_PTR_T */ |
| 49 | #endif /* AUTOTEST */ |
| 50 | |
| 51 | #ifndef mach_voucher_attr_control_MSG_COUNT |
| 52 | #define mach_voucher_attr_control_MSG_COUNT 2 |
| 53 | #endif /* mach_voucher_attr_control_MSG_COUNT */ |
| 54 | |
| 55 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> |
| 58 | #include <mach/mach_types.h> |
| 59 | |
| 60 | #ifdef __BeforeMigUserHeader |
| 61 | __BeforeMigUserHeader |
| 62 | #endif /* __BeforeMigUserHeader */ |
| 63 | |
| 64 | #include <sys/cdefs.h> |
| 65 | __BEGIN_DECLS |
| 66 | |
| 67 | |
| 68 | /* Routine mach_voucher_attr_control_get_values */ |
| 69 | #ifdef mig_external |
| 70 | mig_external |
| 71 | #else |
| 72 | extern |
| 73 | #endif /* mig_external */ |
| 74 | kern_return_t mach_voucher_attr_control_get_values |
| 75 | ( |
| 76 | ipc_voucher_attr_control_t control, |
| 77 | ipc_voucher_t voucher, |
| 78 | mach_voucher_attr_value_handle_array_t value_handles, |
| 79 | mach_msg_type_number_t *value_handlesCnt |
| 80 | ); |
| 81 | |
| 82 | /* Routine mach_voucher_attr_control_create_mach_voucher */ |
| 83 | #ifdef mig_external |
| 84 | mig_external |
| 85 | #else |
| 86 | extern |
| 87 | #endif /* mig_external */ |
| 88 | kern_return_t mach_voucher_attr_control_create_mach_voucher |
| 89 | ( |
| 90 | ipc_voucher_attr_control_t control, |
| 91 | mach_voucher_attr_raw_recipe_array_t recipes, |
| 92 | mach_msg_type_number_t recipesCnt, |
| 93 | ipc_voucher_t *voucher |
| 94 | ); |
| 95 | |
| 96 | __END_DECLS |
| 97 | |
| 98 | /********************** Caution **************************/ |
| 99 | /* The following data types should be used to calculate */ |
| 100 | /* maximum message sizes only. The actual message may be */ |
| 101 | /* smaller, and the position of the arguments within the */ |
| 102 | /* message layout may vary from what is presented here. */ |
| 103 | /* For example, if any of the arguments are variable- */ |
| 104 | /* sized, and less than the maximum is sent, the data */ |
| 105 | /* will be packed tight in the actual message to reduce */ |
| 106 | /* the presence of holes. */ |
| 107 | /********************** Caution **************************/ |
| 108 | |
| 109 | /* typedefs for all requests */ |
| 110 | |
| 111 | #ifndef __Request__mach_voucher_attr_control_subsystem__defined |
| 112 | #define __Request__mach_voucher_attr_control_subsystem__defined |
| 113 | |
| 114 | #ifdef __MigPackStructs |
| 115 | #pragma pack(4) |
| 116 | #endif |
| 117 | typedef struct { |
| 118 | mach_msg_header_t Head; |
| 119 | /* start of the kernel processed data */ |
| 120 | mach_msg_body_t msgh_body; |
| 121 | mach_msg_port_descriptor_t voucher; |
| 122 | /* end of the kernel processed data */ |
| 123 | NDR_record_t NDR; |
| 124 | mach_msg_type_number_t value_handlesCnt; |
| 125 | } __Request__mach_voucher_attr_control_get_values_t __attribute__((unused)); |
| 126 | #ifdef __MigPackStructs |
| 127 | #pragma pack() |
| 128 | #endif |
| 129 | |
| 130 | #ifdef __MigPackStructs |
| 131 | #pragma pack(4) |
| 132 | #endif |
| 133 | typedef struct { |
| 134 | mach_msg_header_t Head; |
| 135 | NDR_record_t NDR; |
| 136 | mach_msg_type_number_t recipesCnt; |
| 137 | uint8_t recipes[5120]; |
| 138 | } __Request__mach_voucher_attr_control_create_mach_voucher_t __attribute__((unused)); |
| 139 | #ifdef __MigPackStructs |
| 140 | #pragma pack() |
| 141 | #endif |
| 142 | #endif /* !__Request__mach_voucher_attr_control_subsystem__defined */ |
| 143 | |
| 144 | /* union of all requests */ |
| 145 | |
| 146 | #ifndef __RequestUnion__mach_voucher_attr_control_subsystem__defined |
| 147 | #define __RequestUnion__mach_voucher_attr_control_subsystem__defined |
| 148 | union __RequestUnion__mach_voucher_attr_control_subsystem { |
| 149 | __Request__mach_voucher_attr_control_get_values_t Request_mach_voucher_attr_control_get_values; |
| 150 | __Request__mach_voucher_attr_control_create_mach_voucher_t Request_mach_voucher_attr_control_create_mach_voucher; |
| 151 | }; |
| 152 | #endif /* !__RequestUnion__mach_voucher_attr_control_subsystem__defined */ |
| 153 | /* typedefs for all replies */ |
| 154 | |
| 155 | #ifndef __Reply__mach_voucher_attr_control_subsystem__defined |
| 156 | #define __Reply__mach_voucher_attr_control_subsystem__defined |
| 157 | |
| 158 | #ifdef __MigPackStructs |
| 159 | #pragma pack(4) |
| 160 | #endif |
| 161 | typedef struct { |
| 162 | mach_msg_header_t Head; |
| 163 | NDR_record_t NDR; |
| 164 | kern_return_t RetCode; |
| 165 | mach_msg_type_number_t value_handlesCnt; |
| 166 | mach_voucher_attr_value_handle_t value_handles[4]; |
| 167 | } __Reply__mach_voucher_attr_control_get_values_t __attribute__((unused)); |
| 168 | #ifdef __MigPackStructs |
| 169 | #pragma pack() |
| 170 | #endif |
| 171 | |
| 172 | #ifdef __MigPackStructs |
| 173 | #pragma pack(4) |
| 174 | #endif |
| 175 | typedef struct { |
| 176 | mach_msg_header_t Head; |
| 177 | /* start of the kernel processed data */ |
| 178 | mach_msg_body_t msgh_body; |
| 179 | mach_msg_port_descriptor_t voucher; |
| 180 | /* end of the kernel processed data */ |
| 181 | } __Reply__mach_voucher_attr_control_create_mach_voucher_t __attribute__((unused)); |
| 182 | #ifdef __MigPackStructs |
| 183 | #pragma pack() |
| 184 | #endif |
| 185 | #endif /* !__Reply__mach_voucher_attr_control_subsystem__defined */ |
| 186 | |
| 187 | /* union of all replies */ |
| 188 | |
| 189 | #ifndef __ReplyUnion__mach_voucher_attr_control_subsystem__defined |
| 190 | #define __ReplyUnion__mach_voucher_attr_control_subsystem__defined |
| 191 | union __ReplyUnion__mach_voucher_attr_control_subsystem { |
| 192 | __Reply__mach_voucher_attr_control_get_values_t Reply_mach_voucher_attr_control_get_values; |
| 193 | __Reply__mach_voucher_attr_control_create_mach_voucher_t Reply_mach_voucher_attr_control_create_mach_voucher; |
| 194 | }; |
| 195 | #endif /* !__RequestUnion__mach_voucher_attr_control_subsystem__defined */ |
| 196 | |
| 197 | #ifndef subsystem_to_name_map_mach_voucher_attr_control |
| 198 | #define subsystem_to_name_map_mach_voucher_attr_control \ |
| 199 | { "mach_voucher_attr_control_get_values", 5600 },\ |
| 200 | { "mach_voucher_attr_control_create_mach_voucher", 5601 } |
| 201 | #endif |
| 202 | |
| 203 | #ifdef __AfterMigUserHeader |
| 204 | __AfterMigUserHeader |
| 205 | #endif /* __AfterMigUserHeader */ |
| 206 | |
| 207 | #endif /* _mach_voucher_attr_control_user_ */ |
| 208 | |