1#ifndef _clock_priv_user_
2#define _clock_priv_user_
3
4/* Module clock_priv */
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
26extern "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
42typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
43typedef struct {
44 char *name;
45 function_ptr_t function;
46} function_table_entry;
47typedef function_table_entry *function_table_t;
48#endif /* FUNCTION_PTR_T */
49#endif /* AUTOTEST */
50
51#ifndef clock_priv_MSG_COUNT
52#define clock_priv_MSG_COUNT 2
53#endif /* clock_priv_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#include <mach/mach_types.h>
60
61#ifdef __BeforeMigUserHeader
62__BeforeMigUserHeader
63#endif /* __BeforeMigUserHeader */
64
65#include <sys/cdefs.h>
66__BEGIN_DECLS
67
68
69/* Routine clock_set_time */
70#ifdef mig_external
71mig_external
72#else
73extern
74#endif /* mig_external */
75kern_return_t clock_set_time
76(
77 clock_ctrl_t clock_ctrl,
78 mach_timespec_t new_time
79);
80
81/* Routine clock_set_attributes */
82#ifdef mig_external
83mig_external
84#else
85extern
86#endif /* mig_external */
87kern_return_t clock_set_attributes
88(
89 clock_ctrl_t clock_ctrl,
90 clock_flavor_t flavor,
91 clock_attr_t clock_attr,
92 mach_msg_type_number_t clock_attrCnt
93);
94
95__END_DECLS
96
97/********************** Caution **************************/
98/* The following data types should be used to calculate */
99/* maximum message sizes only. The actual message may be */
100/* smaller, and the position of the arguments within the */
101/* message layout may vary from what is presented here. */
102/* For example, if any of the arguments are variable- */
103/* sized, and less than the maximum is sent, the data */
104/* will be packed tight in the actual message to reduce */
105/* the presence of holes. */
106/********************** Caution **************************/
107
108/* typedefs for all requests */
109
110#ifndef __Request__clock_priv_subsystem__defined
111#define __Request__clock_priv_subsystem__defined
112
113#ifdef __MigPackStructs
114#pragma pack(4)
115#endif
116 typedef struct {
117 mach_msg_header_t Head;
118 NDR_record_t NDR;
119 mach_timespec_t new_time;
120 } __Request__clock_set_time_t __attribute__((unused));
121#ifdef __MigPackStructs
122#pragma pack()
123#endif
124
125#ifdef __MigPackStructs
126#pragma pack(4)
127#endif
128 typedef struct {
129 mach_msg_header_t Head;
130 NDR_record_t NDR;
131 clock_flavor_t flavor;
132 mach_msg_type_number_t clock_attrCnt;
133 int clock_attr[1];
134 } __Request__clock_set_attributes_t __attribute__((unused));
135#ifdef __MigPackStructs
136#pragma pack()
137#endif
138#endif /* !__Request__clock_priv_subsystem__defined */
139
140/* union of all requests */
141
142#ifndef __RequestUnion__clock_priv_subsystem__defined
143#define __RequestUnion__clock_priv_subsystem__defined
144union __RequestUnion__clock_priv_subsystem {
145 __Request__clock_set_time_t Request_clock_set_time;
146 __Request__clock_set_attributes_t Request_clock_set_attributes;
147};
148#endif /* !__RequestUnion__clock_priv_subsystem__defined */
149/* typedefs for all replies */
150
151#ifndef __Reply__clock_priv_subsystem__defined
152#define __Reply__clock_priv_subsystem__defined
153
154#ifdef __MigPackStructs
155#pragma pack(4)
156#endif
157 typedef struct {
158 mach_msg_header_t Head;
159 NDR_record_t NDR;
160 kern_return_t RetCode;
161 } __Reply__clock_set_time_t __attribute__((unused));
162#ifdef __MigPackStructs
163#pragma pack()
164#endif
165
166#ifdef __MigPackStructs
167#pragma pack(4)
168#endif
169 typedef struct {
170 mach_msg_header_t Head;
171 NDR_record_t NDR;
172 kern_return_t RetCode;
173 } __Reply__clock_set_attributes_t __attribute__((unused));
174#ifdef __MigPackStructs
175#pragma pack()
176#endif
177#endif /* !__Reply__clock_priv_subsystem__defined */
178
179/* union of all replies */
180
181#ifndef __ReplyUnion__clock_priv_subsystem__defined
182#define __ReplyUnion__clock_priv_subsystem__defined
183union __ReplyUnion__clock_priv_subsystem {
184 __Reply__clock_set_time_t Reply_clock_set_time;
185 __Reply__clock_set_attributes_t Reply_clock_set_attributes;
186};
187#endif /* !__RequestUnion__clock_priv_subsystem__defined */
188
189#ifndef subsystem_to_name_map_clock_priv
190#define subsystem_to_name_map_clock_priv \
191 { "clock_set_time", 1200 },\
192 { "clock_set_attributes", 1201 }
193#endif
194
195#ifdef __AfterMigUserHeader
196__AfterMigUserHeader
197#endif /* __AfterMigUserHeader */
198
199#endif /* _clock_priv_user_ */
200