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