summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-atsvc.c
blob: 908c7ba370fe211ef9edc9ee5fd3d315b6d67cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
/* DO NOT EDIT
	This file was automatically generated by Pidl
	from atsvc.idl and atsvc.cnf.

	Pidl is a perl based IDL compiler for DCE/RPC idl files.
	It is maintained by the Samba team, not the Wireshark team.
	Instructions on how to download and install Pidl can be
	found at https://gitlab.com/wireshark/wireshark/-/wikis/Pidl
*/


#include "config.h"
#include <glib.h>
#include <string.h>
#include <epan/packet.h>

#include "packet-dcerpc.h"
#include "packet-dcerpc-nt.h"
#include "packet-windows-common.h"
#include "packet-dcerpc-atsvc.h"
void proto_register_dcerpc_atsvc(void);
void proto_reg_handoff_dcerpc_atsvc(void);

/* Ett declarations */
static gint ett_dcerpc_atsvc = -1;
static gint ett_atsvc_atsvc_DaysOfMonth = -1;
static gint ett_atsvc_atsvc_Flags = -1;
static gint ett_atsvc_atsvc_DaysOfWeek = -1;
static gint ett_atsvc_atsvc_JobInfo = -1;
static gint ett_atsvc_atsvc_JobEnumInfo = -1;
static gint ett_atsvc_atsvc_enum_ctr = -1;


/* Header field declarations */
static gint hf_atsvc_atsvc_DaysOfMonth_Eight = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Eighteenth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Eleventh = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Fifteenth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Fifth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_First = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Fourteenth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Fourth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Ninteenth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Ninth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Second = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Seventeenth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Seventh = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Sixteenth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Sixth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Tenth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Third = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Thirtieth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Thirtyfirst = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Thitteenth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twelfth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentyeighth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentyfifth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentyfirst = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentyfourth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentyninth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentysecond = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentyseventh = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentysixth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentyth = -1;
static gint hf_atsvc_atsvc_DaysOfMonth_Twentythird = -1;
static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY = -1;
static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY = -1;
static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY = -1;
static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY = -1;
static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY = -1;
static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY = -1;
static gint hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY = -1;
static gint hf_atsvc_atsvc_Flags_JOB_ADD_CURRENT_DATE = -1;
static gint hf_atsvc_atsvc_Flags_JOB_EXEC_ERROR = -1;
static gint hf_atsvc_atsvc_Flags_JOB_NONINTERACTIVE = -1;
static gint hf_atsvc_atsvc_Flags_JOB_RUNS_TODAY = -1;
static gint hf_atsvc_atsvc_Flags_JOB_RUN_PERIODICALLY = -1;
static gint hf_atsvc_atsvc_JobDel_max_job_id = -1;
static gint hf_atsvc_atsvc_JobDel_min_job_id = -1;
static gint hf_atsvc_atsvc_JobEnumInfo_command = -1;
static gint hf_atsvc_atsvc_JobEnumInfo_days_of_month = -1;
static gint hf_atsvc_atsvc_JobEnumInfo_days_of_week = -1;
static gint hf_atsvc_atsvc_JobEnumInfo_flags = -1;
static gint hf_atsvc_atsvc_JobEnumInfo_job_time = -1;
static gint hf_atsvc_atsvc_JobEnum_ctr = -1;
static gint hf_atsvc_atsvc_JobEnum_preferred_max_len = -1;
static gint hf_atsvc_atsvc_JobEnum_resume_handle = -1;
static gint hf_atsvc_atsvc_JobEnum_total_entries = -1;
static gint hf_atsvc_atsvc_JobInfo_command = -1;
static gint hf_atsvc_atsvc_JobInfo_days_of_month = -1;
static gint hf_atsvc_atsvc_JobInfo_days_of_week = -1;
static gint hf_atsvc_atsvc_JobInfo_flags = -1;
static gint hf_atsvc_atsvc_JobInfo_job_time = -1;
static gint hf_atsvc_atsvc_enum_ctr_entries_read = -1;
static gint hf_atsvc_atsvc_enum_ctr_first_entry = -1;
static gint hf_atsvc_job_id = -1;
static gint hf_atsvc_job_info = -1;
static gint hf_atsvc_opnum = -1;
static gint hf_atsvc_servername = -1;
static gint hf_atsvc_status = -1;

static gint proto_dcerpc_atsvc = -1;
/* Version information */


static e_guid_t uuid_dcerpc_atsvc = {
	0x1ff70682, 0x0a51, 0x30e8,
	{ 0x07, 0x6d, 0x74, 0x0b, 0xe8, 0xce, 0xe9, 0x8b }
};
static guint16 ver_dcerpc_atsvc = 1;

static const true_false_string atsvc_DaysOfMonth_First_tfs = {
   "First is SET",
   "First is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Second_tfs = {
   "Second is SET",
   "Second is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Third_tfs = {
   "Third is SET",
   "Third is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Fourth_tfs = {
   "Fourth is SET",
   "Fourth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Fifth_tfs = {
   "Fifth is SET",
   "Fifth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Sixth_tfs = {
   "Sixth is SET",
   "Sixth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Seventh_tfs = {
   "Seventh is SET",
   "Seventh is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Eight_tfs = {
   "Eight is SET",
   "Eight is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Ninth_tfs = {
   "Ninth is SET",
   "Ninth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Tenth_tfs = {
   "Tenth is SET",
   "Tenth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Eleventh_tfs = {
   "Eleventh is SET",
   "Eleventh is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twelfth_tfs = {
   "Twelfth is SET",
   "Twelfth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Thitteenth_tfs = {
   "Thitteenth is SET",
   "Thitteenth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Fourteenth_tfs = {
   "Fourteenth is SET",
   "Fourteenth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Fifteenth_tfs = {
   "Fifteenth is SET",
   "Fifteenth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Sixteenth_tfs = {
   "Sixteenth is SET",
   "Sixteenth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Seventeenth_tfs = {
   "Seventeenth is SET",
   "Seventeenth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Eighteenth_tfs = {
   "Eighteenth is SET",
   "Eighteenth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Ninteenth_tfs = {
   "Ninteenth is SET",
   "Ninteenth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentyth_tfs = {
   "Twentyth is SET",
   "Twentyth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentyfirst_tfs = {
   "Twentyfirst is SET",
   "Twentyfirst is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentysecond_tfs = {
   "Twentysecond is SET",
   "Twentysecond is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentythird_tfs = {
   "Twentythird is SET",
   "Twentythird is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentyfourth_tfs = {
   "Twentyfourth is SET",
   "Twentyfourth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentyfifth_tfs = {
   "Twentyfifth is SET",
   "Twentyfifth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentysixth_tfs = {
   "Twentysixth is SET",
   "Twentysixth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentyseventh_tfs = {
   "Twentyseventh is SET",
   "Twentyseventh is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentyeighth_tfs = {
   "Twentyeighth is SET",
   "Twentyeighth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Twentyninth_tfs = {
   "Twentyninth is SET",
   "Twentyninth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Thirtieth_tfs = {
   "Thirtieth is SET",
   "Thirtieth is NOT SET",
};
static const true_false_string atsvc_DaysOfMonth_Thirtyfirst_tfs = {
   "Thirtyfirst is SET",
   "Thirtyfirst is NOT SET",
};
static const true_false_string atsvc_Flags_JOB_RUN_PERIODICALLY_tfs = {
   "JOB_RUN_PERIODICALLY is SET",
   "JOB_RUN_PERIODICALLY is NOT SET",
};
static const true_false_string atsvc_Flags_JOB_EXEC_ERROR_tfs = {
   "JOB_EXEC_ERROR is SET",
   "JOB_EXEC_ERROR is NOT SET",
};
static const true_false_string atsvc_Flags_JOB_RUNS_TODAY_tfs = {
   "JOB_RUNS_TODAY is SET",
   "JOB_RUNS_TODAY is NOT SET",
};
static const true_false_string atsvc_Flags_JOB_ADD_CURRENT_DATE_tfs = {
   "JOB_ADD_CURRENT_DATE is SET",
   "JOB_ADD_CURRENT_DATE is NOT SET",
};
static const true_false_string atsvc_Flags_JOB_NONINTERACTIVE_tfs = {
   "JOB_NONINTERACTIVE is SET",
   "JOB_NONINTERACTIVE is NOT SET",
};
static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY_tfs = {
   "DAYSOFWEEK_MONDAY is SET",
   "DAYSOFWEEK_MONDAY is NOT SET",
};
static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY_tfs = {
   "DAYSOFWEEK_TUESDAY is SET",
   "DAYSOFWEEK_TUESDAY is NOT SET",
};
static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY_tfs = {
   "DAYSOFWEEK_WEDNESDAY is SET",
   "DAYSOFWEEK_WEDNESDAY is NOT SET",
};
static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY_tfs = {
   "DAYSOFWEEK_THURSDAY is SET",
   "DAYSOFWEEK_THURSDAY is NOT SET",
};
static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY_tfs = {
   "DAYSOFWEEK_FRIDAY is SET",
   "DAYSOFWEEK_FRIDAY is NOT SET",
};
static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY_tfs = {
   "DAYSOFWEEK_SATURDAY is SET",
   "DAYSOFWEEK_SATURDAY is NOT SET",
};
static const true_false_string atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY_tfs = {
   "DAYSOFWEEK_SUNDAY is SET",
   "DAYSOFWEEK_SUNDAY is NOT SET",
};
static int atsvc_dissect_element_JobInfo_job_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobInfo_days_of_month(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobInfo_days_of_week(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobInfo_command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobInfo_command_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnumInfo_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnumInfo_job_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnumInfo_days_of_month(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnumInfo_days_of_week(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnumInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnumInfo_command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnumInfo_command_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_enum_ctr_entries_read(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_enum_ctr_first_entry(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_enum_ctr_first_entry_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_enum_ctr_first_entry__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobAdd_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobAdd_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobAdd_job_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobAdd_job_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobAdd_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobAdd_job_id_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobDel_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobDel_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobDel_min_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobDel_max_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_ctr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_ctr_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_preferred_max_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_total_entries(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_total_entries_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_resume_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobEnum_resume_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobGetInfo_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobGetInfo_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobGetInfo_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobGetInfo_job_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobGetInfo_job_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);
static int atsvc_dissect_element_JobGetInfo_job_info__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_);


/* IDL: bitmap { */
/* IDL: 	First =  0x00000001 , */
/* IDL: 	Second =  0x00000002 , */
/* IDL: 	Third =  0x00000004 , */
/* IDL: 	Fourth =  0x00000008 , */
/* IDL: 	Fifth =  0x00000010 , */
/* IDL: 	Sixth =  0x00000020 , */
/* IDL: 	Seventh =  0x00000040 , */
/* IDL: 	Eight =  0x00000080 , */
/* IDL: 	Ninth =  0x00000100 , */
/* IDL: 	Tenth =  0x00000200 , */
/* IDL: 	Eleventh =  0x00000400 , */
/* IDL: 	Twelfth =  0x00000800 , */
/* IDL: 	Thitteenth =  0x00001000 , */
/* IDL: 	Fourteenth =  0x00002000 , */
/* IDL: 	Fifteenth =  0x00004000 , */
/* IDL: 	Sixteenth =  0x00008000 , */
/* IDL: 	Seventeenth =  0x00010000 , */
/* IDL: 	Eighteenth =  0x00020000 , */
/* IDL: 	Ninteenth =  0x00040000 , */
/* IDL: 	Twentyth =  0x00080000 , */
/* IDL: 	Twentyfirst =  0x00100000 , */
/* IDL: 	Twentysecond =  0x00200000 , */
/* IDL: 	Twentythird =  0x00400000 , */
/* IDL: 	Twentyfourth =  0x00800000 , */
/* IDL: 	Twentyfifth =  0x01000000 , */
/* IDL: 	Twentysixth =  0x02000000 , */
/* IDL: 	Twentyseventh =  0x04000000 , */
/* IDL: 	Twentyeighth =  0x08000000 , */
/* IDL: 	Twentyninth =  0x10000000 , */
/* IDL: 	Thirtieth =  0x20000000 , */
/* IDL: 	Thirtyfirst =  0x40000000 , */
/* IDL: } */

int
atsvc_dissect_bitmap_DaysOfMonth(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
	proto_item *item;
	static int * const atsvc_atsvc_DaysOfMonth_fields[] = {
		&hf_atsvc_atsvc_DaysOfMonth_First,
		&hf_atsvc_atsvc_DaysOfMonth_Second,
		&hf_atsvc_atsvc_DaysOfMonth_Third,
		&hf_atsvc_atsvc_DaysOfMonth_Fourth,
		&hf_atsvc_atsvc_DaysOfMonth_Fifth,
		&hf_atsvc_atsvc_DaysOfMonth_Sixth,
		&hf_atsvc_atsvc_DaysOfMonth_Seventh,
		&hf_atsvc_atsvc_DaysOfMonth_Eight,
		&hf_atsvc_atsvc_DaysOfMonth_Ninth,
		&hf_atsvc_atsvc_DaysOfMonth_Tenth,
		&hf_atsvc_atsvc_DaysOfMonth_Eleventh,
		&hf_atsvc_atsvc_DaysOfMonth_Twelfth,
		&hf_atsvc_atsvc_DaysOfMonth_Thitteenth,
		&hf_atsvc_atsvc_DaysOfMonth_Fourteenth,
		&hf_atsvc_atsvc_DaysOfMonth_Fifteenth,
		&hf_atsvc_atsvc_DaysOfMonth_Sixteenth,
		&hf_atsvc_atsvc_DaysOfMonth_Seventeenth,
		&hf_atsvc_atsvc_DaysOfMonth_Eighteenth,
		&hf_atsvc_atsvc_DaysOfMonth_Ninteenth,
		&hf_atsvc_atsvc_DaysOfMonth_Twentyth,
		&hf_atsvc_atsvc_DaysOfMonth_Twentyfirst,
		&hf_atsvc_atsvc_DaysOfMonth_Twentysecond,
		&hf_atsvc_atsvc_DaysOfMonth_Twentythird,
		&hf_atsvc_atsvc_DaysOfMonth_Twentyfourth,
		&hf_atsvc_atsvc_DaysOfMonth_Twentyfifth,
		&hf_atsvc_atsvc_DaysOfMonth_Twentysixth,
		&hf_atsvc_atsvc_DaysOfMonth_Twentyseventh,
		&hf_atsvc_atsvc_DaysOfMonth_Twentyeighth,
		&hf_atsvc_atsvc_DaysOfMonth_Twentyninth,
		&hf_atsvc_atsvc_DaysOfMonth_Thirtieth,
		&hf_atsvc_atsvc_DaysOfMonth_Thirtyfirst,
		NULL
	};
	guint32 flags;
	ALIGN_TO_4_BYTES;

	item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index,
				ett_atsvc_atsvc_DaysOfMonth, atsvc_atsvc_DaysOfMonth_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE);

	offset = dissect_ndr_uint32(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags);

	if (!flags)
		proto_item_append_text(item, ": (No values set)");

	if (flags & (~0x7fffffff)) {
		flags &= (~0x7fffffff);
		proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
	}

	return offset;
}


/* IDL: bitmap { */
/* IDL: 	JOB_RUN_PERIODICALLY =  0x01 , */
/* IDL: 	JOB_EXEC_ERROR =  0x02 , */
/* IDL: 	JOB_RUNS_TODAY =  0x04 , */
/* IDL: 	JOB_ADD_CURRENT_DATE =  0x08 , */
/* IDL: 	JOB_NONINTERACTIVE =  0x10 , */
/* IDL: } */

int
atsvc_dissect_bitmap_Flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
	proto_item *item;
	static int * const atsvc_atsvc_Flags_fields[] = {
		&hf_atsvc_atsvc_Flags_JOB_RUN_PERIODICALLY,
		&hf_atsvc_atsvc_Flags_JOB_EXEC_ERROR,
		&hf_atsvc_atsvc_Flags_JOB_RUNS_TODAY,
		&hf_atsvc_atsvc_Flags_JOB_ADD_CURRENT_DATE,
		&hf_atsvc_atsvc_Flags_JOB_NONINTERACTIVE,
		NULL
	};
	guint8 flags;

	item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index,
				ett_atsvc_atsvc_Flags, atsvc_atsvc_Flags_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE);

	offset = dissect_ndr_uint8(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags);

	if (!flags)
		proto_item_append_text(item, ": (No values set)");

	if (flags & (~0x0000001f)) {
		flags &= (~0x0000001f);
		proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
	}

	return offset;
}


/* IDL: bitmap { */
/* IDL: 	DAYSOFWEEK_MONDAY =  0x01 , */
/* IDL: 	DAYSOFWEEK_TUESDAY =  0x02 , */
/* IDL: 	DAYSOFWEEK_WEDNESDAY =  0x04 , */
/* IDL: 	DAYSOFWEEK_THURSDAY =  0x08 , */
/* IDL: 	DAYSOFWEEK_FRIDAY =  0x10 , */
/* IDL: 	DAYSOFWEEK_SATURDAY =  0x20 , */
/* IDL: 	DAYSOFWEEK_SUNDAY =  0x40 , */
/* IDL: } */

int
atsvc_dissect_bitmap_DaysOfWeek(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
	proto_item *item;
	static int * const atsvc_atsvc_DaysOfWeek_fields[] = {
		&hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY,
		&hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY,
		&hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY,
		&hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY,
		&hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY,
		&hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY,
		&hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY,
		NULL
	};
	guint8 flags;

	item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_index,
				ett_atsvc_atsvc_DaysOfWeek, atsvc_atsvc_DaysOfWeek_fields, DREP_ENC_INTEGER(drep), BMT_NO_FALSE);

	offset = dissect_ndr_uint8(tvb, offset, pinfo, parent_tree, di, drep, -1, &flags);

	if (!flags)
		proto_item_append_text(item, ": (No values set)");

	if (flags & (~0x0000007f)) {
		flags &= (~0x0000007f);
		proto_item_append_text(item, "Unknown bitmap value 0x%x", flags);
	}

	return offset;
}


/* IDL: struct { */
/* IDL: 	uint32 job_time; */
/* IDL: 	atsvc_DaysOfMonth days_of_month; */
/* IDL: 	atsvc_DaysOfWeek days_of_week; */
/* IDL: 	atsvc_Flags flags; */
/* IDL: 	[charset(UTF16)] [unique(1)] uint16 *command; */
/* IDL: } */

static int
atsvc_dissect_element_JobInfo_job_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobInfo_job_time, 0);

	return offset;
}

static int
atsvc_dissect_element_JobInfo_days_of_month(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_bitmap_DaysOfMonth(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobInfo_days_of_month, 0);

	return offset;
}

static int
atsvc_dissect_element_JobInfo_days_of_week(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_bitmap_DaysOfWeek(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobInfo_days_of_week, 0);

	return offset;
}

static int
atsvc_dissect_element_JobInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_bitmap_Flags(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobInfo_flags, 0);

	return offset;
}

static int
atsvc_dissect_element_JobInfo_command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobInfo_command_, NDR_POINTER_UNIQUE, "Pointer to Command (uint16)",hf_atsvc_atsvc_JobInfo_command);

	return offset;
}

static int
atsvc_dissect_element_JobInfo_command_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_atsvc_atsvc_JobInfo_command, FALSE, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

int
atsvc_dissect_struct_JobInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
	proto_item *item = NULL;
	proto_tree *tree = NULL;
	int old_offset;

	ALIGN_TO_5_BYTES;

	old_offset = offset;

	if (parent_tree) {
		item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
		tree = proto_item_add_subtree(item, ett_atsvc_atsvc_JobInfo);
	}

	offset = atsvc_dissect_element_JobInfo_job_time(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobInfo_days_of_month(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobInfo_days_of_week(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobInfo_flags(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobInfo_command(tvb, offset, pinfo, tree, di, drep);


	proto_item_set_len(item, offset-old_offset);


	if (di->call_data->flags & DCERPC_IS_NDR64) {
		ALIGN_TO_5_BYTES;
	}

	return offset;
}


/* IDL: struct { */
/* IDL: 	uint32 job_id; */
/* IDL: 	uint32 job_time; */
/* IDL: 	atsvc_DaysOfMonth days_of_month; */
/* IDL: 	atsvc_DaysOfWeek days_of_week; */
/* IDL: 	atsvc_Flags flags; */
/* IDL: 	[charset(UTF16)] [unique(1)] uint16 *command; */
/* IDL: } */

static int
atsvc_dissect_element_JobEnumInfo_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_job_id, 0);

	return offset;
}

static int
atsvc_dissect_element_JobEnumInfo_job_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobEnumInfo_job_time, 0);

	return offset;
}

static int
atsvc_dissect_element_JobEnumInfo_days_of_month(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_bitmap_DaysOfMonth(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobEnumInfo_days_of_month, 0);

	return offset;
}

static int
atsvc_dissect_element_JobEnumInfo_days_of_week(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_bitmap_DaysOfWeek(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobEnumInfo_days_of_week, 0);

	return offset;
}

static int
atsvc_dissect_element_JobEnumInfo_flags(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_bitmap_Flags(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobEnumInfo_flags, 0);

	return offset;
}

static int
atsvc_dissect_element_JobEnumInfo_command(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobEnumInfo_command_, NDR_POINTER_UNIQUE, "Pointer to Command (uint16)",hf_atsvc_atsvc_JobEnumInfo_command);

	return offset;
}

static int
atsvc_dissect_element_JobEnumInfo_command_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_atsvc_atsvc_JobEnumInfo_command, FALSE, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

int
atsvc_dissect_struct_JobEnumInfo(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
	proto_item *item = NULL;
	proto_tree *tree = NULL;
	int old_offset;

	ALIGN_TO_5_BYTES;

	old_offset = offset;

	if (parent_tree) {
		item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
		tree = proto_item_add_subtree(item, ett_atsvc_atsvc_JobEnumInfo);
	}

	offset = atsvc_dissect_element_JobEnumInfo_job_id(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobEnumInfo_job_time(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobEnumInfo_days_of_month(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobEnumInfo_days_of_week(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobEnumInfo_flags(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_JobEnumInfo_command(tvb, offset, pinfo, tree, di, drep);


	proto_item_set_len(item, offset-old_offset);


	if (di->call_data->flags & DCERPC_IS_NDR64) {
		ALIGN_TO_5_BYTES;
	}

	return offset;
}


/* IDL: struct { */
/* IDL: 	uint32 entries_read; */
/* IDL: 	[size_is(entries_read)] [unique(1)] atsvc_JobEnumInfo *first_entry; */
/* IDL: } */

static int
atsvc_dissect_element_enum_ctr_entries_read(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_enum_ctr_entries_read, 0);

	return offset;
}

static int
atsvc_dissect_element_enum_ctr_first_entry(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_enum_ctr_first_entry_, NDR_POINTER_UNIQUE, "Pointer to First Entry (atsvc_JobEnumInfo)",hf_atsvc_atsvc_enum_ctr_first_entry);

	return offset;
}

static int
atsvc_dissect_element_enum_ctr_first_entry_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_enum_ctr_first_entry__);

	return offset;
}

static int
atsvc_dissect_element_enum_ctr_first_entry__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_struct_JobEnumInfo(tvb,offset,pinfo,tree,di,drep,hf_atsvc_atsvc_enum_ctr_first_entry,0);

	return offset;
}

int
atsvc_dissect_struct_enum_ctr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, dcerpc_info* di _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
{
	proto_item *item = NULL;
	proto_tree *tree = NULL;
	int old_offset;

	ALIGN_TO_5_BYTES;

	old_offset = offset;

	if (parent_tree) {
		item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, ENC_NA);
		tree = proto_item_add_subtree(item, ett_atsvc_atsvc_enum_ctr);
	}

	offset = atsvc_dissect_element_enum_ctr_entries_read(tvb, offset, pinfo, tree, di, drep);

	offset = atsvc_dissect_element_enum_ctr_first_entry(tvb, offset, pinfo, tree, di, drep);


	proto_item_set_len(item, offset-old_offset);


	if (di->call_data->flags & DCERPC_IS_NDR64) {
		ALIGN_TO_5_BYTES;
	}

	return offset;
}

static int
atsvc_dissect_element_JobAdd_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobAdd_servername_, NDR_POINTER_UNIQUE, "Pointer to Servername (uint16)",hf_atsvc_servername);

	return offset;
}

static int
atsvc_dissect_element_JobAdd_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_atsvc_servername, FALSE, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static int
atsvc_dissect_element_JobAdd_job_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobAdd_job_info_, NDR_POINTER_REF, "Pointer to Job Info (atsvc_JobInfo)",hf_atsvc_job_info);

	return offset;
}

static int
atsvc_dissect_element_JobAdd_job_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_struct_JobInfo(tvb,offset,pinfo,tree,di,drep,hf_atsvc_job_info,0);

	return offset;
}

static int
atsvc_dissect_element_JobAdd_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobAdd_job_id_, NDR_POINTER_REF, "Pointer to Job Id (uint32)",hf_atsvc_job_id);

	return offset;
}

static int
atsvc_dissect_element_JobAdd_job_id_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_job_id, 0);

	return offset;
}

/* IDL: NTSTATUS atsvc_JobAdd( */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *servername, */
/* IDL: [in] [ref] atsvc_JobInfo *job_info, */
/* IDL: [out] [ref] uint32 *job_id */
/* IDL: ); */

static int
atsvc_dissect_JobAdd_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	guint32 status;

	di->dcerpc_procedure_name="JobAdd";
	offset = atsvc_dissect_element_JobAdd_job_id(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = dissect_ntstatus(tvb, offset, pinfo, tree, di, drep, hf_atsvc_status, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, NT_errors, "Unknown NT status 0x%08x"));

	return offset;
}

static int
atsvc_dissect_JobAdd_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	di->dcerpc_procedure_name="JobAdd";
	offset = atsvc_dissect_element_JobAdd_servername(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = atsvc_dissect_element_JobAdd_job_info(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	return offset;
}

static int
atsvc_dissect_element_JobDel_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobDel_servername_, NDR_POINTER_UNIQUE, "Pointer to Servername (uint16)",hf_atsvc_servername);

	return offset;
}

static int
atsvc_dissect_element_JobDel_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_atsvc_servername, FALSE, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static int
atsvc_dissect_element_JobDel_min_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobDel_min_job_id, 0);

	return offset;
}

static int
atsvc_dissect_element_JobDel_max_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobDel_max_job_id, 0);

	return offset;
}

/* IDL: NTSTATUS atsvc_JobDel( */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *servername, */
/* IDL: [in] uint32 min_job_id, */
/* IDL: [in] uint32 max_job_id */
/* IDL: ); */

static int
atsvc_dissect_JobDel_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	guint32 status;

	di->dcerpc_procedure_name="JobDel";
	offset = dissect_ntstatus(tvb, offset, pinfo, tree, di, drep, hf_atsvc_status, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, NT_errors, "Unknown NT status 0x%08x"));

	return offset;
}

static int
atsvc_dissect_JobDel_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	di->dcerpc_procedure_name="JobDel";
	offset = atsvc_dissect_element_JobDel_servername(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = atsvc_dissect_element_JobDel_min_job_id(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = atsvc_dissect_element_JobDel_max_job_id(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	return offset;
}

static int
atsvc_dissect_element_JobEnum_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobEnum_servername_, NDR_POINTER_UNIQUE, "Pointer to Servername (uint16)",hf_atsvc_servername);

	return offset;
}

static int
atsvc_dissect_element_JobEnum_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_atsvc_servername, FALSE, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static int
atsvc_dissect_element_JobEnum_ctr(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobEnum_ctr_, NDR_POINTER_REF, "Pointer to Ctr (atsvc_enum_ctr)",hf_atsvc_atsvc_JobEnum_ctr);

	return offset;
}

static int
atsvc_dissect_element_JobEnum_ctr_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_struct_enum_ctr(tvb,offset,pinfo,tree,di,drep,hf_atsvc_atsvc_JobEnum_ctr,0);

	return offset;
}

static int
atsvc_dissect_element_JobEnum_preferred_max_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobEnum_preferred_max_len, 0);

	return offset;
}

static int
atsvc_dissect_element_JobEnum_total_entries(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobEnum_total_entries_, NDR_POINTER_REF, "Pointer to Total Entries (uint32)",hf_atsvc_atsvc_JobEnum_total_entries);

	return offset;
}

static int
atsvc_dissect_element_JobEnum_total_entries_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobEnum_total_entries, 0);

	return offset;
}

static int
atsvc_dissect_element_JobEnum_resume_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobEnum_resume_handle_, NDR_POINTER_UNIQUE, "Pointer to Resume Handle (uint32)",hf_atsvc_atsvc_JobEnum_resume_handle);

	return offset;
}

static int
atsvc_dissect_element_JobEnum_resume_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_atsvc_JobEnum_resume_handle, 0);

	return offset;
}

/* IDL: NTSTATUS atsvc_JobEnum( */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *servername, */
/* IDL: [in] [out] [ref] atsvc_enum_ctr *ctr, */
/* IDL: [in] uint32 preferred_max_len, */
/* IDL: [out] [ref] uint32 *total_entries, */
/* IDL: [in] [out] [unique(1)] uint32 *resume_handle */
/* IDL: ); */

static int
atsvc_dissect_JobEnum_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	guint32 status;

	di->dcerpc_procedure_name="JobEnum";
	offset = atsvc_dissect_element_JobEnum_ctr(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = atsvc_dissect_element_JobEnum_total_entries(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = atsvc_dissect_element_JobEnum_resume_handle(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = dissect_ntstatus(tvb, offset, pinfo, tree, di, drep, hf_atsvc_status, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, NT_errors, "Unknown NT status 0x%08x"));

	return offset;
}

static int
atsvc_dissect_JobEnum_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	di->dcerpc_procedure_name="JobEnum";
	offset = atsvc_dissect_element_JobEnum_servername(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = atsvc_dissect_element_JobEnum_ctr(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = atsvc_dissect_element_JobEnum_preferred_max_len(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = atsvc_dissect_element_JobEnum_resume_handle(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	return offset;
}

static int
atsvc_dissect_element_JobGetInfo_servername(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobGetInfo_servername_, NDR_POINTER_UNIQUE, "Pointer to Servername (uint16)",hf_atsvc_servername);

	return offset;
}

static int
atsvc_dissect_element_JobGetInfo_servername_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	char *data;

	offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, sizeof(guint16), hf_atsvc_servername, FALSE, &data);
	proto_item_append_text(tree, ": %s", data);

	return offset;
}

static int
atsvc_dissect_element_JobGetInfo_job_id(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, di, drep, hf_atsvc_job_id, 0);

	return offset;
}

static int
atsvc_dissect_element_JobGetInfo_job_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobGetInfo_job_info_, NDR_POINTER_REF, "Pointer to Job Info (atsvc_JobInfo)",hf_atsvc_job_info);

	return offset;
}

static int
atsvc_dissect_element_JobGetInfo_job_info_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, di, drep, atsvc_dissect_element_JobGetInfo_job_info__, NDR_POINTER_UNIQUE, "Pointer to Job Info (atsvc_JobInfo)",hf_atsvc_job_info);

	return offset;
}

static int
atsvc_dissect_element_JobGetInfo_job_info__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	offset = atsvc_dissect_struct_JobInfo(tvb,offset,pinfo,tree,di,drep,hf_atsvc_job_info,0);

	return offset;
}

/* IDL: NTSTATUS atsvc_JobGetInfo( */
/* IDL: [charset(UTF16)] [in] [unique(1)] uint16 *servername, */
/* IDL: [in] uint32 job_id, */
/* IDL: [out] [ref] atsvc_JobInfo **job_info */
/* IDL: ); */

static int
atsvc_dissect_JobGetInfo_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	guint32 status;

	di->dcerpc_procedure_name="JobGetInfo";
	offset = atsvc_dissect_element_JobGetInfo_job_info(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);

	offset = dissect_ntstatus(tvb, offset, pinfo, tree, di, drep, hf_atsvc_status, &status);

	if (status != 0)
		col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, NT_errors, "Unknown NT status 0x%08x"));

	return offset;
}

static int
atsvc_dissect_JobGetInfo_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, dcerpc_info* di _U_, guint8 *drep _U_)
{
	di->dcerpc_procedure_name="JobGetInfo";
	offset = atsvc_dissect_element_JobGetInfo_servername(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	offset = atsvc_dissect_element_JobGetInfo_job_id(tvb, offset, pinfo, tree, di, drep);
	offset = dissect_deferred_pointers(pinfo, tvb, offset, di, drep);
	return offset;
}


static dcerpc_sub_dissector atsvc_dissectors[] = {
	{ 0, "JobAdd",
	   atsvc_dissect_JobAdd_request, atsvc_dissect_JobAdd_response},
	{ 1, "JobDel",
	   atsvc_dissect_JobDel_request, atsvc_dissect_JobDel_response},
	{ 2, "JobEnum",
	   atsvc_dissect_JobEnum_request, atsvc_dissect_JobEnum_response},
	{ 3, "JobGetInfo",
	   atsvc_dissect_JobGetInfo_request, atsvc_dissect_JobGetInfo_response},
	{ 0, NULL, NULL, NULL }
};

void proto_register_dcerpc_atsvc(void)
{
	static hf_register_info hf[] = {
	{ &hf_atsvc_atsvc_DaysOfMonth_Eight,
	  { "Eight", "atsvc.atsvc_DaysOfMonth.Eight", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Eight_tfs), ( 0x00000080 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Eighteenth,
	  { "Eighteenth", "atsvc.atsvc_DaysOfMonth.Eighteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Eighteenth_tfs), ( 0x00020000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Eleventh,
	  { "Eleventh", "atsvc.atsvc_DaysOfMonth.Eleventh", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Eleventh_tfs), ( 0x00000400 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Fifteenth,
	  { "Fifteenth", "atsvc.atsvc_DaysOfMonth.Fifteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Fifteenth_tfs), ( 0x00004000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Fifth,
	  { "Fifth", "atsvc.atsvc_DaysOfMonth.Fifth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Fifth_tfs), ( 0x00000010 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_First,
	  { "First", "atsvc.atsvc_DaysOfMonth.First", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_First_tfs), ( 0x00000001 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Fourteenth,
	  { "Fourteenth", "atsvc.atsvc_DaysOfMonth.Fourteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Fourteenth_tfs), ( 0x00002000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Fourth,
	  { "Fourth", "atsvc.atsvc_DaysOfMonth.Fourth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Fourth_tfs), ( 0x00000008 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Ninteenth,
	  { "Ninteenth", "atsvc.atsvc_DaysOfMonth.Ninteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Ninteenth_tfs), ( 0x00040000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Ninth,
	  { "Ninth", "atsvc.atsvc_DaysOfMonth.Ninth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Ninth_tfs), ( 0x00000100 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Second,
	  { "Second", "atsvc.atsvc_DaysOfMonth.Second", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Second_tfs), ( 0x00000002 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Seventeenth,
	  { "Seventeenth", "atsvc.atsvc_DaysOfMonth.Seventeenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Seventeenth_tfs), ( 0x00010000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Seventh,
	  { "Seventh", "atsvc.atsvc_DaysOfMonth.Seventh", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Seventh_tfs), ( 0x00000040 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Sixteenth,
	  { "Sixteenth", "atsvc.atsvc_DaysOfMonth.Sixteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Sixteenth_tfs), ( 0x00008000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Sixth,
	  { "Sixth", "atsvc.atsvc_DaysOfMonth.Sixth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Sixth_tfs), ( 0x00000020 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Tenth,
	  { "Tenth", "atsvc.atsvc_DaysOfMonth.Tenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Tenth_tfs), ( 0x00000200 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Third,
	  { "Third", "atsvc.atsvc_DaysOfMonth.Third", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Third_tfs), ( 0x00000004 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Thirtieth,
	  { "Thirtieth", "atsvc.atsvc_DaysOfMonth.Thirtieth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Thirtieth_tfs), ( 0x20000000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Thirtyfirst,
	  { "Thirtyfirst", "atsvc.atsvc_DaysOfMonth.Thirtyfirst", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Thirtyfirst_tfs), ( 0x40000000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Thitteenth,
	  { "Thitteenth", "atsvc.atsvc_DaysOfMonth.Thitteenth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Thitteenth_tfs), ( 0x00001000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twelfth,
	  { "Twelfth", "atsvc.atsvc_DaysOfMonth.Twelfth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twelfth_tfs), ( 0x00000800 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentyeighth,
	  { "Twentyeighth", "atsvc.atsvc_DaysOfMonth.Twentyeighth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyeighth_tfs), ( 0x08000000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentyfifth,
	  { "Twentyfifth", "atsvc.atsvc_DaysOfMonth.Twentyfifth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyfifth_tfs), ( 0x01000000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentyfirst,
	  { "Twentyfirst", "atsvc.atsvc_DaysOfMonth.Twentyfirst", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyfirst_tfs), ( 0x00100000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentyfourth,
	  { "Twentyfourth", "atsvc.atsvc_DaysOfMonth.Twentyfourth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyfourth_tfs), ( 0x00800000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentyninth,
	  { "Twentyninth", "atsvc.atsvc_DaysOfMonth.Twentyninth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyninth_tfs), ( 0x10000000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentysecond,
	  { "Twentysecond", "atsvc.atsvc_DaysOfMonth.Twentysecond", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentysecond_tfs), ( 0x00200000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentyseventh,
	  { "Twentyseventh", "atsvc.atsvc_DaysOfMonth.Twentyseventh", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyseventh_tfs), ( 0x04000000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentysixth,
	  { "Twentysixth", "atsvc.atsvc_DaysOfMonth.Twentysixth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentysixth_tfs), ( 0x02000000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentyth,
	  { "Twentyth", "atsvc.atsvc_DaysOfMonth.Twentyth", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentyth_tfs), ( 0x00080000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfMonth_Twentythird,
	  { "Twentythird", "atsvc.atsvc_DaysOfMonth.Twentythird", FT_BOOLEAN, 32, TFS(&atsvc_DaysOfMonth_Twentythird_tfs), ( 0x00400000 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY,
	  { "DAYSOFWEEK FRIDAY", "atsvc.atsvc_DaysOfWeek.DAYSOFWEEK_FRIDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_FRIDAY_tfs), ( 0x10 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY,
	  { "DAYSOFWEEK MONDAY", "atsvc.atsvc_DaysOfWeek.DAYSOFWEEK_MONDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_MONDAY_tfs), ( 0x01 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY,
	  { "DAYSOFWEEK SATURDAY", "atsvc.atsvc_DaysOfWeek.DAYSOFWEEK_SATURDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_SATURDAY_tfs), ( 0x20 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY,
	  { "DAYSOFWEEK SUNDAY", "atsvc.atsvc_DaysOfWeek.DAYSOFWEEK_SUNDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_SUNDAY_tfs), ( 0x40 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY,
	  { "DAYSOFWEEK THURSDAY", "atsvc.atsvc_DaysOfWeek.DAYSOFWEEK_THURSDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_THURSDAY_tfs), ( 0x08 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY,
	  { "DAYSOFWEEK TUESDAY", "atsvc.atsvc_DaysOfWeek.DAYSOFWEEK_TUESDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_TUESDAY_tfs), ( 0x02 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY,
	  { "DAYSOFWEEK WEDNESDAY", "atsvc.atsvc_DaysOfWeek.DAYSOFWEEK_WEDNESDAY", FT_BOOLEAN, 8, TFS(&atsvc_DaysOfWeek_DAYSOFWEEK_WEDNESDAY_tfs), ( 0x04 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_Flags_JOB_ADD_CURRENT_DATE,
	  { "JOB ADD CURRENT DATE", "atsvc.atsvc_Flags.JOB_ADD_CURRENT_DATE", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_ADD_CURRENT_DATE_tfs), ( 0x08 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_Flags_JOB_EXEC_ERROR,
	  { "JOB EXEC ERROR", "atsvc.atsvc_Flags.JOB_EXEC_ERROR", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_EXEC_ERROR_tfs), ( 0x02 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_Flags_JOB_NONINTERACTIVE,
	  { "JOB NONINTERACTIVE", "atsvc.atsvc_Flags.JOB_NONINTERACTIVE", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_NONINTERACTIVE_tfs), ( 0x10 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_Flags_JOB_RUNS_TODAY,
	  { "JOB RUNS TODAY", "atsvc.atsvc_Flags.JOB_RUNS_TODAY", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_RUNS_TODAY_tfs), ( 0x04 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_Flags_JOB_RUN_PERIODICALLY,
	  { "JOB RUN PERIODICALLY", "atsvc.atsvc_Flags.JOB_RUN_PERIODICALLY", FT_BOOLEAN, 8, TFS(&atsvc_Flags_JOB_RUN_PERIODICALLY_tfs), ( 0x01 ), NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobDel_max_job_id,
	  { "Max Job Id", "atsvc.atsvc_JobDel.max_job_id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobDel_min_job_id,
	  { "Min Job Id", "atsvc.atsvc_JobDel.min_job_id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnumInfo_command,
	  { "Command", "atsvc.atsvc_JobEnumInfo.command", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnumInfo_days_of_month,
	  { "Days Of Month", "atsvc.atsvc_JobEnumInfo.days_of_month", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnumInfo_days_of_week,
	  { "Days Of Week", "atsvc.atsvc_JobEnumInfo.days_of_week", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnumInfo_flags,
	  { "Flags", "atsvc.atsvc_JobEnumInfo.flags", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnumInfo_job_time,
	  { "Job Time", "atsvc.atsvc_JobEnumInfo.job_time", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnum_ctr,
	  { "Ctr", "atsvc.atsvc_JobEnum.ctr", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnum_preferred_max_len,
	  { "Preferred Max Len", "atsvc.atsvc_JobEnum.preferred_max_len", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnum_resume_handle,
	  { "Resume Handle", "atsvc.atsvc_JobEnum.resume_handle", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobEnum_total_entries,
	  { "Total Entries", "atsvc.atsvc_JobEnum.total_entries", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobInfo_command,
	  { "Command", "atsvc.atsvc_JobInfo.command", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobInfo_days_of_month,
	  { "Days Of Month", "atsvc.atsvc_JobInfo.days_of_month", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobInfo_days_of_week,
	  { "Days Of Week", "atsvc.atsvc_JobInfo.days_of_week", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobInfo_flags,
	  { "Flags", "atsvc.atsvc_JobInfo.flags", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_JobInfo_job_time,
	  { "Job Time", "atsvc.atsvc_JobInfo.job_time", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_enum_ctr_entries_read,
	  { "Entries Read", "atsvc.atsvc_enum_ctr.entries_read", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_atsvc_enum_ctr_first_entry,
	  { "First Entry", "atsvc.atsvc_enum_ctr.first_entry", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_job_id,
	  { "Job Id", "atsvc.job_id", FT_UINT32, BASE_DEC, NULL, 0, "Identifier of the scheduled job", HFILL }},
	{ &hf_atsvc_job_info,
	  { "JobInfo", "atcvs.job_info", FT_NONE, BASE_NONE, NULL, 0, "JobInfo structure", HFILL }},
	{ &hf_atsvc_opnum,
	  { "Operation", "atsvc.opnum", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
	{ &hf_atsvc_servername,
	  { "Server", "atsvc.server", FT_STRING, BASE_NONE, NULL, 0, "Name of the server", HFILL }},
	{ &hf_atsvc_status,
	  { "NT Error", "atsvc.status", FT_UINT32, BASE_HEX, VALS(NT_errors), 0, NULL, HFILL }},
	};


	static gint *ett[] = {
		&ett_dcerpc_atsvc,
		&ett_atsvc_atsvc_DaysOfMonth,
		&ett_atsvc_atsvc_Flags,
		&ett_atsvc_atsvc_DaysOfWeek,
		&ett_atsvc_atsvc_JobInfo,
		&ett_atsvc_atsvc_JobEnumInfo,
		&ett_atsvc_atsvc_enum_ctr,
	};

	proto_dcerpc_atsvc = proto_register_protocol("Microsoft AT-Scheduler Service", "ATSVC", "atsvc");
	proto_register_field_array(proto_dcerpc_atsvc, hf, array_length (hf));
	proto_register_subtree_array(ett, array_length(ett));
}

void proto_reg_handoff_dcerpc_atsvc(void)
{
	dcerpc_init_uuid(proto_dcerpc_atsvc, ett_dcerpc_atsvc,
		&uuid_dcerpc_atsvc, ver_dcerpc_atsvc,
		atsvc_dissectors, hf_atsvc_opnum);
}