LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_atsvc.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 506 670 75.5 %
Date: 2024-04-21 15:09:00 Functions: 17 30 56.7 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_atsvc.h"
       5             : 
       6           0 : static enum ndr_err_code ndr_push_atsvc_DaysOfMonth(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
       7             : {
       8           0 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
       9           0 :         return NDR_ERR_SUCCESS;
      10             : }
      11             : 
      12          18 : static enum ndr_err_code ndr_pull_atsvc_DaysOfMonth(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
      13             : {
      14          18 :         uint32_t v;
      15          18 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      16          18 :         *r = v;
      17          18 :         return NDR_ERR_SUCCESS;
      18             : }
      19             : 
      20          18 : _PUBLIC_ void ndr_print_atsvc_DaysOfMonth(struct ndr_print *ndr, const char *name, uint32_t r)
      21             : {
      22          18 :         ndr_print_uint32(ndr, name, r);
      23          18 :         ndr->depth++;
      24          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "First", First, r);
      25          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Second", Second, r);
      26          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Third", Third, r);
      27          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Fourth", Fourth, r);
      28          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Fifth", Fifth, r);
      29          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Sixth", Sixth, r);
      30          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Seventh", Seventh, r);
      31          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Eight", Eight, r);
      32          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Ninth", Ninth, r);
      33          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Tenth", Tenth, r);
      34          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Eleventh", Eleventh, r);
      35          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twelfth", Twelfth, r);
      36          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Thitteenth", Thitteenth, r);
      37          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Fourteenth", Fourteenth, r);
      38          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Fifteenth", Fifteenth, r);
      39          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Sixteenth", Sixteenth, r);
      40          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Seventeenth", Seventeenth, r);
      41          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Eighteenth", Eighteenth, r);
      42          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Nineteenth", Nineteenth, r);
      43          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentyth", Twentyth, r);
      44          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentyfirst", Twentyfirst, r);
      45          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentysecond", Twentysecond, r);
      46          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentythird", Twentythird, r);
      47          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentyfourth", Twentyfourth, r);
      48          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentyfifth", Twentyfifth, r);
      49          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentysixth", Twentysixth, r);
      50          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentyseventh", Twentyseventh, r);
      51          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentyeighth", Twentyeighth, r);
      52          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Twentyninth", Twentyninth, r);
      53          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Thirtieth", Thirtieth, r);
      54          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "Thirtyfirst", Thirtyfirst, r);
      55          18 :         ndr->depth--;
      56          18 : }
      57             : 
      58           0 : static enum ndr_err_code ndr_push_atsvc_Flags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint8_t r)
      59             : {
      60           0 :         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
      61           0 :         return NDR_ERR_SUCCESS;
      62             : }
      63             : 
      64          18 : static enum ndr_err_code ndr_pull_atsvc_Flags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint8_t *r)
      65             : {
      66          18 :         uint8_t v;
      67          18 :         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
      68          18 :         *r = v;
      69          18 :         return NDR_ERR_SUCCESS;
      70             : }
      71             : 
      72          18 : _PUBLIC_ void ndr_print_atsvc_Flags(struct ndr_print *ndr, const char *name, uint8_t r)
      73             : {
      74          18 :         ndr_print_uint8(ndr, name, r);
      75          18 :         ndr->depth++;
      76          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "JOB_RUN_PERIODICALLY", JOB_RUN_PERIODICALLY, r);
      77          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "JOB_EXEC_ERROR", JOB_EXEC_ERROR, r);
      78          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "JOB_RUNS_TODAY", JOB_RUNS_TODAY, r);
      79          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "JOB_ADD_CURRENT_DATE", JOB_ADD_CURRENT_DATE, r);
      80          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "JOB_NONINTERACTIVE", JOB_NONINTERACTIVE, r);
      81          18 :         ndr->depth--;
      82          18 : }
      83             : 
      84           0 : static enum ndr_err_code ndr_push_atsvc_DaysOfWeek(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint8_t r)
      85             : {
      86           0 :         NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
      87           0 :         return NDR_ERR_SUCCESS;
      88             : }
      89             : 
      90          18 : static enum ndr_err_code ndr_pull_atsvc_DaysOfWeek(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint8_t *r)
      91             : {
      92          18 :         uint8_t v;
      93          18 :         NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
      94          18 :         *r = v;
      95          18 :         return NDR_ERR_SUCCESS;
      96             : }
      97             : 
      98          18 : _PUBLIC_ void ndr_print_atsvc_DaysOfWeek(struct ndr_print *ndr, const char *name, uint8_t r)
      99             : {
     100          18 :         ndr_print_uint8(ndr, name, r);
     101          18 :         ndr->depth++;
     102          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DAYSOFWEEK_MONDAY", DAYSOFWEEK_MONDAY, r);
     103          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DAYSOFWEEK_TUESDAY", DAYSOFWEEK_TUESDAY, r);
     104          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DAYSOFWEEK_WEDNESDAY", DAYSOFWEEK_WEDNESDAY, r);
     105          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DAYSOFWEEK_THURSDAY", DAYSOFWEEK_THURSDAY, r);
     106          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DAYSOFWEEK_FRIDAY", DAYSOFWEEK_FRIDAY, r);
     107          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DAYSOFWEEK_SATURDAY", DAYSOFWEEK_SATURDAY, r);
     108          18 :         ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "DAYSOFWEEK_SUNDAY", DAYSOFWEEK_SUNDAY, r);
     109          18 :         ndr->depth--;
     110          18 : }
     111             : 
     112           0 : static enum ndr_err_code ndr_push_atsvc_JobInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct atsvc_JobInfo *r)
     113             : {
     114           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     115           0 :         if (ndr_flags & NDR_SCALARS) {
     116           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     117           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_time));
     118           0 :                 NDR_CHECK(ndr_push_atsvc_DaysOfMonth(ndr, NDR_SCALARS, r->days_of_month));
     119           0 :                 NDR_CHECK(ndr_push_atsvc_DaysOfWeek(ndr, NDR_SCALARS, r->days_of_week));
     120           0 :                 NDR_CHECK(ndr_push_atsvc_Flags(ndr, NDR_SCALARS, r->flags));
     121           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->command));
     122           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     123             :         }
     124           0 :         if (ndr_flags & NDR_BUFFERS) {
     125           0 :                 if (r->command) {
     126           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->command, CH_UTF16)));
     127           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     128           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->command, CH_UTF16)));
     129           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->command, ndr_charset_length(r->command, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     130             :                 }
     131             :         }
     132           0 :         return NDR_ERR_SUCCESS;
     133             : }
     134             : 
     135           4 : static enum ndr_err_code ndr_pull_atsvc_JobInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct atsvc_JobInfo *r)
     136             : {
     137           4 :         uint32_t _ptr_command;
     138           4 :         uint32_t size_command_1 = 0;
     139           4 :         uint32_t length_command_1 = 0;
     140           4 :         TALLOC_CTX *_mem_save_command_0 = NULL;
     141           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     142           4 :         if (ndr_flags & NDR_SCALARS) {
     143           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     144           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_time));
     145           8 :                 NDR_CHECK(ndr_pull_atsvc_DaysOfMonth(ndr, NDR_SCALARS, &r->days_of_month));
     146           8 :                 NDR_CHECK(ndr_pull_atsvc_DaysOfWeek(ndr, NDR_SCALARS, &r->days_of_week));
     147           8 :                 NDR_CHECK(ndr_pull_atsvc_Flags(ndr, NDR_SCALARS, &r->flags));
     148           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_command));
     149           4 :                 if (_ptr_command) {
     150           4 :                         NDR_PULL_ALLOC(ndr, r->command);
     151             :                 } else {
     152           0 :                         r->command = NULL;
     153             :                 }
     154           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     155             :         }
     156           4 :         if (ndr_flags & NDR_BUFFERS) {
     157           4 :                 if (r->command) {
     158           4 :                         _mem_save_command_0 = NDR_PULL_GET_MEM_CTX(ndr);
     159           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->command, 0);
     160           4 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->command));
     161           4 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->command));
     162           4 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->command, &size_command_1));
     163           4 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->command, &length_command_1));
     164           4 :                         if (length_command_1 > size_command_1) {
     165           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_command_1, length_command_1);
     166             :                         }
     167           4 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_command_1, sizeof(uint16_t)));
     168           4 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->command, length_command_1, sizeof(uint16_t), CH_UTF16));
     169           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_command_0, 0);
     170             :                 }
     171             :         }
     172           0 :         return NDR_ERR_SUCCESS;
     173             : }
     174             : 
     175           4 : _PUBLIC_ void ndr_print_atsvc_JobInfo(struct ndr_print *ndr, const char *name, const struct atsvc_JobInfo *r)
     176             : {
     177           4 :         ndr_print_struct(ndr, name, "atsvc_JobInfo");
     178           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     179           4 :         ndr->depth++;
     180           4 :         ndr_print_uint32(ndr, "job_time", r->job_time);
     181           4 :         ndr_print_atsvc_DaysOfMonth(ndr, "days_of_month", r->days_of_month);
     182           4 :         ndr_print_atsvc_DaysOfWeek(ndr, "days_of_week", r->days_of_week);
     183           4 :         ndr_print_atsvc_Flags(ndr, "flags", r->flags);
     184           4 :         ndr_print_ptr(ndr, "command", r->command);
     185           4 :         ndr->depth++;
     186           4 :         if (r->command) {
     187           4 :                 ndr_print_string(ndr, "command", r->command);
     188             :         }
     189           4 :         ndr->depth--;
     190           4 :         ndr->depth--;
     191             : }
     192             : 
     193           0 : static enum ndr_err_code ndr_push_atsvc_JobEnumInfo(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct atsvc_JobEnumInfo *r)
     194             : {
     195           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     196           0 :         if (ndr_flags & NDR_SCALARS) {
     197           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     198           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
     199           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_time));
     200           0 :                 NDR_CHECK(ndr_push_atsvc_DaysOfMonth(ndr, NDR_SCALARS, r->days_of_month));
     201           0 :                 NDR_CHECK(ndr_push_atsvc_DaysOfWeek(ndr, NDR_SCALARS, r->days_of_week));
     202           0 :                 NDR_CHECK(ndr_push_atsvc_Flags(ndr, NDR_SCALARS, r->flags));
     203           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->command));
     204           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     205             :         }
     206           0 :         if (ndr_flags & NDR_BUFFERS) {
     207           0 :                 if (r->command) {
     208           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->command, CH_UTF16)));
     209           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     210           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->command, CH_UTF16)));
     211           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->command, ndr_charset_length(r->command, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     212             :                 }
     213             :         }
     214           0 :         return NDR_ERR_SUCCESS;
     215             : }
     216             : 
     217          28 : static enum ndr_err_code ndr_pull_atsvc_JobEnumInfo(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct atsvc_JobEnumInfo *r)
     218             : {
     219          28 :         uint32_t _ptr_command;
     220          28 :         uint32_t size_command_1 = 0;
     221          28 :         uint32_t length_command_1 = 0;
     222          28 :         TALLOC_CTX *_mem_save_command_0 = NULL;
     223          28 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     224          28 :         if (ndr_flags & NDR_SCALARS) {
     225          14 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     226          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
     227          14 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_time));
     228          28 :                 NDR_CHECK(ndr_pull_atsvc_DaysOfMonth(ndr, NDR_SCALARS, &r->days_of_month));
     229          28 :                 NDR_CHECK(ndr_pull_atsvc_DaysOfWeek(ndr, NDR_SCALARS, &r->days_of_week));
     230          28 :                 NDR_CHECK(ndr_pull_atsvc_Flags(ndr, NDR_SCALARS, &r->flags));
     231          14 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_command));
     232          14 :                 if (_ptr_command) {
     233          14 :                         NDR_PULL_ALLOC(ndr, r->command);
     234             :                 } else {
     235           0 :                         r->command = NULL;
     236             :                 }
     237          14 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     238             :         }
     239          28 :         if (ndr_flags & NDR_BUFFERS) {
     240          14 :                 if (r->command) {
     241          14 :                         _mem_save_command_0 = NDR_PULL_GET_MEM_CTX(ndr);
     242          14 :                         NDR_PULL_SET_MEM_CTX(ndr, r->command, 0);
     243          14 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->command));
     244          14 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->command));
     245          14 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->command, &size_command_1));
     246          14 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->command, &length_command_1));
     247          14 :                         if (length_command_1 > size_command_1) {
     248           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_command_1, length_command_1);
     249             :                         }
     250          14 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_command_1, sizeof(uint16_t)));
     251          14 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->command, length_command_1, sizeof(uint16_t), CH_UTF16));
     252          14 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_command_0, 0);
     253             :                 }
     254             :         }
     255           0 :         return NDR_ERR_SUCCESS;
     256             : }
     257             : 
     258          14 : _PUBLIC_ void ndr_print_atsvc_JobEnumInfo(struct ndr_print *ndr, const char *name, const struct atsvc_JobEnumInfo *r)
     259             : {
     260          14 :         ndr_print_struct(ndr, name, "atsvc_JobEnumInfo");
     261          14 :         if (r == NULL) { ndr_print_null(ndr); return; }
     262          14 :         ndr->depth++;
     263          14 :         ndr_print_uint32(ndr, "job_id", r->job_id);
     264          14 :         ndr_print_uint32(ndr, "job_time", r->job_time);
     265          14 :         ndr_print_atsvc_DaysOfMonth(ndr, "days_of_month", r->days_of_month);
     266          14 :         ndr_print_atsvc_DaysOfWeek(ndr, "days_of_week", r->days_of_week);
     267          14 :         ndr_print_atsvc_Flags(ndr, "flags", r->flags);
     268          14 :         ndr_print_ptr(ndr, "command", r->command);
     269          14 :         ndr->depth++;
     270          14 :         if (r->command) {
     271          14 :                 ndr_print_string(ndr, "command", r->command);
     272             :         }
     273          14 :         ndr->depth--;
     274          14 :         ndr->depth--;
     275             : }
     276             : 
     277           0 : static enum ndr_err_code ndr_push_atsvc_enum_ctr(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct atsvc_enum_ctr *r)
     278             : {
     279           0 :         uint32_t cntr_first_entry_1;
     280           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     281           0 :         if (ndr_flags & NDR_SCALARS) {
     282           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     283           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->entries_read));
     284           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_entry));
     285           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     286             :         }
     287           0 :         if (ndr_flags & NDR_BUFFERS) {
     288           0 :                 if (r->first_entry) {
     289           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->entries_read));
     290           0 :                         for (cntr_first_entry_1 = 0; cntr_first_entry_1 < (r->entries_read); cntr_first_entry_1++) {
     291           0 :                                 NDR_CHECK(ndr_push_atsvc_JobEnumInfo(ndr, NDR_SCALARS, &r->first_entry[cntr_first_entry_1]));
     292             :                         }
     293           0 :                         for (cntr_first_entry_1 = 0; cntr_first_entry_1 < (r->entries_read); cntr_first_entry_1++) {
     294           0 :                                 NDR_CHECK(ndr_push_atsvc_JobEnumInfo(ndr, NDR_BUFFERS, &r->first_entry[cntr_first_entry_1]));
     295             :                         }
     296             :                 }
     297             :         }
     298           0 :         return NDR_ERR_SUCCESS;
     299             : }
     300             : 
     301           4 : static enum ndr_err_code ndr_pull_atsvc_enum_ctr(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct atsvc_enum_ctr *r)
     302             : {
     303           4 :         uint32_t _ptr_first_entry;
     304           4 :         uint32_t size_first_entry_1 = 0;
     305           4 :         uint32_t cntr_first_entry_1;
     306           4 :         TALLOC_CTX *_mem_save_first_entry_0 = NULL;
     307           4 :         TALLOC_CTX *_mem_save_first_entry_1 = NULL;
     308           4 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     309           4 :         if (ndr_flags & NDR_SCALARS) {
     310           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     311           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->entries_read));
     312           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_entry));
     313           4 :                 if (_ptr_first_entry) {
     314           2 :                         NDR_PULL_ALLOC(ndr, r->first_entry);
     315             :                 } else {
     316           2 :                         r->first_entry = NULL;
     317             :                 }
     318           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     319             :         }
     320           4 :         if (ndr_flags & NDR_BUFFERS) {
     321           4 :                 if (r->first_entry) {
     322           2 :                         _mem_save_first_entry_0 = NDR_PULL_GET_MEM_CTX(ndr);
     323           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->first_entry, 0);
     324           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->first_entry));
     325           2 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->first_entry, &size_first_entry_1));
     326           2 :                         NDR_PULL_ALLOC_N(ndr, r->first_entry, size_first_entry_1);
     327           2 :                         _mem_save_first_entry_1 = NDR_PULL_GET_MEM_CTX(ndr);
     328           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->first_entry, 0);
     329          16 :                         for (cntr_first_entry_1 = 0; cntr_first_entry_1 < (size_first_entry_1); cntr_first_entry_1++) {
     330          14 :                                 NDR_CHECK(ndr_pull_atsvc_JobEnumInfo(ndr, NDR_SCALARS, &r->first_entry[cntr_first_entry_1]));
     331             :                         }
     332          16 :                         for (cntr_first_entry_1 = 0; cntr_first_entry_1 < (size_first_entry_1); cntr_first_entry_1++) {
     333          14 :                                 NDR_CHECK(ndr_pull_atsvc_JobEnumInfo(ndr, NDR_BUFFERS, &r->first_entry[cntr_first_entry_1]));
     334             :                         }
     335           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_first_entry_1, 0);
     336           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_first_entry_0, 0);
     337             :                 }
     338           4 :                 if (r->first_entry) {
     339           2 :                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->first_entry, r->entries_read));
     340             :                 }
     341          18 :                 for (cntr_first_entry_1 = 0; cntr_first_entry_1 < (size_first_entry_1); cntr_first_entry_1++) {
     342          14 :                 }
     343             :         }
     344           0 :         return NDR_ERR_SUCCESS;
     345             : }
     346             : 
     347           4 : _PUBLIC_ void ndr_print_atsvc_enum_ctr(struct ndr_print *ndr, const char *name, const struct atsvc_enum_ctr *r)
     348             : {
     349           4 :         uint32_t cntr_first_entry_1;
     350           4 :         ndr_print_struct(ndr, name, "atsvc_enum_ctr");
     351           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     352           4 :         ndr->depth++;
     353           4 :         ndr_print_uint32(ndr, "entries_read", r->entries_read);
     354           4 :         ndr_print_ptr(ndr, "first_entry", r->first_entry);
     355           4 :         ndr->depth++;
     356           4 :         if (r->first_entry) {
     357           2 :                 ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "first_entry", (uint32_t)(r->entries_read));
     358           2 :                 ndr->depth++;
     359          16 :                 for (cntr_first_entry_1 = 0; cntr_first_entry_1 < (r->entries_read); cntr_first_entry_1++) {
     360          14 :                         ndr_print_atsvc_JobEnumInfo(ndr, "first_entry", &r->first_entry[cntr_first_entry_1]);
     361             :                 }
     362           2 :                 ndr->depth--;
     363             :         }
     364           4 :         ndr->depth--;
     365           4 :         ndr->depth--;
     366             : }
     367             : 
     368           0 : _PUBLIC_ enum ndr_err_code ndr_push_atsvc_JobAdd(struct ndr_push *ndr, ndr_flags_type flags, const struct atsvc_JobAdd *r)
     369             : {
     370           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     371           0 :         if (flags & NDR_IN) {
     372           0 :                 if (r->in.job_info == NULL) {
     373           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     374             :                 }
     375           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
     376           0 :                 if (r->in.servername) {
     377           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
     378           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     379           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
     380           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     381             :                 }
     382           0 :                 NDR_CHECK(ndr_push_atsvc_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.job_info));
     383             :         }
     384           0 :         if (flags & NDR_OUT) {
     385           0 :                 if (r->out.job_id == NULL) {
     386           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     387             :                 }
     388           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.job_id));
     389           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
     390             :         }
     391           0 :         return NDR_ERR_SUCCESS;
     392             : }
     393             : 
     394           4 : _PUBLIC_ enum ndr_err_code ndr_pull_atsvc_JobAdd(struct ndr_pull *ndr, ndr_flags_type flags, struct atsvc_JobAdd *r)
     395             : {
     396           4 :         uint32_t _ptr_servername;
     397           4 :         uint32_t size_servername_1 = 0;
     398           4 :         uint32_t length_servername_1 = 0;
     399           4 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
     400           4 :         TALLOC_CTX *_mem_save_job_info_0 = NULL;
     401           4 :         TALLOC_CTX *_mem_save_job_id_0 = NULL;
     402           4 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     403           4 :         if (flags & NDR_IN) {
     404           2 :                 NDR_ZERO_STRUCT(r->out);
     405             : 
     406           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
     407           2 :                 if (_ptr_servername) {
     408           2 :                         NDR_PULL_ALLOC(ndr, r->in.servername);
     409             :                 } else {
     410           0 :                         r->in.servername = NULL;
     411             :                 }
     412           2 :                 if (r->in.servername) {
     413           2 :                         _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
     414           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
     415           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
     416           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
     417           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
     418           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
     419           2 :                         if (length_servername_1 > size_servername_1) {
     420           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
     421             :                         }
     422           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
     423           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
     424           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
     425             :                 }
     426           2 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     427           2 :                         NDR_PULL_ALLOC(ndr, r->in.job_info);
     428             :                 }
     429           2 :                 _mem_save_job_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
     430           2 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.job_info, LIBNDR_FLAG_REF_ALLOC);
     431           2 :                 NDR_CHECK(ndr_pull_atsvc_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.job_info));
     432           2 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_job_info_0, LIBNDR_FLAG_REF_ALLOC);
     433           2 :                 NDR_PULL_ALLOC(ndr, r->out.job_id);
     434           2 :                 NDR_ZERO_STRUCTP(r->out.job_id);
     435             :         }
     436           4 :         if (flags & NDR_OUT) {
     437             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     438             :                 if (r->in.job_info == NULL) {
     439             :                         NDR_PULL_ALLOC(ndr, r->in.job_info);
     440             :                         NDR_ZERO_STRUCTP(r->in.job_info);
     441             :                 }
     442             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     443           2 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     444           2 :                         NDR_PULL_ALLOC(ndr, r->out.job_id);
     445             :                 }
     446           2 :                 _mem_save_job_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
     447           2 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.job_id, LIBNDR_FLAG_REF_ALLOC);
     448           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.job_id));
     449           2 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_job_id_0, LIBNDR_FLAG_REF_ALLOC);
     450           2 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
     451             :         }
     452           0 :         return NDR_ERR_SUCCESS;
     453             : }
     454             : 
     455           4 : _PUBLIC_ void ndr_print_atsvc_JobAdd(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct atsvc_JobAdd *r)
     456             : {
     457           4 :         ndr_print_struct(ndr, name, "atsvc_JobAdd");
     458           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     459           4 :         ndr->depth++;
     460           4 :         if (flags & NDR_SET_VALUES) {
     461           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     462             :         }
     463           4 :         if (flags & NDR_IN) {
     464           2 :                 ndr_print_struct(ndr, "in", "atsvc_JobAdd");
     465           2 :                 ndr->depth++;
     466           2 :                 ndr_print_ptr(ndr, "servername", r->in.servername);
     467           2 :                 ndr->depth++;
     468           2 :                 if (r->in.servername) {
     469           2 :                         ndr_print_string(ndr, "servername", r->in.servername);
     470             :                 }
     471           2 :                 ndr->depth--;
     472           2 :                 ndr_print_ptr(ndr, "job_info", r->in.job_info);
     473           2 :                 ndr->depth++;
     474           2 :                 ndr_print_atsvc_JobInfo(ndr, "job_info", r->in.job_info);
     475           2 :                 ndr->depth--;
     476           2 :                 ndr->depth--;
     477             :         }
     478           4 :         if (flags & NDR_OUT) {
     479           2 :                 ndr_print_struct(ndr, "out", "atsvc_JobAdd");
     480           2 :                 ndr->depth++;
     481           2 :                 ndr_print_ptr(ndr, "job_id", r->out.job_id);
     482           2 :                 ndr->depth++;
     483           2 :                 ndr_print_uint32(ndr, "job_id", *r->out.job_id);
     484           2 :                 ndr->depth--;
     485           2 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
     486           2 :                 ndr->depth--;
     487             :         }
     488           4 :         ndr->depth--;
     489             : }
     490             : 
     491           0 : _PUBLIC_ enum ndr_err_code ndr_push_atsvc_JobDel(struct ndr_push *ndr, ndr_flags_type flags, const struct atsvc_JobDel *r)
     492             : {
     493           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     494           0 :         if (flags & NDR_IN) {
     495           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
     496           0 :                 if (r->in.servername) {
     497           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
     498           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     499           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
     500           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     501             :                 }
     502           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.min_job_id));
     503           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_job_id));
     504             :         }
     505           0 :         if (flags & NDR_OUT) {
     506           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
     507             :         }
     508           0 :         return NDR_ERR_SUCCESS;
     509             : }
     510             : 
     511           4 : _PUBLIC_ enum ndr_err_code ndr_pull_atsvc_JobDel(struct ndr_pull *ndr, ndr_flags_type flags, struct atsvc_JobDel *r)
     512             : {
     513           4 :         uint32_t _ptr_servername;
     514           4 :         uint32_t size_servername_1 = 0;
     515           4 :         uint32_t length_servername_1 = 0;
     516           4 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
     517           4 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     518           4 :         if (flags & NDR_IN) {
     519           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
     520           2 :                 if (_ptr_servername) {
     521           2 :                         NDR_PULL_ALLOC(ndr, r->in.servername);
     522             :                 } else {
     523           0 :                         r->in.servername = NULL;
     524             :                 }
     525           2 :                 if (r->in.servername) {
     526           2 :                         _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
     527           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
     528           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
     529           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
     530           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
     531           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
     532           2 :                         if (length_servername_1 > size_servername_1) {
     533           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
     534             :                         }
     535           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
     536           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
     537           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
     538             :                 }
     539           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.min_job_id));
     540           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_job_id));
     541             :         }
     542           4 :         if (flags & NDR_OUT) {
     543             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     544             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     545           2 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
     546             :         }
     547           0 :         return NDR_ERR_SUCCESS;
     548             : }
     549             : 
     550           4 : _PUBLIC_ void ndr_print_atsvc_JobDel(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct atsvc_JobDel *r)
     551             : {
     552           4 :         ndr_print_struct(ndr, name, "atsvc_JobDel");
     553           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     554           4 :         ndr->depth++;
     555           4 :         if (flags & NDR_SET_VALUES) {
     556           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     557             :         }
     558           4 :         if (flags & NDR_IN) {
     559           2 :                 ndr_print_struct(ndr, "in", "atsvc_JobDel");
     560           2 :                 ndr->depth++;
     561           2 :                 ndr_print_ptr(ndr, "servername", r->in.servername);
     562           2 :                 ndr->depth++;
     563           2 :                 if (r->in.servername) {
     564           2 :                         ndr_print_string(ndr, "servername", r->in.servername);
     565             :                 }
     566           2 :                 ndr->depth--;
     567           2 :                 ndr_print_uint32(ndr, "min_job_id", r->in.min_job_id);
     568           2 :                 ndr_print_uint32(ndr, "max_job_id", r->in.max_job_id);
     569           2 :                 ndr->depth--;
     570             :         }
     571           4 :         if (flags & NDR_OUT) {
     572           2 :                 ndr_print_struct(ndr, "out", "atsvc_JobDel");
     573           2 :                 ndr->depth++;
     574           2 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
     575           2 :                 ndr->depth--;
     576             :         }
     577           4 :         ndr->depth--;
     578             : }
     579             : 
     580           0 : _PUBLIC_ enum ndr_err_code ndr_push_atsvc_JobEnum(struct ndr_push *ndr, ndr_flags_type flags, const struct atsvc_JobEnum *r)
     581             : {
     582           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     583           0 :         if (flags & NDR_IN) {
     584           0 :                 if (r->in.ctr == NULL) {
     585           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     586             :                 }
     587           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
     588           0 :                 if (r->in.servername) {
     589           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
     590           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     591           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
     592           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     593             :                 }
     594           0 :                 NDR_CHECK(ndr_push_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
     595           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.preferred_max_len));
     596           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
     597           0 :                 if (r->in.resume_handle) {
     598           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
     599             :                 }
     600             :         }
     601           0 :         if (flags & NDR_OUT) {
     602           0 :                 if (r->out.ctr == NULL) {
     603           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     604             :                 }
     605           0 :                 if (r->out.total_entries == NULL) {
     606           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     607             :                 }
     608           0 :                 NDR_CHECK(ndr_push_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
     609           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total_entries));
     610           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
     611           0 :                 if (r->out.resume_handle) {
     612           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
     613             :                 }
     614           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
     615             :         }
     616           0 :         return NDR_ERR_SUCCESS;
     617             : }
     618             : 
     619           4 : _PUBLIC_ enum ndr_err_code ndr_pull_atsvc_JobEnum(struct ndr_pull *ndr, ndr_flags_type flags, struct atsvc_JobEnum *r)
     620             : {
     621           4 :         uint32_t _ptr_servername;
     622           4 :         uint32_t size_servername_1 = 0;
     623           4 :         uint32_t length_servername_1 = 0;
     624           4 :         uint32_t _ptr_resume_handle;
     625           4 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
     626           4 :         TALLOC_CTX *_mem_save_ctr_0 = NULL;
     627           4 :         TALLOC_CTX *_mem_save_total_entries_0 = NULL;
     628           4 :         TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
     629           4 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     630           4 :         if (flags & NDR_IN) {
     631           2 :                 NDR_ZERO_STRUCT(r->out);
     632             : 
     633           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
     634           2 :                 if (_ptr_servername) {
     635           2 :                         NDR_PULL_ALLOC(ndr, r->in.servername);
     636             :                 } else {
     637           0 :                         r->in.servername = NULL;
     638             :                 }
     639           2 :                 if (r->in.servername) {
     640           2 :                         _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
     641           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
     642           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
     643           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
     644           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
     645           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
     646           2 :                         if (length_servername_1 > size_servername_1) {
     647           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
     648             :                         }
     649           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
     650           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
     651           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
     652             :                 }
     653           2 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     654           2 :                         NDR_PULL_ALLOC(ndr, r->in.ctr);
     655             :                 }
     656           2 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
     657           2 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
     658           2 :                 NDR_CHECK(ndr_pull_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
     659           2 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
     660           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.preferred_max_len));
     661           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
     662           2 :                 if (_ptr_resume_handle) {
     663           2 :                         NDR_PULL_ALLOC(ndr, r->in.resume_handle);
     664             :                 } else {
     665           0 :                         r->in.resume_handle = NULL;
     666             :                 }
     667           2 :                 if (r->in.resume_handle) {
     668           2 :                         _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
     669           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
     670           2 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
     671           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
     672             :                 }
     673           2 :                 NDR_PULL_ALLOC(ndr, r->out.ctr);
     674           2 :                 *r->out.ctr = *r->in.ctr;
     675           2 :                 NDR_PULL_ALLOC(ndr, r->out.total_entries);
     676           2 :                 NDR_ZERO_STRUCTP(r->out.total_entries);
     677             :         }
     678           4 :         if (flags & NDR_OUT) {
     679             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     680             :                 if (r->in.ctr == NULL) {
     681             :                         NDR_PULL_ALLOC(ndr, r->in.ctr);
     682             :                         NDR_ZERO_STRUCTP(r->in.ctr);
     683             :                 }
     684             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     685           2 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     686           2 :                         NDR_PULL_ALLOC(ndr, r->out.ctr);
     687             :                 }
     688           2 :                 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
     689           2 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
     690           2 :                 NDR_CHECK(ndr_pull_atsvc_enum_ctr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
     691           2 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
     692           2 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     693           2 :                         NDR_PULL_ALLOC(ndr, r->out.total_entries);
     694             :                 }
     695           2 :                 _mem_save_total_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
     696           2 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.total_entries, LIBNDR_FLAG_REF_ALLOC);
     697           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total_entries));
     698           2 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_entries_0, LIBNDR_FLAG_REF_ALLOC);
     699           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
     700           2 :                 if (_ptr_resume_handle) {
     701           2 :                         NDR_PULL_ALLOC(ndr, r->out.resume_handle);
     702             :                 } else {
     703           0 :                         r->out.resume_handle = NULL;
     704             :                 }
     705           2 :                 if (r->out.resume_handle) {
     706           2 :                         _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
     707           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
     708           2 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
     709           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
     710             :                 }
     711           2 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
     712             :         }
     713           0 :         return NDR_ERR_SUCCESS;
     714             : }
     715             : 
     716           4 : _PUBLIC_ void ndr_print_atsvc_JobEnum(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct atsvc_JobEnum *r)
     717             : {
     718           4 :         ndr_print_struct(ndr, name, "atsvc_JobEnum");
     719           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     720           4 :         ndr->depth++;
     721           4 :         if (flags & NDR_SET_VALUES) {
     722           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     723             :         }
     724           4 :         if (flags & NDR_IN) {
     725           2 :                 ndr_print_struct(ndr, "in", "atsvc_JobEnum");
     726           2 :                 ndr->depth++;
     727           2 :                 ndr_print_ptr(ndr, "servername", r->in.servername);
     728           2 :                 ndr->depth++;
     729           2 :                 if (r->in.servername) {
     730           2 :                         ndr_print_string(ndr, "servername", r->in.servername);
     731             :                 }
     732           2 :                 ndr->depth--;
     733           2 :                 ndr_print_ptr(ndr, "ctr", r->in.ctr);
     734           2 :                 ndr->depth++;
     735           2 :                 ndr_print_atsvc_enum_ctr(ndr, "ctr", r->in.ctr);
     736           2 :                 ndr->depth--;
     737           2 :                 ndr_print_uint32(ndr, "preferred_max_len", r->in.preferred_max_len);
     738           2 :                 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
     739           2 :                 ndr->depth++;
     740           2 :                 if (r->in.resume_handle) {
     741           2 :                         ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
     742             :                 }
     743           2 :                 ndr->depth--;
     744           2 :                 ndr->depth--;
     745             :         }
     746           4 :         if (flags & NDR_OUT) {
     747           2 :                 ndr_print_struct(ndr, "out", "atsvc_JobEnum");
     748           2 :                 ndr->depth++;
     749           2 :                 ndr_print_ptr(ndr, "ctr", r->out.ctr);
     750           2 :                 ndr->depth++;
     751           2 :                 ndr_print_atsvc_enum_ctr(ndr, "ctr", r->out.ctr);
     752           2 :                 ndr->depth--;
     753           2 :                 ndr_print_ptr(ndr, "total_entries", r->out.total_entries);
     754           2 :                 ndr->depth++;
     755           2 :                 ndr_print_uint32(ndr, "total_entries", *r->out.total_entries);
     756           2 :                 ndr->depth--;
     757           2 :                 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
     758           2 :                 ndr->depth++;
     759           2 :                 if (r->out.resume_handle) {
     760           2 :                         ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
     761             :                 }
     762           2 :                 ndr->depth--;
     763           2 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
     764           2 :                 ndr->depth--;
     765             :         }
     766           4 :         ndr->depth--;
     767             : }
     768             : 
     769           0 : _PUBLIC_ enum ndr_err_code ndr_push_atsvc_JobGetInfo(struct ndr_push *ndr, ndr_flags_type flags, const struct atsvc_JobGetInfo *r)
     770             : {
     771           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     772           0 :         if (flags & NDR_IN) {
     773           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
     774           0 :                 if (r->in.servername) {
     775           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
     776           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     777           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
     778           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     779             :                 }
     780           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.job_id));
     781             :         }
     782           0 :         if (flags & NDR_OUT) {
     783           0 :                 if (r->out.job_info == NULL) {
     784           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     785             :                 }
     786           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.job_info));
     787           0 :                 if (*r->out.job_info) {
     788           0 :                         NDR_CHECK(ndr_push_atsvc_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.job_info));
     789             :                 }
     790           0 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
     791             :         }
     792           0 :         return NDR_ERR_SUCCESS;
     793             : }
     794             : 
     795           4 : _PUBLIC_ enum ndr_err_code ndr_pull_atsvc_JobGetInfo(struct ndr_pull *ndr, ndr_flags_type flags, struct atsvc_JobGetInfo *r)
     796             : {
     797           4 :         uint32_t _ptr_servername;
     798           4 :         uint32_t size_servername_1 = 0;
     799           4 :         uint32_t length_servername_1 = 0;
     800           4 :         uint32_t _ptr_job_info;
     801           4 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
     802           4 :         TALLOC_CTX *_mem_save_job_info_0 = NULL;
     803           4 :         TALLOC_CTX *_mem_save_job_info_1 = NULL;
     804           4 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     805           4 :         if (flags & NDR_IN) {
     806           2 :                 NDR_ZERO_STRUCT(r->out);
     807             : 
     808           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
     809           2 :                 if (_ptr_servername) {
     810           2 :                         NDR_PULL_ALLOC(ndr, r->in.servername);
     811             :                 } else {
     812           0 :                         r->in.servername = NULL;
     813             :                 }
     814           2 :                 if (r->in.servername) {
     815           2 :                         _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
     816           2 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
     817           2 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
     818           2 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
     819           2 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.servername, &size_servername_1));
     820           2 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.servername, &length_servername_1));
     821           2 :                         if (length_servername_1 > size_servername_1) {
     822           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_servername_1, length_servername_1);
     823             :                         }
     824           2 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
     825           2 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
     826           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
     827             :                 }
     828           2 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.job_id));
     829           2 :                 NDR_PULL_ALLOC(ndr, r->out.job_info);
     830           2 :                 NDR_ZERO_STRUCTP(r->out.job_info);
     831             :         }
     832           4 :         if (flags & NDR_OUT) {
     833             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     834             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     835           2 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     836           2 :                         NDR_PULL_ALLOC(ndr, r->out.job_info);
     837             :                 }
     838           2 :                 _mem_save_job_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
     839           2 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.job_info, LIBNDR_FLAG_REF_ALLOC);
     840           2 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_job_info));
     841           2 :                 if (_ptr_job_info) {
     842           2 :                         NDR_PULL_ALLOC(ndr, *r->out.job_info);
     843             :                 } else {
     844           0 :                         *r->out.job_info = NULL;
     845             :                 }
     846           2 :                 if (*r->out.job_info) {
     847           2 :                         _mem_save_job_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
     848           2 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.job_info, 0);
     849           2 :                         NDR_CHECK(ndr_pull_atsvc_JobInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.job_info));
     850           2 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_job_info_1, 0);
     851             :                 }
     852           2 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_job_info_0, LIBNDR_FLAG_REF_ALLOC);
     853           2 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
     854             :         }
     855           0 :         return NDR_ERR_SUCCESS;
     856             : }
     857             : 
     858           4 : _PUBLIC_ void ndr_print_atsvc_JobGetInfo(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct atsvc_JobGetInfo *r)
     859             : {
     860           4 :         ndr_print_struct(ndr, name, "atsvc_JobGetInfo");
     861           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     862           4 :         ndr->depth++;
     863           4 :         if (flags & NDR_SET_VALUES) {
     864           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     865             :         }
     866           4 :         if (flags & NDR_IN) {
     867           2 :                 ndr_print_struct(ndr, "in", "atsvc_JobGetInfo");
     868           2 :                 ndr->depth++;
     869           2 :                 ndr_print_ptr(ndr, "servername", r->in.servername);
     870           2 :                 ndr->depth++;
     871           2 :                 if (r->in.servername) {
     872           2 :                         ndr_print_string(ndr, "servername", r->in.servername);
     873             :                 }
     874           2 :                 ndr->depth--;
     875           2 :                 ndr_print_uint32(ndr, "job_id", r->in.job_id);
     876           2 :                 ndr->depth--;
     877             :         }
     878           4 :         if (flags & NDR_OUT) {
     879           2 :                 ndr_print_struct(ndr, "out", "atsvc_JobGetInfo");
     880           2 :                 ndr->depth++;
     881           2 :                 ndr_print_ptr(ndr, "job_info", r->out.job_info);
     882           2 :                 ndr->depth++;
     883           2 :                 ndr_print_ptr(ndr, "job_info", *r->out.job_info);
     884           2 :                 ndr->depth++;
     885           2 :                 if (*r->out.job_info) {
     886           2 :                         ndr_print_atsvc_JobInfo(ndr, "job_info", *r->out.job_info);
     887             :                 }
     888           2 :                 ndr->depth--;
     889           2 :                 ndr->depth--;
     890           2 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
     891           2 :                 ndr->depth--;
     892             :         }
     893           4 :         ndr->depth--;
     894             : }
     895             : 
     896             : #ifndef SKIP_NDR_TABLE_atsvc
     897             : static const struct ndr_interface_public_struct atsvc_public_structs[] = {
     898             :         { .name = NULL }
     899             : };
     900             : 
     901             : static const struct ndr_interface_call atsvc_calls[] = {
     902             :         {
     903             :                 "atsvc_JobAdd",
     904             :                 sizeof(struct atsvc_JobAdd),
     905             :                 (ndr_push_flags_fn_t) ndr_push_atsvc_JobAdd,
     906             :                 (ndr_pull_flags_fn_t) ndr_pull_atsvc_JobAdd,
     907             :                 (ndr_print_function_t) ndr_print_atsvc_JobAdd,
     908             :                 { 0, NULL },
     909             :                 { 0, NULL },
     910             :         },
     911             :         {
     912             :                 "atsvc_JobDel",
     913             :                 sizeof(struct atsvc_JobDel),
     914             :                 (ndr_push_flags_fn_t) ndr_push_atsvc_JobDel,
     915             :                 (ndr_pull_flags_fn_t) ndr_pull_atsvc_JobDel,
     916             :                 (ndr_print_function_t) ndr_print_atsvc_JobDel,
     917             :                 { 0, NULL },
     918             :                 { 0, NULL },
     919             :         },
     920             :         {
     921             :                 "atsvc_JobEnum",
     922             :                 sizeof(struct atsvc_JobEnum),
     923             :                 (ndr_push_flags_fn_t) ndr_push_atsvc_JobEnum,
     924             :                 (ndr_pull_flags_fn_t) ndr_pull_atsvc_JobEnum,
     925             :                 (ndr_print_function_t) ndr_print_atsvc_JobEnum,
     926             :                 { 0, NULL },
     927             :                 { 0, NULL },
     928             :         },
     929             :         {
     930             :                 "atsvc_JobGetInfo",
     931             :                 sizeof(struct atsvc_JobGetInfo),
     932             :                 (ndr_push_flags_fn_t) ndr_push_atsvc_JobGetInfo,
     933             :                 (ndr_pull_flags_fn_t) ndr_pull_atsvc_JobGetInfo,
     934             :                 (ndr_print_function_t) ndr_print_atsvc_JobGetInfo,
     935             :                 { 0, NULL },
     936             :                 { 0, NULL },
     937             :         },
     938             :         { .name = NULL }
     939             : };
     940             : 
     941             : static const char * const atsvc_endpoint_strings[] = {
     942             :         "ncacn_np:[\\pipe\\atsvc]", 
     943             :         "ncalrpc:", 
     944             : };
     945             : 
     946             : static const struct ndr_interface_string_array atsvc_endpoints = {
     947             :         .count  = 2,
     948             :         .names  = atsvc_endpoint_strings
     949             : };
     950             : 
     951             : static const char * const atsvc_authservice_strings[] = {
     952             :         "host", 
     953             : };
     954             : 
     955             : static const struct ndr_interface_string_array atsvc_authservices = {
     956             :         .count  = 1,
     957             :         .names  = atsvc_authservice_strings
     958             : };
     959             : 
     960             : 
     961             : const struct ndr_interface_table ndr_table_atsvc = {
     962             :         .name           = "atsvc",
     963             :         .syntax_id      = {
     964             :                 {0x1ff70682,0x0a51,0x30e8,{0x07,0x6d},{0x74,0x0b,0xe8,0xce,0xe9,0x8b}},
     965             :                 NDR_ATSVC_VERSION
     966             :         },
     967             :         .helpstring     = NDR_ATSVC_HELPSTRING,
     968             :         .num_calls      = 4,
     969             :         .calls          = atsvc_calls,
     970             :         .num_public_structs     = 0,
     971             :         .public_structs         = atsvc_public_structs,
     972             :         .endpoints      = &atsvc_endpoints,
     973             :         .authservices   = &atsvc_authservices
     974             : };
     975             : 
     976             : #endif /* SKIP_NDR_TABLE_atsvc */

Generated by: LCOV version 1.14