Add a inflateEnd() call to free up the stream in the re-init block.
[obnox/wireshark/wip.git] / epan / dissectors / packet-dcerpc-atsvc.c
1 /* DO NOT EDIT
2         This filter was automatically generated
3         from atsvc.idl and atsvc.cnf.
4         
5         Pidl is a perl based IDL compiler for DCE/RPC idl files. 
6         It is maintained by the Samba team, not the Wireshark team.
7         Instructions on how to download and install Pidl can be 
8         found at http://wiki.wireshark.org/Pidl
9 */
10
11
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15
16 #ifdef _MSC_VER
17 #pragma warning(disable:4005)
18 #pragma warning(disable:4013)
19 #pragma warning(disable:4018)
20 #pragma warning(disable:4101)
21 #endif
22
23 #include <glib.h>
24 #include <string.h>
25 #include <epan/packet.h>
26
27 #include "packet-dcerpc.h"
28 #include "packet-dcerpc-nt.h"
29 #include "packet-windows-common.h"
30 #include "packet-dcerpc-atsvc.h"
31
32 /* Ett declarations */
33 static gint ett_dcerpc_atsvc = -1;
34 static gint ett_atsvc_atsvc_DaysOfMonth = -1;
35 static gint ett_atsvc_atsvc_Flags = -1;
36 static gint ett_atsvc_atsvc_DaysOfWeek = -1;
37 static gint ett_atsvc_atsvc_JobInfo = -1;
38 static gint ett_atsvc_atsvc_JobEnumInfo = -1;
39 static gint ett_atsvc_atsvc_enum_ctr = -1;
40
41
42 /* Header field declarations */
43 static gint hf_atsvc_atsvc_Flags_JOB_NONINTERACTIVE = -1;
44 static gint hf_atsvc_atsvc_DaysOfMonth_Fourteenth = -1;
45 static gint hf_atsvc_atsvc_Flags_JOB_RUN_PERIODICALLY = -1;
46 static gint hf_atsvc_atsvc_enum_ctr_entries_read = -1;
47 static gint hf_atsvc_atsvc_DaysOfMonth_Twentyeighth = -1;
48 static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY = -1;
49 static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY = -1;
50 static gint hf_atsvc_atsvc_DaysOfMonth_Second = -1;
51 static gint hf_atsvc_atsvc_DaysOfMonth_Twentyth = -1;
52 static gint hf_atsvc_atsvc_DaysOfMonth_Ninth = -1;
53 static gint hf_atsvc_servername = -1;
54 static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY = -1;
55 static gint hf_atsvc_atsvc_DaysOfMonth_Twentyninth = -1;
56 static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY = -1;
57 static gint hf_atsvc_atsvc_DaysOfMonth_Tenth = -1;
58 static gint hf_atsvc_atsvc_JobEnum_resume_handle = -1;
59 static gint hf_atsvc_atsvc_DaysOfMonth_Twentyseventh = -1;
60 static gint hf_atsvc_atsvc_DaysOfMonth_Fifteenth = -1;
61 static gint hf_atsvc_atsvc_JobInfo_command = -1;
62 static gint hf_atsvc_atsvc_DaysOfMonth_Ninteenth = -1;
63 static gint hf_atsvc_atsvc_DaysOfMonth_Seventh = -1;
64 static gint hf_atsvc_atsvc_DaysOfMonth_Twentyfourth = -1;
65 static gint hf_atsvc_atsvc_DaysOfMonth_Seventeenth = -1;
66 static gint hf_atsvc_opnum = -1;
67 static gint hf_atsvc_atsvc_DaysOfMonth_Twelfth = -1;
68 static gint hf_atsvc_atsvc_DaysOfMonth_Eighteenth = -1;
69 static gint hf_atsvc_atsvc_Flags_JOB_RUNS_TODAY = -1;
70 static gint hf_atsvc_atsvc_JobEnum_total_entries = -1;
71 static gint hf_atsvc_atsvc_enum_ctr_first_entry = -1;
72 static gint hf_atsvc_atsvc_JobEnumInfo_job_time = -1;
73 static gint hf_atsvc_atsvc_DaysOfMonth_Thirtyfirst = -1;
74 static gint hf_atsvc_atsvc_DaysOfMonth_Third = -1;
75 static gint hf_atsvc_atsvc_JobEnum_preferred_max_len = -1;
76 static gint hf_atsvc_atsvc_JobEnumInfo_days_of_month = -1;
77 static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY = -1;
78 static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY = -1;
79 static gint hf_atsvc_atsvc_DaysOfMonth_Twentythird = -1;
80 static gint hf_atsvc_atsvc_JobInfo_job_time = -1;
81 static gint hf_atsvc_status = -1;
82 static gint hf_atsvc_atsvc_JobInfo_flags = -1;
83 static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY = -1;
84 static gint hf_atsvc_atsvc_DaysOfMonth_Sixth = -1;
85 static gint hf_atsvc_job_id = -1;
86 static gint hf_atsvc_atsvc_DaysOfMonth_Twentysixth = -1;
87 static gint hf_atsvc_atsvc_DaysOfMonth_Fifth = -1;
88 static gint hf_atsvc_atsvc_DaysOfMonth_Fourth = -1;
89 static gint hf_atsvc_job_info = -1;
90 static gint hf_atsvc_atsvc_DaysOfMonth_Eleventh = -1;
91 static gint hf_atsvc_atsvc_DaysOfMonth_Sixteenth = -1;
92 static gint hf_atsvc_atsvc_Flags_JOB_ADD_CURRENT_DATE = -1;
93 static gint hf_atsvc_atsvc_JobEnum_ctr = -1;
94 static gint hf_atsvc_atsvc_DaysOfMonth_Twentyfifth = -1;
95 static gint hf_atsvc_atsvc_JobInfo_days_of_month = -1;
96 static gint hf_atsvc_atsvc_DaysOfMonth_Twentysecond = -1;
97 static gint hf_atsvc_atsvc_DaysOfMonth_First = -1;
98 static gint hf_atsvc_atsvc_JobEnumInfo_command = -1;
99 static gint hf_atsvc_atsvc_DaysOfMonth_Thirtieth = -1;
100 static gint hf_atsvc_atsvc_DaysOfMonth_Eight = -1;
101 static gint hf_atsvc_atsvc_DaysOfMonth_Twentyfirst = -1;
102 static gint hf_atsvc_atsvc_Flags_JOB_EXEC_ERROR = -1;
103 static gint hf_atsvc_atsvc_JobInfo_days_of_week = -1;
104 static gint hf_atsvc_atsvc_JobDel_min_job_id = -1;
105 static gint hf_atsvc_atsvc_JobEnumInfo_days_of_week = -1;
106 static gint hf_atsvc_atsvc_JobEnumInfo_flags = -1;
107 static gint hf_atsvc_atsvc_JobDel_max_job_id = -1;
108 static gint hf_atsvc_atsvc_DaysOfMonth_Thitteenth = -1;
109
110 static gint proto_dcerpc_atsvc = -1;
111 /* Version information */
112
113
114 static e_uuid_t uuid_dcerpc_atsvc = {
115         0x1ff70682, 0x0a51, 0x30e8,
116         { 0x07, 0x6d, 0x74, 0x0b, 0xe8, 0xce, 0xe9, 0x8b }
117 };
118 static guint16 ver_dcerpc_atsvc = 1;
119
120 static const true_false_string atsvc_DaysOfMonth_First_tfs = {
121    "First is SET",
122    "First is NOT SET",
123 };
124 static const true_false_string atsvc_DaysOfMonth_Second_tfs = {
125    "Second is SET",
126    "Second is NOT SET",
127 };
128 static const true_false_string atsvc_DaysOfMonth_Third_tfs = {
129    "Third is SET",
130    "Third is NOT SET",
131 };
132 static const true_false_string atsvc_DaysOfMonth_Fourth_tfs = {
133    "Fourth is SET",
134    "Fourth is NOT SET",
135 };
136 static const true_false_string atsvc_DaysOfMonth_Fifth_tfs = {
137    "Fifth is SET",
138    "Fifth is NOT SET",
139 };
140 static const true_false_string atsvc_DaysOfMonth_Sixth_tfs = {
141    "Sixth is SET",
142    "Sixth is NOT SET",
143 };
144 static const true_false_string atsvc_DaysOfMonth_Seventh_tfs = {
145    "Seventh is SET",
146    "Seventh is NOT SET",
147 };
148 static const true_false_string atsvc_DaysOfMonth_Eight_tfs = {
149    "Eight is SET",
150    "Eight is NOT SET",
151 };
152 static const true_false_string atsvc_DaysOfMonth_Ninth_tfs = {
153    "Ninth is SET",
154    "Ninth is NOT SET",
155 };
156 static const true_false_string atsvc_DaysOfMonth_Tenth_tfs = {
157    "Tenth is SET",
158    "Tenth is NOT SET",
159 };
160 static const true_false_string atsvc_DaysOfMonth_Eleventh_tfs = {
161    "Eleventh is SET",
162    "Eleventh is NOT SET",
163 };
164 static const true_false_string atsvc_DaysOfMonth_Twelfth_tfs = {
165    "Twelfth is SET",
166    "Twelfth is NOT SET",
167 };
168 static const true_false_string atsvc_DaysOfMonth_Thitteenth_tfs = {
169    "Thitteenth is SET",
170    "Thitteenth is NOT SET",
171 };
172 static const true_false_string atsvc_DaysOfMonth_Fourteenth_tfs = {
173    "Fourteenth is SET",
174    "Fourteenth is NOT SET",
175 };
176 static const true_false_string atsvc_DaysOfMonth_Fifteenth_tfs = {
177    "Fifteenth is SET",
178    "Fifteenth is NOT SET",
179 };
180 static const true_false_string atsvc_DaysOfMonth_Sixteenth_tfs = {
181    "Sixteenth is SET",
182    "Sixteenth is NOT SET",
183 };
184 static const true_false_string atsvc_DaysOfMonth_Seventeenth_tfs = {
185    "Seventeenth is SET",
186    "Seventeenth is NOT SET",
187 };
188 static const true_false_string atsvc_DaysOfMonth_Eighteenth_tfs = {
189    "Eighteenth is SET",
190    "Eighteenth is NOT SET",
191 };
192 static const true_false_string atsvc_DaysOfMonth_Ninteenth_tfs = {
193    "Ninteenth is SET",
194    "Ninteenth is NOT SET",
195 };
196 static const true_false_string atsvc_DaysOfMonth_Twentyth_tfs = {
197    "Twentyth is SET",
198    "Twentyth is NOT SET",
199 };
200 static const true_false_string atsvc_DaysOfMonth_Twentyfirst_tfs = {
201    "Twentyfirst is SET",
202    "Twentyfirst is NOT SET",
203 };
204 static const true_false_string atsvc_DaysOfMonth_Twentysecond_tfs = {
205    "Twentysecond is SET",
206    "Twentysecond is NOT SET",
207 };
208 static const true_false_string atsvc_DaysOfMonth_Twentythird_tfs = {
209    "Twentythird is SET",
210    "Twentythird is NOT SET",
211 };
212 static const true_false_string atsvc_DaysOfMonth_Twentyfourth_tfs = {
213    "Twentyfourth is SET",
214    "Twentyfourth is NOT SET",
215 };
216 static const true_false_string atsvc_DaysOfMonth_Twentyfifth_tfs = {
217    "Twentyfifth is SET",
218    "Twentyfifth is NOT SET",
219 };
220 static const true_false_string atsvc_DaysOfMonth_Twentysixth_tfs = {
221    "Twentysixth is SET",
222    "Twentysixth is NOT SET",
223 };
224 static const true_false_string atsvc_DaysOfMonth_Twentyseventh_tfs = {
225    "Twentyseventh is SET",
226    "Twentyseventh is NOT SET",
227 };
228 static const true_false_string atsvc_DaysOfMonth_Twentyeighth_tfs = {
229    "Twentyeighth is SET",
230    "Twentyeighth is NOT SET",
231 };
232 static const true_false_string atsvc_DaysOfMonth_Twentyninth_tfs = {
233    "Twentyninth is SET",
234    "Twentyninth is NOT SET",
235 };
236 static const true_false_string atsvc_DaysOfMonth_Thirtieth_tfs = {
237    "Thirtieth is SET",
238    "Thirtieth is NOT SET",
239 };
240 static const true_false_string atsvc_DaysOfMonth_Thirtyfirst_tfs = {
241    "Thirtyfirst is SET",
242    "Thirtyfirst is NOT SET",
243 };
244 static const true_false_string atsvc_Flags_JOB_RUN_PERIODICALLY_tfs = {
245    "JOB_RUN_PERIODICALLY is SET",
246    "JOB_RUN_PERIODICALLY is NOT SET",
247 };
248 static const true_false_string atsvc_Flags_JOB_EXEC_ERROR_tfs = {
249    "JOB_EXEC_ERROR is SET",
250    "JOB_EXEC_ERROR is NOT SET",
251 };
252 static const true_false_string atsvc_Flags_JOB_RUNS_TODAY_tfs = {
253    "JOB_RUNS_TODAY is SET",
254    "JOB_RUNS_TODAY is NOT SET",
255 };
256 static const true_false_string atsvc_Flags_JOB_ADD_CURRENT_DATE_tfs = {
257    "JOB_ADD_CURRENT_DATE is SET",
258    "JOB_ADD_CURRENT_DATE is NOT SET",
259 };
260 static const true_false_string atsvc_Flags_JOB_NONINTERACTIVE_tfs = {
261    "JOB_NONINTERACTIVE is SET",
262    "JOB_NONINTERACTIVE is NOT SET",
263 };
264 static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY_tfs = {
265    "DAYSOFWEEK_MONDAY is SET",
266    "DAYSOFWEEK_MONDAY is NOT SET",
267 };
268 static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY_tfs = {
269    "DAYSOFWEEK_TUESDAY is SET",
270    "DAYSOFWEEK_TUESDAY is NOT SET",
271 };
272 static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY_tfs = {
273    "DAYSOFWEEK_WEDNESDAY is SET",
274    "DAYSOFWEEK_WEDNESDAY is NOT SET",
275 };
276 static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY_tfs = {
277    "DAYSOFWEEK_THURSDAY is SET",
278    "DAYSOFWEEK_THURSDAY is NOT SET",
279 };
280 static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY_tfs = {
281    "DAYSOFWEEK_FRIDAY is SET",
282    "DAYSOFWEEK_FRIDAY is NOT SET",
283 };
284 static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY_tfs = {
285    "DAYSOFWEEK_SATURDAY is SET",
286    "DAYSOFWEEK_SATURDAY is NOT SET",
287 };
288 static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY_tfs = {
289    "DAYSOFWEEK_SUNDAY is SET",
290    "DAYSOFWEEK_SUNDAY is NOT SET",
291 };
292 static int atsvc_dissect_element_JobInfo_job_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
293 static int atsvc_dissect_element_JobInfo_days_of_month(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
294 static int atsvc_dissect_element_JobInfo_days_of_week(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
295 static int atsvc_dissect_element_JobInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
296 static int atsvc_dissect_element_JobInfo_command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
297 static int atsvc_dissect_element_JobInfo_command_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
298 static int atsvc_dissect_element_JobEnumInfo_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
299 static int atsvc_dissect_element_JobEnumInfo_job_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
300 static int atsvc_dissect_element_JobEnumInfo_days_of_month(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
301 static int atsvc_dissect_element_JobEnumInfo_days_of_week(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
302 static int atsvc_dissect_element_JobEnumInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
303 static int atsvc_dissect_element_JobEnumInfo_command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
304 static int atsvc_dissect_element_JobEnumInfo_command_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
305 static int atsvc_dissect_element_enum_ctr_entries_read(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
306 static int atsvc_dissect_element_enum_ctr_first_entry(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
307 static int atsvc_dissect_element_enum_ctr_first_entry_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
308 static int atsvc_dissect_element_enum_ctr_first_entry__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
309 static int atsvc_dissect_element_JobAdd_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
310 static int atsvc_dissect_element_JobAdd_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
311 static int atsvc_dissect_element_JobAdd_job_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
312 static int atsvc_dissect_element_JobAdd_job_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
313 static int atsvc_dissect_element_JobAdd_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
314 static int atsvc_dissect_element_JobAdd_job_id_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
315 static int atsvc_dissect_element_JobDel_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
316 static int atsvc_dissect_element_JobDel_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
317 static int atsvc_dissect_element_JobDel_min_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
318 static int atsvc_dissect_element_JobDel_max_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
319 static int atsvc_dissect_element_JobEnum_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
320 static int atsvc_dissect_element_JobEnum_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
321 static int atsvc_dissect_element_JobEnum_ctr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
322 static int atsvc_dissect_element_JobEnum_ctr_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
323 static int atsvc_dissect_element_JobEnum_preferred_max_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
324 static int atsvc_dissect_element_JobEnum_total_entries(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
325 static int atsvc_dissect_element_JobEnum_total_entries_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
326 static int atsvc_dissect_element_JobEnum_resume_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
327 static int atsvc_dissect_element_JobEnum_resume_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
328 static int atsvc_dissect_element_JobGetInfo_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
329 static int atsvc_dissect_element_JobGetInfo_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
330 static int atsvc_dissect_element_JobGetInfo_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
331 static int atsvc_dissect_element_JobGetInfo_job_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
332 static int atsvc_dissect_element_JobGetInfo_job_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
333 static int atsvc_dissect_element_JobGetInfo_job_info__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
334
335
336 /* IDL: bitmap { */
337 /* IDL:         First =  0x00000001 , */
338 /* IDL:         Second =  0x00000002 , */
339 /* IDL:         Third =  0x00000004 , */
340 /* IDL:         Fourth =  0x00000008 , */
341 /* IDL:         Fifth =  0x00000010 , */
342 /* IDL:         Sixth =  0x00000020 , */
343 /* IDL:         Seventh =  0x00000040 , */
344 /* IDL:         Eight =  0x00000080 , */
345 /* IDL:         Ninth =  0x00000100 , */
346 /* IDL:         Tenth =  0x00000200 , */
347 /* IDL:         Eleventh =  0x00000400 , */
348 /* IDL:         Twelfth =  0x00000800 , */
349 /* IDL:         Thitteenth =  0x00001000 , */
350 /* IDL:         Fourteenth =  0x00002000 , */
351 /* IDL:         Fifteenth =  0x00004000 , */
352 /* IDL:         Sixteenth =  0x00008000 , */
353 /* IDL:         Seventeenth =  0x00010000 , */
354 /* IDL:         Eighteenth =  0x00020000 , */
355 /* IDL:         Ninteenth =  0x00040000 , */
356 /* IDL:         Twentyth =  0x00080000 , */
357 /* IDL:         Twentyfirst =  0x00100000 , */
358 /* IDL:         Twentysecond =  0x00200000 , */
359 /* IDL:         Twentythird =  0x00400000 , */
360 /* IDL:         Twentyfourth =  0x00800000 , */
361 /* IDL:         Twentyfifth =  0x01000000 , */
362 /* IDL:         Twentysixth =  0x02000000 , */
363 /* IDL:         Twentyseventh =  0x04000000 , */
364 /* IDL:         Twentyeighth =  0x08000000 , */
365 /* IDL:         Twentyninth =  0x10000000 , */
366 /* IDL:         Thirtieth =  0x20000000 , */
367 /* IDL:         Thirtyfirst =  0x40000000 , */
368 /* IDL: } */
369
370 int
371 atsvc_dissect_bitmap_DaysOfMonth(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
372 {
373         proto_item *item = NULL;
374         proto_tree *tree = NULL;
375
376         guint32 flags;
377         ALIGN_TO_4_BYTES;
378
379         if (parent_tree) {
380                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 4, TRUE);
381                 tree = proto_item_add_subtree(item,ett_atsvc_atsvc_DaysOfMonth);
382         }
383
384         offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, drep, -1, &flags);
385         proto_item_append_text(item, ": ");
386
387         if (!flags)
388                 proto_item_append_text(item, "(No values set)");
389
390         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_First, tvb, offset-4, 4, flags);
391         if (flags&( 0x00000001 )){
392                 proto_item_append_text(item, "First");
393                 if (flags & (~( 0x00000001 )))
394                         proto_item_append_text(item, ", ");
395         }
396         flags&=(~( 0x00000001 ));
397
398         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Second, tvb, offset-4, 4, flags);
399         if (flags&( 0x00000002 )){
400                 proto_item_append_text(item, "Second");
401                 if (flags & (~( 0x00000002 )))
402                         proto_item_append_text(item, ", ");
403         }
404         flags&=(~( 0x00000002 ));
405
406         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Third, tvb, offset-4, 4, flags);
407         if (flags&( 0x00000004 )){
408                 proto_item_append_text(item, "Third");
409                 if (flags & (~( 0x00000004 )))
410                         proto_item_append_text(item, ", ");
411         }
412         flags&=(~( 0x00000004 ));
413
414         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Fourth, tvb, offset-4, 4, flags);
415         if (flags&( 0x00000008 )){
416                 proto_item_append_text(item, "Fourth");
417                 if (flags & (~( 0x00000008 )))
418                         proto_item_append_text(item, ", ");
419         }
420         flags&=(~( 0x00000008 ));
421
422         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Fifth, tvb, offset-4, 4, flags);
423         if (flags&( 0x00000010 )){
424                 proto_item_append_text(item, "Fifth");
425                 if (flags & (~( 0x00000010 )))
426                         proto_item_append_text(item, ", ");
427         }
428         flags&=(~( 0x00000010 ));
429
430         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Sixth, tvb, offset-4, 4, flags);
431         if (flags&( 0x00000020 )){
432                 proto_item_append_text(item, "Sixth");
433                 if (flags & (~( 0x00000020 )))
434                         proto_item_append_text(item, ", ");
435         }
436         flags&=(~( 0x00000020 ));
437
438         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Seventh, tvb, offset-4, 4, flags);
439         if (flags&( 0x00000040 )){
440                 proto_item_append_text(item, "Seventh");
441                 if (flags & (~( 0x00000040 )))
442                         proto_item_append_text(item, ", ");
443         }
444         flags&=(~( 0x00000040 ));
445
446         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Eight, tvb, offset-4, 4, flags);
447         if (flags&( 0x00000080 )){
448                 proto_item_append_text(item, "Eight");
449                 if (flags & (~( 0x00000080 )))
450                         proto_item_append_text(item, ", ");
451         }
452         flags&=(~( 0x00000080 ));
453
454         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Ninth, tvb, offset-4, 4, flags);
455         if (flags&( 0x00000100 )){
456                 proto_item_append_text(item, "Ninth");
457                 if (flags & (~( 0x00000100 )))
458                         proto_item_append_text(item, ", ");
459         }
460         flags&=(~( 0x00000100 ));
461
462         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Tenth, tvb, offset-4, 4, flags);
463         if (flags&( 0x00000200 )){
464                 proto_item_append_text(item, "Tenth");
465                 if (flags & (~( 0x00000200 )))
466                         proto_item_append_text(item, ", ");
467         }
468         flags&=(~( 0x00000200 ));
469
470         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Eleventh, tvb, offset-4, 4, flags);
471         if (flags&( 0x00000400 )){
472                 proto_item_append_text(item, "Eleventh");
473                 if (flags & (~( 0x00000400 )))
474                         proto_item_append_text(item, ", ");
475         }
476         flags&=(~( 0x00000400 ));
477
478         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twelfth, tvb, offset-4, 4, flags);
479         if (flags&( 0x00000800 )){
480                 proto_item_append_text(item, "Twelfth");
481                 if (flags & (~( 0x00000800 )))
482                         proto_item_append_text(item, ", ");
483         }
484         flags&=(~( 0x00000800 ));
485
486         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Thitteenth, tvb, offset-4, 4, flags);
487         if (flags&( 0x00001000 )){
488                 proto_item_append_text(item, "Thitteenth");
489                 if (flags & (~( 0x00001000 )))
490                         proto_item_append_text(item, ", ");
491         }
492         flags&=(~( 0x00001000 ));
493
494         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Fourteenth, tvb, offset-4, 4, flags);
495         if (flags&( 0x00002000 )){
496                 proto_item_append_text(item, "Fourteenth");
497                 if (flags & (~( 0x00002000 )))
498                         proto_item_append_text(item, ", ");
499         }
500         flags&=(~( 0x00002000 ));
501
502         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Fifteenth, tvb, offset-4, 4, flags);
503         if (flags&( 0x00004000 )){
504                 proto_item_append_text(item, "Fifteenth");
505                 if (flags & (~( 0x00004000 )))
506                         proto_item_append_text(item, ", ");
507         }
508         flags&=(~( 0x00004000 ));
509
510         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Sixteenth, tvb, offset-4, 4, flags);
511         if (flags&( 0x00008000 )){
512                 proto_item_append_text(item, "Sixteenth");
513                 if (flags & (~( 0x00008000 )))
514                         proto_item_append_text(item, ", ");
515         }
516         flags&=(~( 0x00008000 ));
517
518         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Seventeenth, tvb, offset-4, 4, flags);
519         if (flags&( 0x00010000 )){
520                 proto_item_append_text(item, "Seventeenth");
521                 if (flags & (~( 0x00010000 )))
522                         proto_item_append_text(item, ", ");
523         }
524         flags&=(~( 0x00010000 ));
525
526         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Eighteenth, tvb, offset-4, 4, flags);
527         if (flags&( 0x00020000 )){
528                 proto_item_append_text(item, "Eighteenth");
529                 if (flags & (~( 0x00020000 )))
530                         proto_item_append_text(item, ", ");
531         }
532         flags&=(~( 0x00020000 ));
533
534         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Ninteenth, tvb, offset-4, 4, flags);
535         if (flags&( 0x00040000 )){
536                 proto_item_append_text(item, "Ninteenth");
537                 if (flags & (~( 0x00040000 )))
538                         proto_item_append_text(item, ", ");
539         }
540         flags&=(~( 0x00040000 ));
541
542         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentyth, tvb, offset-4, 4, flags);
543         if (flags&( 0x00080000 )){
544                 proto_item_append_text(item, "Twentyth");
545                 if (flags & (~( 0x00080000 )))
546                         proto_item_append_text(item, ", ");
547         }
548         flags&=(~( 0x00080000 ));
549
550         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentyfirst, tvb, offset-4, 4, flags);
551         if (flags&( 0x00100000 )){
552                 proto_item_append_text(item, "Twentyfirst");
553                 if (flags & (~( 0x00100000 )))
554                         proto_item_append_text(item, ", ");
555         }
556         flags&=(~( 0x00100000 ));
557
558         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentysecond, tvb, offset-4, 4, flags);
559         if (flags&( 0x00200000 )){
560                 proto_item_append_text(item, "Twentysecond");
561                 if (flags & (~( 0x00200000 )))
562                         proto_item_append_text(item, ", ");
563         }
564         flags&=(~( 0x00200000 ));
565
566         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentythird, tvb, offset-4, 4, flags);
567         if (flags&( 0x00400000 )){
568                 proto_item_append_text(item, "Twentythird");
569                 if (flags & (~( 0x00400000 )))
570                         proto_item_append_text(item, ", ");
571         }
572         flags&=(~( 0x00400000 ));
573
574         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentyfourth, tvb, offset-4, 4, flags);
575         if (flags&( 0x00800000 )){
576                 proto_item_append_text(item, "Twentyfourth");
577                 if (flags & (~( 0x00800000 )))
578                         proto_item_append_text(item, ", ");
579         }
580         flags&=(~( 0x00800000 ));
581
582         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentyfifth, tvb, offset-4, 4, flags);
583         if (flags&( 0x01000000 )){
584                 proto_item_append_text(item, "Twentyfifth");
585                 if (flags & (~( 0x01000000 )))
586                         proto_item_append_text(item, ", ");
587         }
588         flags&=(~( 0x01000000 ));
589
590         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentysixth, tvb, offset-4, 4, flags);
591         if (flags&( 0x02000000 )){
592                 proto_item_append_text(item, "Twentysixth");
593                 if (flags & (~( 0x02000000 )))
594                         proto_item_append_text(item, ", ");
595         }
596         flags&=(~( 0x02000000 ));
597
598         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentyseventh, tvb, offset-4, 4, flags);
599         if (flags&( 0x04000000 )){
600                 proto_item_append_text(item, "Twentyseventh");
601                 if (flags & (~( 0x04000000 )))
602                         proto_item_append_text(item, ", ");
603         }
604         flags&=(~( 0x04000000 ));
605
606         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentyeighth, tvb, offset-4, 4, flags);
607         if (flags&( 0x08000000 )){
608                 proto_item_append_text(item, "Twentyeighth");
609                 if (flags & (~( 0x08000000 )))
610                         proto_item_append_text(item, ", ");
611         }
612         flags&=(~( 0x08000000 ));
613
614         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Twentyninth, tvb, offset-4, 4, flags);
615         if (flags&( 0x10000000 )){
616                 proto_item_append_text(item, "Twentyninth");
617                 if (flags & (~( 0x10000000 )))
618                         proto_item_append_text(item, ", ");
619         }
620         flags&=(~( 0x10000000 ));
621
622         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Thirtieth, tvb, offset-4, 4, flags);
623         if (flags&( 0x20000000 )){
624                 proto_item_append_text(item, "Thirtieth");
625                 if (flags & (~( 0x20000000 )))
626                         proto_item_append_text(item, ", ");
627         }
628         flags&=(~( 0x20000000 ));
629
630         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfMonth_Thirtyfirst, tvb, offset-4, 4, flags);
631         if (flags&( 0x40000000 )){
632                 proto_item_append_text(item, "Thirtyfirst");
633                 if (flags & (~( 0x40000000 )))
634                         proto_item_append_text(item, ", ");
635         }
636         flags&=(~( 0x40000000 ));
637
638         if (flags) {
639                 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
640         }
641
642         return offset;
643 }
644
645
646 /* IDL: bitmap { */
647 /* IDL:         JOB_RUN_PERIODICALLY =  0x01 , */
648 /* IDL:         JOB_EXEC_ERROR =  0x02 , */
649 /* IDL:         JOB_RUNS_TODAY =  0x04 , */
650 /* IDL:         JOB_ADD_CURRENT_DATE =  0x08 , */
651 /* IDL:         JOB_NONINTERACTIVE =  0x10 , */
652 /* IDL: } */
653
654 int
655 atsvc_dissect_bitmap_Flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
656 {
657         proto_item *item = NULL;
658         proto_tree *tree = NULL;
659
660         guint8 flags;
661
662         if (parent_tree) {
663                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 1, TRUE);
664                 tree = proto_item_add_subtree(item,ett_atsvc_atsvc_Flags);
665         }
666
667         offset = dissect_ndr_uint8(tvb, offset, pinfo, NULL, drep, -1, &flags);
668         proto_item_append_text(item, ": ");
669
670         if (!flags)
671                 proto_item_append_text(item, "(No values set)");
672
673         proto_tree_add_boolean(tree, hf_atsvc_atsvc_Flags_JOB_RUN_PERIODICALLY, tvb, offset-1, 1, flags);
674         if (flags&( 0x01 )){
675                 proto_item_append_text(item, "JOB_RUN_PERIODICALLY");
676                 if (flags & (~( 0x01 )))
677                         proto_item_append_text(item, ", ");
678         }
679         flags&=(~( 0x01 ));
680
681         proto_tree_add_boolean(tree, hf_atsvc_atsvc_Flags_JOB_EXEC_ERROR, tvb, offset-1, 1, flags);
682         if (flags&( 0x02 )){
683                 proto_item_append_text(item, "JOB_EXEC_ERROR");
684                 if (flags & (~( 0x02 )))
685                         proto_item_append_text(item, ", ");
686         }
687         flags&=(~( 0x02 ));
688
689         proto_tree_add_boolean(tree, hf_atsvc_atsvc_Flags_JOB_RUNS_TODAY, tvb, offset-1, 1, flags);
690         if (flags&( 0x04 )){
691                 proto_item_append_text(item, "JOB_RUNS_TODAY");
692                 if (flags & (~( 0x04 )))
693                         proto_item_append_text(item, ", ");
694         }
695         flags&=(~( 0x04 ));
696
697         proto_tree_add_boolean(tree, hf_atsvc_atsvc_Flags_JOB_ADD_CURRENT_DATE, tvb, offset-1, 1, flags);
698         if (flags&( 0x08 )){
699                 proto_item_append_text(item, "JOB_ADD_CURRENT_DATE");
700                 if (flags & (~( 0x08 )))
701                         proto_item_append_text(item, ", ");
702         }
703         flags&=(~( 0x08 ));
704
705         proto_tree_add_boolean(tree, hf_atsvc_atsvc_Flags_JOB_NONINTERACTIVE, tvb, offset-1, 1, flags);
706         if (flags&( 0x10 )){
707                 proto_item_append_text(item, "JOB_NONINTERACTIVE");
708                 if (flags & (~( 0x10 )))
709                         proto_item_append_text(item, ", ");
710         }
711         flags&=(~( 0x10 ));
712
713         if (flags) {
714                 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
715         }
716
717         return offset;
718 }
719
720
721 /* IDL: bitmap { */
722 /* IDL:         DAYSOFWEEK_MONDAY =  0x01 , */
723 /* IDL:         DAYSOFWEEK_TUESDAY =  0x02 , */
724 /* IDL:         DAYSOFWEEK_WEDNESDAY =  0x04 , */
725 /* IDL:         DAYSOFWEEK_THURSDAY =  0x08 , */
726 /* IDL:         DAYSOFWEEK_FRIDAY =  0x10 , */
727 /* IDL:         DAYSOFWEEK_SATURDAY =  0x20 , */
728 /* IDL:         DAYSOFWEEK_SUNDAY =  0x40 , */
729 /* IDL: } */
730
731 int
732 atsvc_dissect_bitmap_DaysOfWeek(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
733 {
734         proto_item *item = NULL;
735         proto_tree *tree = NULL;
736
737         guint8 flags;
738
739         if (parent_tree) {
740                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, 1, TRUE);
741                 tree = proto_item_add_subtree(item,ett_atsvc_atsvc_DaysOfWeek);
742         }
743
744         offset = dissect_ndr_uint8(tvb, offset, pinfo, NULL, drep, -1, &flags);
745         proto_item_append_text(item, ": ");
746
747         if (!flags)
748                 proto_item_append_text(item, "(No values set)");
749
750         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY, tvb, offset-1, 1, flags);
751         if (flags&( 0x01 )){
752                 proto_item_append_text(item, "DAYSOFWEEK_MONDAY");
753                 if (flags & (~( 0x01 )))
754                         proto_item_append_text(item, ", ");
755         }
756         flags&=(~( 0x01 ));
757
758         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY, tvb, offset-1, 1, flags);
759         if (flags&( 0x02 )){
760                 proto_item_append_text(item, "DAYSOFWEEK_TUESDAY");
761                 if (flags & (~( 0x02 )))
762                         proto_item_append_text(item, ", ");
763         }
764         flags&=(~( 0x02 ));
765
766         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY, tvb, offset-1, 1, flags);
767         if (flags&( 0x04 )){
768                 proto_item_append_text(item, "DAYSOFWEEK_WEDNESDAY");
769                 if (flags & (~( 0x04 )))
770                         proto_item_append_text(item, ", ");
771         }
772         flags&=(~( 0x04 ));
773
774         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY, tvb, offset-1, 1, flags);
775         if (flags&( 0x08 )){
776                 proto_item_append_text(item, "DAYSOFWEEK_THURSDAY");
777                 if (flags & (~( 0x08 )))
778                         proto_item_append_text(item, ", ");
779         }
780         flags&=(~( 0x08 ));
781
782         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY, tvb, offset-1, 1, flags);
783         if (flags&( 0x10 )){
784                 proto_item_append_text(item, "DAYSOFWEEK_FRIDAY");
785                 if (flags & (~( 0x10 )))
786                         proto_item_append_text(item, ", ");
787         }
788         flags&=(~( 0x10 ));
789
790         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY, tvb, offset-1, 1, flags);
791         if (flags&( 0x20 )){
792                 proto_item_append_text(item, "DAYSOFWEEK_SATURDAY");
793                 if (flags & (~( 0x20 )))
794                         proto_item_append_text(item, ", ");
795         }
796         flags&=(~( 0x20 ));
797
798         proto_tree_add_boolean(tree, hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY, tvb, offset-1, 1, flags);
799         if (flags&( 0x40 )){
800                 proto_item_append_text(item, "DAYSOFWEEK_SUNDAY");
801                 if (flags & (~( 0x40 )))
802                         proto_item_append_text(item, ", ");
803         }
804         flags&=(~( 0x40 ));
805
806         if (flags) {
807                 proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
808         }
809
810         return offset;
811 }
812
813
814 /* IDL: struct { */
815 /* IDL:         uint32 job_time; */
816 /* IDL:         atsvc_DaysOfMonth days_of_month; */
817 /* IDL:         atsvc_DaysOfWeek days_of_week; */
818 /* IDL:         atsvc_Flags flags; */
819 /* IDL:         [charset(UTF16)] [unique(1)] uint16 *command; */
820 /* IDL: } */
821
822 static int
823 atsvc_dissect_element_JobInfo_job_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
824 {
825         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobInfo_job_time, 0);
826
827         return offset;
828 }
829
830 static int
831 atsvc_dissect_element_JobInfo_days_of_month(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
832 {
833         offset = atsvc_dissect_bitmap_DaysOfMonth(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobInfo_days_of_month, 0);
834
835         return offset;
836 }
837
838 static int
839 atsvc_dissect_element_JobInfo_days_of_week(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
840 {
841         offset = atsvc_dissect_bitmap_DaysOfWeek(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobInfo_days_of_week, 0);
842
843         return offset;
844 }
845
846 static int
847 atsvc_dissect_element_JobInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
848 {
849         offset = atsvc_dissect_bitmap_Flags(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobInfo_flags, 0);
850
851         return offset;
852 }
853
854 static int
855 atsvc_dissect_element_JobInfo_command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
856 {
857         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobInfo_command_, NDR_POINTER_UNIQUE, "Pointer to Command (uint16)",hf_atsvc_atsvc_JobInfo_command);
858
859         return offset;
860 }
861
862 static int
863 atsvc_dissect_element_JobInfo_command_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
864 {
865         char *data;
866
867         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_atsvc_atsvc_JobInfo_command, FALSE, &data);
868         proto_item_append_text(tree, ": %s", data);
869
870         return offset;
871 }
872
873 int
874 atsvc_dissect_struct_JobInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
875 {
876         proto_item *item = NULL;
877         proto_tree *tree = NULL;
878         int old_offset;
879
880         ALIGN_TO_4_BYTES;
881
882         old_offset = offset;
883
884         if (parent_tree) {
885                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
886                 tree = proto_item_add_subtree(item, ett_atsvc_atsvc_JobInfo);
887         }
888         
889         offset = atsvc_dissect_element_JobInfo_job_time(tvb, offset, pinfo, tree, drep);
890
891         offset = atsvc_dissect_element_JobInfo_days_of_month(tvb, offset, pinfo, tree, drep);
892
893         offset = atsvc_dissect_element_JobInfo_days_of_week(tvb, offset, pinfo, tree, drep);
894
895         offset = atsvc_dissect_element_JobInfo_flags(tvb, offset, pinfo, tree, drep);
896
897         offset = atsvc_dissect_element_JobInfo_command(tvb, offset, pinfo, tree, drep);
898
899
900         proto_item_set_len(item, offset-old_offset);
901
902         return offset;
903 }
904
905
906 /* IDL: struct { */
907 /* IDL:         uint32 job_id; */
908 /* IDL:         uint32 job_time; */
909 /* IDL:         atsvc_DaysOfMonth days_of_month; */
910 /* IDL:         atsvc_DaysOfWeek days_of_week; */
911 /* IDL:         atsvc_Flags flags; */
912 /* IDL:         [charset(UTF16)] [unique(1)] uint16 *command; */
913 /* IDL: } */
914
915 static int
916 atsvc_dissect_element_JobEnumInfo_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
917 {
918         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_job_id, 0);
919
920         return offset;
921 }
922
923 static int
924 atsvc_dissect_element_JobEnumInfo_job_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
925 {
926         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobEnumInfo_job_time, 0);
927
928         return offset;
929 }
930
931 static int
932 atsvc_dissect_element_JobEnumInfo_days_of_month(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
933 {
934         offset = atsvc_dissect_bitmap_DaysOfMonth(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobEnumInfo_days_of_month, 0);
935
936         return offset;
937 }
938
939 static int
940 atsvc_dissect_element_JobEnumInfo_days_of_week(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
941 {
942         offset = atsvc_dissect_bitmap_DaysOfWeek(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobEnumInfo_days_of_week, 0);
943
944         return offset;
945 }
946
947 static int
948 atsvc_dissect_element_JobEnumInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
949 {
950         offset = atsvc_dissect_bitmap_Flags(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobEnumInfo_flags, 0);
951
952         return offset;
953 }
954
955 static int
956 atsvc_dissect_element_JobEnumInfo_command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
957 {
958         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobEnumInfo_command_, NDR_POINTER_UNIQUE, "Pointer to Command (uint16)",hf_atsvc_atsvc_JobEnumInfo_command);
959
960         return offset;
961 }
962
963 static int
964 atsvc_dissect_element_JobEnumInfo_command_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
965 {
966         char *data;
967
968         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_atsvc_atsvc_JobEnumInfo_command, FALSE, &data);
969         proto_item_append_text(tree, ": %s", data);
970
971         return offset;
972 }
973
974 int
975 atsvc_dissect_struct_JobEnumInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
976 {
977         proto_item *item = NULL;
978         proto_tree *tree = NULL;
979         int old_offset;
980
981         ALIGN_TO_4_BYTES;
982
983         old_offset = offset;
984
985         if (parent_tree) {
986                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
987                 tree = proto_item_add_subtree(item, ett_atsvc_atsvc_JobEnumInfo);
988         }
989         
990         offset = atsvc_dissect_element_JobEnumInfo_job_id(tvb, offset, pinfo, tree, drep);
991
992         offset = atsvc_dissect_element_JobEnumInfo_job_time(tvb, offset, pinfo, tree, drep);
993
994         offset = atsvc_dissect_element_JobEnumInfo_days_of_month(tvb, offset, pinfo, tree, drep);
995
996         offset = atsvc_dissect_element_JobEnumInfo_days_of_week(tvb, offset, pinfo, tree, drep);
997
998         offset = atsvc_dissect_element_JobEnumInfo_flags(tvb, offset, pinfo, tree, drep);
999
1000         offset = atsvc_dissect_element_JobEnumInfo_command(tvb, offset, pinfo, tree, drep);
1001
1002
1003         proto_item_set_len(item, offset-old_offset);
1004
1005         return offset;
1006 }
1007
1008
1009 /* IDL: struct { */
1010 /* IDL:         uint32 entries_read; */
1011 /* IDL:         [size_is(entries_read)] [unique(1)] atsvc_JobEnumInfo *first_entry; */
1012 /* IDL: } */
1013
1014 static int
1015 atsvc_dissect_element_enum_ctr_entries_read(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1016 {
1017         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_enum_ctr_entries_read, 0);
1018
1019         return offset;
1020 }
1021
1022 static int
1023 atsvc_dissect_element_enum_ctr_first_entry(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1024 {
1025         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_enum_ctr_first_entry_, NDR_POINTER_UNIQUE, "Pointer to First Entry (atsvc_JobEnumInfo)",hf_atsvc_atsvc_enum_ctr_first_entry);
1026
1027         return offset;
1028 }
1029
1030 static int
1031 atsvc_dissect_element_enum_ctr_first_entry_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1032 {
1033         offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_enum_ctr_first_entry__);
1034
1035         return offset;
1036 }
1037
1038 static int
1039 atsvc_dissect_element_enum_ctr_first_entry__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1040 {
1041         offset = atsvc_dissect_struct_JobEnumInfo(tvb,offset,pinfo,tree,drep,hf_atsvc_atsvc_enum_ctr_first_entry,0);
1042
1043         return offset;
1044 }
1045
1046 int
1047 atsvc_dissect_struct_enum_ctr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
1048 {
1049         proto_item *item = NULL;
1050         proto_tree *tree = NULL;
1051         int old_offset;
1052
1053         ALIGN_TO_4_BYTES;
1054
1055         old_offset = offset;
1056
1057         if (parent_tree) {
1058                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
1059                 tree = proto_item_add_subtree(item, ett_atsvc_atsvc_enum_ctr);
1060         }
1061         
1062         offset = atsvc_dissect_element_enum_ctr_entries_read(tvb, offset, pinfo, tree, drep);
1063
1064         offset = atsvc_dissect_element_enum_ctr_first_entry(tvb, offset, pinfo, tree, drep);
1065
1066
1067         proto_item_set_len(item, offset-old_offset);
1068
1069         return offset;
1070 }
1071
1072 static int
1073 atsvc_dissect_element_JobAdd_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1074 {
1075         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobAdd_servername_, NDR_POINTER_UNIQUE, "Pointer to Servername (uint16)",hf_atsvc_servername);
1076
1077         return offset;
1078 }
1079
1080 static int
1081 atsvc_dissect_element_JobAdd_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1082 {
1083         char *data;
1084
1085         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_atsvc_servername, FALSE, &data);
1086         proto_item_append_text(tree, ": %s", data);
1087
1088         return offset;
1089 }
1090
1091 static int
1092 atsvc_dissect_element_JobAdd_job_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1093 {
1094         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobAdd_job_info_, NDR_POINTER_REF, "Pointer to Job Info (atsvc_JobInfo)",hf_atsvc_job_info);
1095
1096         return offset;
1097 }
1098
1099 static int
1100 atsvc_dissect_element_JobAdd_job_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1101 {
1102         offset = atsvc_dissect_struct_JobInfo(tvb,offset,pinfo,tree,drep,hf_atsvc_job_info,0);
1103
1104         return offset;
1105 }
1106
1107 static int
1108 atsvc_dissect_element_JobAdd_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1109 {
1110         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobAdd_job_id_, NDR_POINTER_REF, "Pointer to Job Id (uint32)",hf_atsvc_job_id);
1111
1112         return offset;
1113 }
1114
1115 static int
1116 atsvc_dissect_element_JobAdd_job_id_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1117 {
1118         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_job_id, 0);
1119
1120         return offset;
1121 }
1122
1123 /* IDL: NTSTATUS atsvc_JobAdd( */
1124 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *servername, */
1125 /* IDL: [in] [ref] atsvc_JobInfo *job_info, */
1126 /* IDL: [out] [ref] uint32 *job_id */
1127 /* IDL: ); */
1128
1129 static int
1130 atsvc_dissect_JobAdd_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1131 {
1132         guint32 status;
1133
1134         pinfo->dcerpc_procedure_name="JobAdd";
1135         offset = atsvc_dissect_element_JobAdd_job_id(tvb, offset, pinfo, tree, drep);
1136         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1137
1138         offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_atsvc_status, &status);
1139
1140         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1141                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, NT_errors, "Unknown NT status 0x%08x"));
1142
1143         return offset;
1144 }
1145
1146 static int
1147 atsvc_dissect_JobAdd_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1148 {
1149         pinfo->dcerpc_procedure_name="JobAdd";
1150         offset = atsvc_dissect_element_JobAdd_servername(tvb, offset, pinfo, tree, drep);
1151         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1152         offset = atsvc_dissect_element_JobAdd_job_info(tvb, offset, pinfo, tree, drep);
1153         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1154         return offset;
1155 }
1156
1157 static int
1158 atsvc_dissect_element_JobDel_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1159 {
1160         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobDel_servername_, NDR_POINTER_UNIQUE, "Pointer to Servername (uint16)",hf_atsvc_servername);
1161
1162         return offset;
1163 }
1164
1165 static int
1166 atsvc_dissect_element_JobDel_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1167 {
1168         char *data;
1169
1170         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_atsvc_servername, FALSE, &data);
1171         proto_item_append_text(tree, ": %s", data);
1172
1173         return offset;
1174 }
1175
1176 static int
1177 atsvc_dissect_element_JobDel_min_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1178 {
1179         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobDel_min_job_id, 0);
1180
1181         return offset;
1182 }
1183
1184 static int
1185 atsvc_dissect_element_JobDel_max_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1186 {
1187         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobDel_max_job_id, 0);
1188
1189         return offset;
1190 }
1191
1192 /* IDL: NTSTATUS atsvc_JobDel( */
1193 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *servername, */
1194 /* IDL: [in] uint32 min_job_id, */
1195 /* IDL: [in] uint32 max_job_id */
1196 /* IDL: ); */
1197
1198 static int
1199 atsvc_dissect_JobDel_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1200 {
1201         guint32 status;
1202
1203         pinfo->dcerpc_procedure_name="JobDel";
1204         offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_atsvc_status, &status);
1205
1206         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1207                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, NT_errors, "Unknown NT status 0x%08x"));
1208
1209         return offset;
1210 }
1211
1212 static int
1213 atsvc_dissect_JobDel_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1214 {
1215         pinfo->dcerpc_procedure_name="JobDel";
1216         offset = atsvc_dissect_element_JobDel_servername(tvb, offset, pinfo, tree, drep);
1217         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1218         offset = atsvc_dissect_element_JobDel_min_job_id(tvb, offset, pinfo, tree, drep);
1219         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1220         offset = atsvc_dissect_element_JobDel_max_job_id(tvb, offset, pinfo, tree, drep);
1221         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1222         return offset;
1223 }
1224
1225 static int
1226 atsvc_dissect_element_JobEnum_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1227 {
1228         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobEnum_servername_, NDR_POINTER_UNIQUE, "Pointer to Servername (uint16)",hf_atsvc_servername);
1229
1230         return offset;
1231 }
1232
1233 static int
1234 atsvc_dissect_element_JobEnum_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1235 {
1236         char *data;
1237
1238         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_atsvc_servername, FALSE, &data);
1239         proto_item_append_text(tree, ": %s", data);
1240
1241         return offset;
1242 }
1243
1244 static int
1245 atsvc_dissect_element_JobEnum_ctr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1246 {
1247         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobEnum_ctr_, NDR_POINTER_REF, "Pointer to Ctr (atsvc_enum_ctr)",hf_atsvc_atsvc_JobEnum_ctr);
1248
1249         return offset;
1250 }
1251
1252 static int
1253 atsvc_dissect_element_JobEnum_ctr_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1254 {
1255         offset = atsvc_dissect_struct_enum_ctr(tvb,offset,pinfo,tree,drep,hf_atsvc_atsvc_JobEnum_ctr,0);
1256
1257         return offset;
1258 }
1259
1260 static int
1261 atsvc_dissect_element_JobEnum_preferred_max_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1262 {
1263         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobEnum_preferred_max_len, 0);
1264
1265         return offset;
1266 }
1267
1268 static int
1269 atsvc_dissect_element_JobEnum_total_entries(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1270 {
1271         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobEnum_total_entries_, NDR_POINTER_REF, "Pointer to Total Entries (uint32)",hf_atsvc_atsvc_JobEnum_total_entries);
1272
1273         return offset;
1274 }
1275
1276 static int
1277 atsvc_dissect_element_JobEnum_total_entries_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1278 {
1279         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobEnum_total_entries, 0);
1280
1281         return offset;
1282 }
1283
1284 static int
1285 atsvc_dissect_element_JobEnum_resume_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1286 {
1287         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobEnum_resume_handle_, NDR_POINTER_UNIQUE, "Pointer to Resume Handle (uint32)",hf_atsvc_atsvc_JobEnum_resume_handle);
1288
1289         return offset;
1290 }
1291
1292 static int
1293 atsvc_dissect_element_JobEnum_resume_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1294 {
1295         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_atsvc_JobEnum_resume_handle, 0);
1296
1297         return offset;
1298 }
1299
1300 /* IDL: NTSTATUS atsvc_JobEnum( */
1301 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *servername, */
1302 /* IDL: [out] [in] [ref] atsvc_enum_ctr *ctr, */
1303 /* IDL: [in] uint32 preferred_max_len, */
1304 /* IDL: [out] [ref] uint32 *total_entries, */
1305 /* IDL: [out] [in] [unique(1)] uint32 *resume_handle */
1306 /* IDL: ); */
1307
1308 static int
1309 atsvc_dissect_JobEnum_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1310 {
1311         guint32 status;
1312
1313         pinfo->dcerpc_procedure_name="JobEnum";
1314         offset = atsvc_dissect_element_JobEnum_ctr(tvb, offset, pinfo, tree, drep);
1315         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1316
1317         offset = atsvc_dissect_element_JobEnum_total_entries(tvb, offset, pinfo, tree, drep);
1318         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1319
1320         offset = atsvc_dissect_element_JobEnum_resume_handle(tvb, offset, pinfo, tree, drep);
1321         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1322
1323         offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_atsvc_status, &status);
1324
1325         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1326                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, NT_errors, "Unknown NT status 0x%08x"));
1327
1328         return offset;
1329 }
1330
1331 static int
1332 atsvc_dissect_JobEnum_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1333 {
1334         pinfo->dcerpc_procedure_name="JobEnum";
1335         offset = atsvc_dissect_element_JobEnum_servername(tvb, offset, pinfo, tree, drep);
1336         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1337         offset = atsvc_dissect_element_JobEnum_ctr(tvb, offset, pinfo, tree, drep);
1338         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1339         offset = atsvc_dissect_element_JobEnum_preferred_max_len(tvb, offset, pinfo, tree, drep);
1340         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1341         offset = atsvc_dissect_element_JobEnum_resume_handle(tvb, offset, pinfo, tree, drep);
1342         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1343         return offset;
1344 }
1345
1346 static int
1347 atsvc_dissect_element_JobGetInfo_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1348 {
1349         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobGetInfo_servername_, NDR_POINTER_UNIQUE, "Pointer to Servername (uint16)",hf_atsvc_servername);
1350
1351         return offset;
1352 }
1353
1354 static int
1355 atsvc_dissect_element_JobGetInfo_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1356 {
1357         char *data;
1358
1359         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_atsvc_servername, FALSE, &data);
1360         proto_item_append_text(tree, ": %s", data);
1361
1362         return offset;
1363 }
1364
1365 static int
1366 atsvc_dissect_element_JobGetInfo_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1367 {
1368         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_atsvc_job_id, 0);
1369
1370         return offset;
1371 }
1372
1373 static int
1374 atsvc_dissect_element_JobGetInfo_job_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1375 {
1376         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobGetInfo_job_info_, NDR_POINTER_REF, "Pointer to Job Info (atsvc_JobInfo)",hf_atsvc_job_info);
1377
1378         return offset;
1379 }
1380
1381 static int
1382 atsvc_dissect_element_JobGetInfo_job_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1383 {
1384         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, atsvc_dissect_element_JobGetInfo_job_info__, NDR_POINTER_REF, "Pointer to Job Info (atsvc_JobInfo)",hf_atsvc_job_info);
1385
1386         return offset;
1387 }
1388
1389 static int
1390 atsvc_dissect_element_JobGetInfo_job_info__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1391 {
1392         offset = atsvc_dissect_struct_JobInfo(tvb,offset,pinfo,tree,drep,hf_atsvc_job_info,0);
1393
1394         return offset;
1395 }
1396
1397 /* IDL: NTSTATUS atsvc_JobGetInfo( */
1398 /* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *servername, */
1399 /* IDL: [in] uint32 job_id, */
1400 /* IDL: [out] [ref] atsvc_JobInfo **job_info */
1401 /* IDL: ); */
1402
1403 static int
1404 atsvc_dissect_JobGetInfo_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1405 {
1406         guint32 status;
1407
1408         pinfo->dcerpc_procedure_name="JobGetInfo";
1409         offset = atsvc_dissect_element_JobGetInfo_job_info(tvb, offset, pinfo, tree, drep);
1410         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1411
1412         offset = dissect_ntstatus(tvb, offset, pinfo, tree, drep, hf_atsvc_status, &status);
1413
1414         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1415                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, NT_errors, "Unknown NT status 0x%08x"));
1416
1417         return offset;
1418 }
1419
1420 static int
1421 atsvc_dissect_JobGetInfo_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1422 {
1423         pinfo->dcerpc_procedure_name="JobGetInfo";
1424         offset = atsvc_dissect_element_JobGetInfo_servername(tvb, offset, pinfo, tree, drep);
1425         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1426         offset = atsvc_dissect_element_JobGetInfo_job_id(tvb, offset, pinfo, tree, drep);
1427         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1428         return offset;
1429 }
1430
1431
1432 static dcerpc_sub_dissector atsvc_dissectors[] = {
1433         { 0, "JobAdd",
1434            atsvc_dissect_JobAdd_request, atsvc_dissect_JobAdd_response},
1435         { 1, "JobDel",
1436            atsvc_dissect_JobDel_request, atsvc_dissect_JobDel_response},
1437         { 2, "JobEnum",
1438            atsvc_dissect_JobEnum_request, atsvc_dissect_JobEnum_response},
1439         { 3, "JobGetInfo",
1440            atsvc_dissect_JobGetInfo_request, atsvc_dissect_JobGetInfo_response},
1441         { 0, NULL, NULL, NULL }
1442 };
1443
1444 void proto_register_dcerpc_atsvc(void)
1445 {
1446         static hf_register_info hf[] = {
1447         { &hf_atsvc_atsvc_Flags_JOB_NONINTERACTIVE, 
1448           { "Job Noninteractive", "atsvc.Flags.JOB_NONINTERACTIVE", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_NONINTERACTIVE_tfs), ( 0x10 ), "", HFILL }},
1449         { &hf_atsvc_atsvc_DaysOfMonth_Fourteenth, 
1450           { "Fourteenth", "atsvc.DaysOfMonth.Fourteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Fourteenth_tfs), ( 0x00002000 ), "", HFILL }},
1451         { &hf_atsvc_atsvc_Flags_JOB_RUN_PERIODICALLY, 
1452           { "Job Run Periodically", "atsvc.Flags.JOB_RUN_PERIODICALLY", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_RUN_PERIODICALLY_tfs), ( 0x01 ), "", HFILL }},
1453         { &hf_atsvc_atsvc_enum_ctr_entries_read, 
1454           { "Entries Read", "atsvc.enum_ctr.entries_read", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
1455         { &hf_atsvc_atsvc_DaysOfMonth_Twentyeighth, 
1456           { "Twentyeighth", "atsvc.DaysOfMonth.Twentyeighth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyeighth_tfs), ( 0x08000000 ), "", HFILL }},
1457         { &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY, 
1458           { "Daysofweek Monday", "atsvc.DaysOfWeek.DAYSOFWEEK_MONDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY_tfs), ( 0x01 ), "", HFILL }},
1459         { &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY, 
1460           { "Daysofweek Sunday", "atsvc.DaysOfWeek.DAYSOFWEEK_SUNDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY_tfs), ( 0x40 ), "", HFILL }},
1461         { &hf_atsvc_atsvc_DaysOfMonth_Second, 
1462           { "Second", "atsvc.DaysOfMonth.Second", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Second_tfs), ( 0x00000002 ), "", HFILL }},
1463         { &hf_atsvc_atsvc_DaysOfMonth_Twentyth, 
1464           { "Twentyth", "atsvc.DaysOfMonth.Twentyth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyth_tfs), ( 0x00080000 ), "", HFILL }},
1465         { &hf_atsvc_atsvc_DaysOfMonth_Ninth, 
1466           { "Ninth", "atsvc.DaysOfMonth.Ninth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Ninth_tfs), ( 0x00000100 ), "", HFILL }},
1467         { &hf_atsvc_servername, 
1468           { "Server", "atsvc.server", FT_STRING, BASE_HEX, NULL, 0, "Name of the server", HFILL }},
1469         { &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY, 
1470           { "Daysofweek Wednesday", "atsvc.DaysOfWeek.DAYSOFWEEK_WEDNESDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY_tfs), ( 0x04 ), "", HFILL }},
1471         { &hf_atsvc_atsvc_DaysOfMonth_Twentyninth, 
1472           { "Twentyninth", "atsvc.DaysOfMonth.Twentyninth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyninth_tfs), ( 0x10000000 ), "", HFILL }},
1473         { &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY, 
1474           { "Daysofweek Tuesday", "atsvc.DaysOfWeek.DAYSOFWEEK_TUESDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY_tfs), ( 0x02 ), "", HFILL }},
1475         { &hf_atsvc_atsvc_DaysOfMonth_Tenth, 
1476           { "Tenth", "atsvc.DaysOfMonth.Tenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Tenth_tfs), ( 0x00000200 ), "", HFILL }},
1477         { &hf_atsvc_atsvc_JobEnum_resume_handle, 
1478           { "Resume Handle", "atsvc.JobEnum.resume_handle", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
1479         { &hf_atsvc_atsvc_DaysOfMonth_Twentyseventh, 
1480           { "Twentyseventh", "atsvc.DaysOfMonth.Twentyseventh", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyseventh_tfs), ( 0x04000000 ), "", HFILL }},
1481         { &hf_atsvc_atsvc_DaysOfMonth_Fifteenth, 
1482           { "Fifteenth", "atsvc.DaysOfMonth.Fifteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Fifteenth_tfs), ( 0x00004000 ), "", HFILL }},
1483         { &hf_atsvc_atsvc_JobInfo_command, 
1484           { "Command", "atsvc.JobInfo.command", FT_STRING, BASE_DEC, NULL, 0, "", HFILL }},
1485         { &hf_atsvc_atsvc_DaysOfMonth_Ninteenth, 
1486           { "Ninteenth", "atsvc.DaysOfMonth.Ninteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Ninteenth_tfs), ( 0x00040000 ), "", HFILL }},
1487         { &hf_atsvc_atsvc_DaysOfMonth_Seventh, 
1488           { "Seventh", "atsvc.DaysOfMonth.Seventh", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Seventh_tfs), ( 0x00000040 ), "", HFILL }},
1489         { &hf_atsvc_atsvc_DaysOfMonth_Twentyfourth, 
1490           { "Twentyfourth", "atsvc.DaysOfMonth.Twentyfourth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyfourth_tfs), ( 0x00800000 ), "", HFILL }},
1491         { &hf_atsvc_atsvc_DaysOfMonth_Seventeenth, 
1492           { "Seventeenth", "atsvc.DaysOfMonth.Seventeenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Seventeenth_tfs), ( 0x00010000 ), "", HFILL }},
1493         { &hf_atsvc_opnum, 
1494           { "Operation", "atsvc.opnum", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
1495         { &hf_atsvc_atsvc_DaysOfMonth_Twelfth, 
1496           { "Twelfth", "atsvc.DaysOfMonth.Twelfth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twelfth_tfs), ( 0x00000800 ), "", HFILL }},
1497         { &hf_atsvc_atsvc_DaysOfMonth_Eighteenth, 
1498           { "Eighteenth", "atsvc.DaysOfMonth.Eighteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Eighteenth_tfs), ( 0x00020000 ), "", HFILL }},
1499         { &hf_atsvc_atsvc_Flags_JOB_RUNS_TODAY, 
1500           { "Job Runs Today", "atsvc.Flags.JOB_RUNS_TODAY", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_RUNS_TODAY_tfs), ( 0x04 ), "", HFILL }},
1501         { &hf_atsvc_atsvc_JobEnum_total_entries, 
1502           { "Total Entries", "atsvc.JobEnum.total_entries", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
1503         { &hf_atsvc_atsvc_enum_ctr_first_entry, 
1504           { "First Entry", "atsvc.enum_ctr.first_entry", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
1505         { &hf_atsvc_atsvc_JobEnumInfo_job_time, 
1506           { "Job Time", "atsvc.JobEnumInfo.job_time", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
1507         { &hf_atsvc_atsvc_DaysOfMonth_Thirtyfirst, 
1508           { "Thirtyfirst", "atsvc.DaysOfMonth.Thirtyfirst", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Thirtyfirst_tfs), ( 0x40000000 ), "", HFILL }},
1509         { &hf_atsvc_atsvc_DaysOfMonth_Third, 
1510           { "Third", "atsvc.DaysOfMonth.Third", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Third_tfs), ( 0x00000004 ), "", HFILL }},
1511         { &hf_atsvc_atsvc_JobEnum_preferred_max_len, 
1512           { "Preferred Max Len", "atsvc.JobEnum.preferred_max_len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
1513         { &hf_atsvc_atsvc_JobEnumInfo_days_of_month, 
1514           { "Days Of Month", "atsvc.JobEnumInfo.days_of_month", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
1515         { &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY, 
1516           { "Daysofweek Thursday", "atsvc.DaysOfWeek.DAYSOFWEEK_THURSDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY_tfs), ( 0x08 ), "", HFILL }},
1517         { &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY, 
1518           { "Daysofweek Friday", "atsvc.DaysOfWeek.DAYSOFWEEK_FRIDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY_tfs), ( 0x10 ), "", HFILL }},
1519         { &hf_atsvc_atsvc_DaysOfMonth_Twentythird, 
1520           { "Twentythird", "atsvc.DaysOfMonth.Twentythird", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentythird_tfs), ( 0x00400000 ), "", HFILL }},
1521         { &hf_atsvc_atsvc_JobInfo_job_time, 
1522           { "Job Time", "atsvc.JobInfo.job_time", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
1523         { &hf_atsvc_status, 
1524           { "NT Error", "atsvc.status", FT_UINT32, BASE_HEX, VALS(NT_errors), 0, "", HFILL }},
1525         { &hf_atsvc_atsvc_JobInfo_flags, 
1526           { "Flags", "atsvc.JobInfo.flags", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
1527         { &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY, 
1528           { "Daysofweek Saturday", "atsvc.DaysOfWeek.DAYSOFWEEK_SATURDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY_tfs), ( 0x20 ), "", HFILL }},
1529         { &hf_atsvc_atsvc_DaysOfMonth_Sixth, 
1530           { "Sixth", "atsvc.DaysOfMonth.Sixth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Sixth_tfs), ( 0x00000020 ), "", HFILL }},
1531         { &hf_atsvc_job_id, 
1532           { "Job Id", "atsvc.job_id", FT_UINT32, BASE_DEC, NULL, 0, "Identifier of the scheduled job", HFILL }},
1533         { &hf_atsvc_atsvc_DaysOfMonth_Twentysixth, 
1534           { "Twentysixth", "atsvc.DaysOfMonth.Twentysixth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentysixth_tfs), ( 0x02000000 ), "", HFILL }},
1535         { &hf_atsvc_atsvc_DaysOfMonth_Fifth, 
1536           { "Fifth", "atsvc.DaysOfMonth.Fifth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Fifth_tfs), ( 0x00000010 ), "", HFILL }},
1537         { &hf_atsvc_atsvc_DaysOfMonth_Fourth, 
1538           { "Fourth", "atsvc.DaysOfMonth.Fourth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Fourth_tfs), ( 0x00000008 ), "", HFILL }},
1539         { &hf_atsvc_job_info, 
1540           { "JobInfo", "atcvs.job_info", FT_NONE, BASE_HEX, NULL, 0, "JobInfo structure", HFILL }},
1541         { &hf_atsvc_atsvc_DaysOfMonth_Eleventh, 
1542           { "Eleventh", "atsvc.DaysOfMonth.Eleventh", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Eleventh_tfs), ( 0x00000400 ), "", HFILL }},
1543         { &hf_atsvc_atsvc_DaysOfMonth_Sixteenth, 
1544           { "Sixteenth", "atsvc.DaysOfMonth.Sixteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Sixteenth_tfs), ( 0x00008000 ), "", HFILL }},
1545         { &hf_atsvc_atsvc_Flags_JOB_ADD_CURRENT_DATE, 
1546           { "Job Add Current Date", "atsvc.Flags.JOB_ADD_CURRENT_DATE", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_ADD_CURRENT_DATE_tfs), ( 0x08 ), "", HFILL }},
1547         { &hf_atsvc_atsvc_JobEnum_ctr, 
1548           { "Ctr", "atsvc.JobEnum.ctr", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
1549         { &hf_atsvc_atsvc_DaysOfMonth_Twentyfifth, 
1550           { "Twentyfifth", "atsvc.DaysOfMonth.Twentyfifth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyfifth_tfs), ( 0x01000000 ), "", HFILL }},
1551         { &hf_atsvc_atsvc_JobInfo_days_of_month, 
1552           { "Days Of Month", "atsvc.JobInfo.days_of_month", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
1553         { &hf_atsvc_atsvc_DaysOfMonth_Twentysecond, 
1554           { "Twentysecond", "atsvc.DaysOfMonth.Twentysecond", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentysecond_tfs), ( 0x00200000 ), "", HFILL }},
1555         { &hf_atsvc_atsvc_DaysOfMonth_First, 
1556           { "First", "atsvc.DaysOfMonth.First", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_First_tfs), ( 0x00000001 ), "", HFILL }},
1557         { &hf_atsvc_atsvc_JobEnumInfo_command, 
1558           { "Command", "atsvc.JobEnumInfo.command", FT_STRING, BASE_DEC, NULL, 0, "", HFILL }},
1559         { &hf_atsvc_atsvc_DaysOfMonth_Thirtieth, 
1560           { "Thirtieth", "atsvc.DaysOfMonth.Thirtieth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Thirtieth_tfs), ( 0x20000000 ), "", HFILL }},
1561         { &hf_atsvc_atsvc_DaysOfMonth_Eight, 
1562           { "Eight", "atsvc.DaysOfMonth.Eight", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Eight_tfs), ( 0x00000080 ), "", HFILL }},
1563         { &hf_atsvc_atsvc_DaysOfMonth_Twentyfirst, 
1564           { "Twentyfirst", "atsvc.DaysOfMonth.Twentyfirst", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyfirst_tfs), ( 0x00100000 ), "", HFILL }},
1565         { &hf_atsvc_atsvc_Flags_JOB_EXEC_ERROR, 
1566           { "Job Exec Error", "atsvc.Flags.JOB_EXEC_ERROR", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_EXEC_ERROR_tfs), ( 0x02 ), "", HFILL }},
1567         { &hf_atsvc_atsvc_JobInfo_days_of_week, 
1568           { "Days Of Week", "atsvc.JobInfo.days_of_week", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
1569         { &hf_atsvc_atsvc_JobDel_min_job_id, 
1570           { "Min Job Id", "atsvc.JobDel.min_job_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
1571         { &hf_atsvc_atsvc_JobEnumInfo_days_of_week, 
1572           { "Days Of Week", "atsvc.JobEnumInfo.days_of_week", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
1573         { &hf_atsvc_atsvc_JobEnumInfo_flags, 
1574           { "Flags", "atsvc.JobEnumInfo.flags", FT_UINT8, BASE_HEX, NULL, 0, "", HFILL }},
1575         { &hf_atsvc_atsvc_JobDel_max_job_id, 
1576           { "Max Job Id", "atsvc.JobDel.max_job_id", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
1577         { &hf_atsvc_atsvc_DaysOfMonth_Thitteenth, 
1578           { "Thitteenth", "atsvc.DaysOfMonth.Thitteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Thitteenth_tfs), ( 0x00001000 ), "", HFILL }},
1579         };
1580
1581
1582         static gint *ett[] = {
1583                 &ett_dcerpc_atsvc,
1584                 &ett_atsvc_atsvc_DaysOfMonth,
1585                 &ett_atsvc_atsvc_Flags,
1586                 &ett_atsvc_atsvc_DaysOfWeek,
1587                 &ett_atsvc_atsvc_JobInfo,
1588                 &ett_atsvc_atsvc_JobEnumInfo,
1589                 &ett_atsvc_atsvc_enum_ctr,
1590         };
1591
1592         proto_dcerpc_atsvc = proto_register_protocol("Microsoft AT-Scheduler Service", "ATSVC", "atsvc");
1593         proto_register_field_array(proto_dcerpc_atsvc, hf, array_length (hf));
1594         proto_register_subtree_array(ett, array_length(ett));
1595 }
1596
1597 void proto_reg_handoff_dcerpc_atsvc(void)
1598 {
1599         dcerpc_init_uuid(proto_dcerpc_atsvc, ett_dcerpc_atsvc,
1600                 &uuid_dcerpc_atsvc, ver_dcerpc_atsvc,
1601                 atsvc_dissectors, hf_atsvc_opnum);
1602 }