LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_echo.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 902 1087 83.0 %
Date: 2024-04-21 15:09:00 Functions: 69 70 98.6 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_echo.h"
       5             : 
       6         599 : _PUBLIC_ enum ndr_err_code ndr_push_echo_info1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_info1 *r)
       7             : {
       8         599 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
       9         599 :         if (ndr_flags & NDR_SCALARS) {
      10         599 :                 NDR_CHECK(ndr_push_align(ndr, 1));
      11         599 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v));
      12         599 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
      13             :         }
      14         599 :         if (ndr_flags & NDR_BUFFERS) {
      15           4 :         }
      16         599 :         return NDR_ERR_SUCCESS;
      17             : }
      18             : 
      19         565 : _PUBLIC_ enum ndr_err_code ndr_pull_echo_info1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_info1 *r)
      20             : {
      21         565 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      22         565 :         if (ndr_flags & NDR_SCALARS) {
      23         565 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
      24         565 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v));
      25         565 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
      26             :         }
      27         565 :         if (ndr_flags & NDR_BUFFERS) {
      28           4 :         }
      29         565 :         return NDR_ERR_SUCCESS;
      30             : }
      31             : 
      32           0 : static void ndr_print_flags_echo_info1(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct echo_info1 *r)
      33             : {
      34           0 :         ndr_print_echo_info1(ndr, name, r);
      35           0 : }
      36             : 
      37          68 : _PUBLIC_ void ndr_print_echo_info1(struct ndr_print *ndr, const char *name, const struct echo_info1 *r)
      38             : {
      39          68 :         ndr_print_struct(ndr, name, "echo_info1");
      40          68 :         if (r == NULL) { ndr_print_null(ndr); return; }
      41          68 :         ndr->depth++;
      42          68 :         ndr_print_uint8(ndr, "v", r->v);
      43          68 :         ndr->depth--;
      44             : }
      45             : 
      46         299 : static enum ndr_err_code ndr_push_echo_info2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_info2 *r)
      47             : {
      48         299 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      49         299 :         if (ndr_flags & NDR_SCALARS) {
      50         299 :                 NDR_CHECK(ndr_push_align(ndr, 2));
      51         299 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->v));
      52         299 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
      53             :         }
      54         299 :         if (ndr_flags & NDR_BUFFERS) {
      55           2 :         }
      56         299 :         return NDR_ERR_SUCCESS;
      57             : }
      58             : 
      59         282 : static enum ndr_err_code ndr_pull_echo_info2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_info2 *r)
      60             : {
      61         282 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      62         282 :         if (ndr_flags & NDR_SCALARS) {
      63         282 :                 NDR_CHECK(ndr_pull_align(ndr, 2));
      64         282 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->v));
      65         282 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
      66             :         }
      67         282 :         if (ndr_flags & NDR_BUFFERS) {
      68           2 :         }
      69         282 :         return NDR_ERR_SUCCESS;
      70             : }
      71             : 
      72          34 : _PUBLIC_ void ndr_print_echo_info2(struct ndr_print *ndr, const char *name, const struct echo_info2 *r)
      73             : {
      74          34 :         ndr_print_struct(ndr, name, "echo_info2");
      75          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
      76          34 :         ndr->depth++;
      77          34 :         ndr_print_uint16(ndr, "v", r->v);
      78          34 :         ndr->depth--;
      79             : }
      80             : 
      81         299 : static enum ndr_err_code ndr_push_echo_info3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_info3 *r)
      82             : {
      83         299 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      84         299 :         if (ndr_flags & NDR_SCALARS) {
      85         299 :                 NDR_CHECK(ndr_push_align(ndr, 4));
      86         299 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->v));
      87         299 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
      88             :         }
      89         299 :         if (ndr_flags & NDR_BUFFERS) {
      90           2 :         }
      91         299 :         return NDR_ERR_SUCCESS;
      92             : }
      93             : 
      94         282 : static enum ndr_err_code ndr_pull_echo_info3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_info3 *r)
      95             : {
      96         282 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      97         282 :         if (ndr_flags & NDR_SCALARS) {
      98         282 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
      99         282 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->v));
     100         282 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     101             :         }
     102         282 :         if (ndr_flags & NDR_BUFFERS) {
     103           2 :         }
     104         282 :         return NDR_ERR_SUCCESS;
     105             : }
     106             : 
     107          34 : _PUBLIC_ void ndr_print_echo_info3(struct ndr_print *ndr, const char *name, const struct echo_info3 *r)
     108             : {
     109          34 :         ndr_print_struct(ndr, name, "echo_info3");
     110          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     111          34 :         ndr->depth++;
     112          34 :         ndr_print_uint32(ndr, "v", r->v);
     113          34 :         ndr->depth--;
     114             : }
     115             : 
     116         598 : static enum ndr_err_code ndr_push_STRUCT_echo_info4(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_info4 *r)
     117             : {
     118         598 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     119         598 :         if (ndr_flags & NDR_SCALARS) {
     120         598 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     121         598 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->v));
     122         598 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     123             :         }
     124         598 :         if (ndr_flags & NDR_BUFFERS) {
     125           4 :         }
     126         598 :         return NDR_ERR_SUCCESS;
     127             : }
     128             : 
     129         564 : static enum ndr_err_code ndr_pull_STRUCT_echo_info4(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_info4 *r)
     130             : {
     131         564 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     132         564 :         if (ndr_flags & NDR_SCALARS) {
     133         564 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     134         564 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->v));
     135         564 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     136             :         }
     137         564 :         if (ndr_flags & NDR_BUFFERS) {
     138           4 :         }
     139         564 :         return NDR_ERR_SUCCESS;
     140             : }
     141             : 
     142          68 : _PUBLIC_ void ndr_print_STRUCT_echo_info4(struct ndr_print *ndr, const char *name, const struct echo_info4 *r)
     143             : {
     144          68 :         ndr_print_struct(ndr, name, "echo_info4");
     145          68 :         if (r == NULL) { ndr_print_null(ndr); return; }
     146          68 :         ndr->depth++;
     147          68 :         ndr_print_hyper(ndr, "v", r->v);
     148          68 :         ndr->depth--;
     149             : }
     150             : 
     151         299 : static enum ndr_err_code ndr_push_echo_info5(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_info5 *r)
     152             : {
     153         299 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     154         299 :         if (ndr_flags & NDR_SCALARS) {
     155         299 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     156         299 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1));
     157         299 :                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->v2));
     158         299 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     159             :         }
     160         299 :         if (ndr_flags & NDR_BUFFERS) {
     161           2 :         }
     162         299 :         return NDR_ERR_SUCCESS;
     163             : }
     164             : 
     165         282 : static enum ndr_err_code ndr_pull_echo_info5(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_info5 *r)
     166             : {
     167         282 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     168         282 :         if (ndr_flags & NDR_SCALARS) {
     169         282 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     170         282 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1));
     171         282 :                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->v2));
     172         282 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     173             :         }
     174         282 :         if (ndr_flags & NDR_BUFFERS) {
     175           2 :         }
     176         282 :         return NDR_ERR_SUCCESS;
     177             : }
     178             : 
     179          34 : _PUBLIC_ void ndr_print_echo_info5(struct ndr_print *ndr, const char *name, const struct echo_info5 *r)
     180             : {
     181          34 :         ndr_print_struct(ndr, name, "echo_info5");
     182          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     183          34 :         ndr->depth++;
     184          34 :         ndr_print_uint8(ndr, "v1", r->v1);
     185          34 :         ndr_print_hyper(ndr, "v2", r->v2);
     186          34 :         ndr->depth--;
     187             : }
     188             : 
     189         299 : static enum ndr_err_code ndr_push_echo_info6(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_info6 *r)
     190             : {
     191         299 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     192         299 :         if (ndr_flags & NDR_SCALARS) {
     193         299 :                 NDR_CHECK(ndr_push_align(ndr, 1));
     194         299 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1));
     195         299 :                 NDR_CHECK(ndr_push_echo_info1(ndr, NDR_SCALARS, &r->info1));
     196         299 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
     197             :         }
     198         299 :         if (ndr_flags & NDR_BUFFERS) {
     199           2 :         }
     200         299 :         return NDR_ERR_SUCCESS;
     201             : }
     202             : 
     203         282 : static enum ndr_err_code ndr_pull_echo_info6(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_info6 *r)
     204             : {
     205         282 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     206         282 :         if (ndr_flags & NDR_SCALARS) {
     207         282 :                 NDR_CHECK(ndr_pull_align(ndr, 1));
     208         282 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1));
     209         282 :                 NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_SCALARS, &r->info1));
     210         282 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
     211             :         }
     212         282 :         if (ndr_flags & NDR_BUFFERS) {
     213           2 :         }
     214         282 :         return NDR_ERR_SUCCESS;
     215             : }
     216             : 
     217          34 : _PUBLIC_ void ndr_print_echo_info6(struct ndr_print *ndr, const char *name, const struct echo_info6 *r)
     218             : {
     219          34 :         ndr_print_struct(ndr, name, "echo_info6");
     220          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     221          34 :         ndr->depth++;
     222          34 :         ndr_print_uint8(ndr, "v1", r->v1);
     223          34 :         ndr_print_echo_info1(ndr, "info1", &r->info1);
     224          34 :         ndr->depth--;
     225             : }
     226             : 
     227         299 : static enum ndr_err_code ndr_push_echo_info7(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_info7 *r)
     228             : {
     229         299 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     230         299 :         if (ndr_flags & NDR_SCALARS) {
     231         299 :                 NDR_CHECK(ndr_push_align(ndr, 8));
     232         299 :                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->v1));
     233         299 :                 NDR_CHECK(ndr_push_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4));
     234         299 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 8));
     235             :         }
     236         299 :         if (ndr_flags & NDR_BUFFERS) {
     237           2 :         }
     238         299 :         return NDR_ERR_SUCCESS;
     239             : }
     240             : 
     241         282 : static enum ndr_err_code ndr_pull_echo_info7(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_info7 *r)
     242             : {
     243         282 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     244         282 :         if (ndr_flags & NDR_SCALARS) {
     245         282 :                 NDR_CHECK(ndr_pull_align(ndr, 8));
     246         282 :                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->v1));
     247         282 :                 NDR_CHECK(ndr_pull_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4));
     248         282 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
     249             :         }
     250         282 :         if (ndr_flags & NDR_BUFFERS) {
     251           2 :         }
     252         282 :         return NDR_ERR_SUCCESS;
     253             : }
     254             : 
     255          34 : _PUBLIC_ void ndr_print_echo_info7(struct ndr_print *ndr, const char *name, const struct echo_info7 *r)
     256             : {
     257          34 :         ndr_print_struct(ndr, name, "echo_info7");
     258          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     259          34 :         ndr->depth++;
     260          34 :         ndr_print_uint8(ndr, "v1", r->v1);
     261          34 :         ndr_print_STRUCT_echo_info4(ndr, "info4", &r->info4);
     262          34 :         ndr->depth--;
     263             : }
     264             : 
     265        2093 : static enum ndr_err_code ndr_push_echo_Info(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union echo_Info *r)
     266             : {
     267          14 :         uint32_t level;
     268        2093 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     269        2093 :         if (ndr_flags & NDR_SCALARS) {
     270             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     271        2093 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     272        2093 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
     273        2093 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
     274        2093 :                 NDR_CHECK(ndr_push_union_align(ndr, 8));
     275        2093 :                 switch (level) {
     276         299 :                         case 1: {
     277         299 :                                 NDR_CHECK(ndr_push_echo_info1(ndr, NDR_SCALARS, &r->info1));
     278         297 :                         break; }
     279             : 
     280         299 :                         case 2: {
     281         299 :                                 NDR_CHECK(ndr_push_echo_info2(ndr, NDR_SCALARS, &r->info2));
     282         297 :                         break; }
     283             : 
     284         299 :                         case 3: {
     285         299 :                                 NDR_CHECK(ndr_push_echo_info3(ndr, NDR_SCALARS, &r->info3));
     286         297 :                         break; }
     287             : 
     288         299 :                         case 4: {
     289         299 :                                 NDR_CHECK(ndr_push_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4));
     290         297 :                         break; }
     291             : 
     292         299 :                         case 5: {
     293         299 :                                 NDR_CHECK(ndr_push_echo_info5(ndr, NDR_SCALARS, &r->info5));
     294         297 :                         break; }
     295             : 
     296         299 :                         case 6: {
     297         299 :                                 NDR_CHECK(ndr_push_echo_info6(ndr, NDR_SCALARS, &r->info6));
     298         297 :                         break; }
     299             : 
     300         299 :                         case 7: {
     301         299 :                                 NDR_CHECK(ndr_push_echo_info7(ndr, NDR_SCALARS, &r->info7));
     302         297 :                         break; }
     303             : 
     304           0 :                         default:
     305           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     306             :                 }
     307             :         }
     308        2093 :         if (ndr_flags & NDR_BUFFERS) {
     309           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     310             :                         /* We didn't get it above, and the token is not needed after this. */
     311           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     312             :                 }
     313           0 :                 switch (level) {
     314           0 :                         case 1:
     315           0 :                         break;
     316             : 
     317           0 :                         case 2:
     318           0 :                         break;
     319             : 
     320           0 :                         case 3:
     321           0 :                         break;
     322             : 
     323           0 :                         case 4:
     324           0 :                         break;
     325             : 
     326           0 :                         case 5:
     327           0 :                         break;
     328             : 
     329           0 :                         case 6:
     330           0 :                         break;
     331             : 
     332           0 :                         case 7:
     333           0 :                         break;
     334             : 
     335           0 :                         default:
     336           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     337             :                 }
     338             :         }
     339        2079 :         return NDR_ERR_SUCCESS;
     340             : }
     341             : 
     342        1974 : static enum ndr_err_code ndr_pull_echo_Info(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union echo_Info *r)
     343             : {
     344          14 :         uint32_t level;
     345          14 :         uint16_t _level;
     346        1974 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     347        1974 :         if (ndr_flags & NDR_SCALARS) {
     348             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     349        1974 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     350        1974 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
     351        1974 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
     352        1974 :                 if (_level != level) {
     353           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
     354             :                 }
     355        1974 :                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
     356        1974 :                 switch (level) {
     357         282 :                         case 1: {
     358         282 :                                 NDR_CHECK(ndr_pull_echo_info1(ndr, NDR_SCALARS, &r->info1));
     359         280 :                         break; }
     360             : 
     361         282 :                         case 2: {
     362         282 :                                 NDR_CHECK(ndr_pull_echo_info2(ndr, NDR_SCALARS, &r->info2));
     363         280 :                         break; }
     364             : 
     365         282 :                         case 3: {
     366         282 :                                 NDR_CHECK(ndr_pull_echo_info3(ndr, NDR_SCALARS, &r->info3));
     367         280 :                         break; }
     368             : 
     369         282 :                         case 4: {
     370         282 :                                 NDR_CHECK(ndr_pull_STRUCT_echo_info4(ndr, NDR_SCALARS, &r->info4));
     371         280 :                         break; }
     372             : 
     373         282 :                         case 5: {
     374         282 :                                 NDR_CHECK(ndr_pull_echo_info5(ndr, NDR_SCALARS, &r->info5));
     375         280 :                         break; }
     376             : 
     377         282 :                         case 6: {
     378         282 :                                 NDR_CHECK(ndr_pull_echo_info6(ndr, NDR_SCALARS, &r->info6));
     379         280 :                         break; }
     380             : 
     381         282 :                         case 7: {
     382         282 :                                 NDR_CHECK(ndr_pull_echo_info7(ndr, NDR_SCALARS, &r->info7));
     383         280 :                         break; }
     384             : 
     385           0 :                         default:
     386           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     387             :                 }
     388             :         }
     389        1974 :         if (ndr_flags & NDR_BUFFERS) {
     390           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     391             :                         /* We didn't get it above, and the token is not needed after this. */
     392           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     393             :                 }
     394           0 :                 switch (level) {
     395           0 :                         case 1:
     396           0 :                         break;
     397             : 
     398           0 :                         case 2:
     399           0 :                         break;
     400             : 
     401           0 :                         case 3:
     402           0 :                         break;
     403             : 
     404           0 :                         case 4:
     405           0 :                         break;
     406             : 
     407           0 :                         case 5:
     408           0 :                         break;
     409             : 
     410           0 :                         case 6:
     411           0 :                         break;
     412             : 
     413           0 :                         case 7:
     414           0 :                         break;
     415             : 
     416           0 :                         default:
     417           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     418             :                 }
     419             :         }
     420        1960 :         return NDR_ERR_SUCCESS;
     421             : }
     422             : 
     423         238 : _PUBLIC_ void ndr_print_echo_Info(struct ndr_print *ndr, const char *name, const union echo_Info *r)
     424             : {
     425           0 :         uint32_t level;
     426         238 :         level = ndr_print_steal_switch_value(ndr, r);
     427         238 :         ndr_print_union(ndr, name, level, "echo_Info");
     428         238 :         switch (level) {
     429          34 :                 case 1:
     430          34 :                         ndr_print_echo_info1(ndr, "info1", &r->info1);
     431          34 :                 break;
     432             : 
     433          34 :                 case 2:
     434          34 :                         ndr_print_echo_info2(ndr, "info2", &r->info2);
     435          34 :                 break;
     436             : 
     437          34 :                 case 3:
     438          34 :                         ndr_print_echo_info3(ndr, "info3", &r->info3);
     439          34 :                 break;
     440             : 
     441          34 :                 case 4:
     442          34 :                         ndr_print_STRUCT_echo_info4(ndr, "info4", &r->info4);
     443          34 :                 break;
     444             : 
     445          34 :                 case 5:
     446          34 :                         ndr_print_echo_info5(ndr, "info5", &r->info5);
     447          34 :                 break;
     448             : 
     449          34 :                 case 6:
     450          34 :                         ndr_print_echo_info6(ndr, "info6", &r->info6);
     451          34 :                 break;
     452             : 
     453          34 :                 case 7:
     454          34 :                         ndr_print_echo_info7(ndr, "info7", &r->info7);
     455          34 :                 break;
     456             : 
     457           0 :                 default:
     458           0 :                         ndr_print_bad_level(ndr, name, level);
     459             :         }
     460         238 : }
     461             : 
     462        1755 : static enum ndr_err_code ndr_push_echo_Enum1(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum echo_Enum1 r)
     463             : {
     464        1755 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
     465        1743 :         return NDR_ERR_SUCCESS;
     466             : }
     467             : 
     468        1704 : static enum ndr_err_code ndr_pull_echo_Enum1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum echo_Enum1 *r)
     469             : {
     470          12 :         uint16_t v;
     471        1704 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
     472        1704 :         *r = v;
     473        1704 :         return NDR_ERR_SUCCESS;
     474             : }
     475             : 
     476         102 : _PUBLIC_ void ndr_print_echo_Enum1(struct ndr_print *ndr, const char *name, enum echo_Enum1 r)
     477             : {
     478         102 :         const char *val = NULL;
     479             : 
     480         102 :         switch (r) {
     481          34 :                 case ECHO_ENUM1: val = "ECHO_ENUM1"; break;
     482          68 :                 case ECHO_ENUM2: val = "ECHO_ENUM2"; break;
     483             :         }
     484         102 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     485         102 : }
     486             : 
     487         585 : static enum ndr_err_code ndr_push_echo_Enum1_32(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum echo_Enum1_32 r)
     488             : {
     489         585 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     490         581 :         return NDR_ERR_SUCCESS;
     491             : }
     492             : 
     493         568 : static enum ndr_err_code ndr_pull_echo_Enum1_32(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum echo_Enum1_32 *r)
     494             : {
     495           4 :         uint32_t v;
     496         568 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     497         568 :         *r = v;
     498         568 :         return NDR_ERR_SUCCESS;
     499             : }
     500             : 
     501          34 : _PUBLIC_ void ndr_print_echo_Enum1_32(struct ndr_print *ndr, const char *name, enum echo_Enum1_32 r)
     502             : {
     503          34 :         const char *val = NULL;
     504             : 
     505          34 :         switch (r) {
     506          34 :                 case ECHO_ENUM1_32: val = "ECHO_ENUM1_32"; break;
     507           0 :                 case ECHO_ENUM2_32: val = "ECHO_ENUM2_32"; break;
     508             :         }
     509          34 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     510          34 : }
     511             : 
     512         585 : static enum ndr_err_code ndr_push_echo_Enum2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_Enum2 *r)
     513             : {
     514         585 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     515         585 :         if (ndr_flags & NDR_SCALARS) {
     516         585 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     517         589 :                 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, r->e1));
     518         589 :                 NDR_CHECK(ndr_push_echo_Enum1_32(ndr, NDR_SCALARS, r->e2));
     519         585 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     520             :         }
     521         585 :         if (ndr_flags & NDR_BUFFERS) {
     522           4 :         }
     523         585 :         return NDR_ERR_SUCCESS;
     524             : }
     525             : 
     526         568 : static enum ndr_err_code ndr_pull_echo_Enum2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_Enum2 *r)
     527             : {
     528         568 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     529         568 :         if (ndr_flags & NDR_SCALARS) {
     530         568 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     531         572 :                 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, &r->e1));
     532         572 :                 NDR_CHECK(ndr_pull_echo_Enum1_32(ndr, NDR_SCALARS, &r->e2));
     533         568 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     534             :         }
     535         568 :         if (ndr_flags & NDR_BUFFERS) {
     536           4 :         }
     537         568 :         return NDR_ERR_SUCCESS;
     538             : }
     539             : 
     540          34 : _PUBLIC_ void ndr_print_echo_Enum2(struct ndr_print *ndr, const char *name, const struct echo_Enum2 *r)
     541             : {
     542          34 :         ndr_print_struct(ndr, name, "echo_Enum2");
     543          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     544          34 :         ndr->depth++;
     545          34 :         ndr_print_echo_Enum1(ndr, "e1", r->e1);
     546          34 :         ndr_print_echo_Enum1_32(ndr, "e2", r->e2);
     547          34 :         ndr->depth--;
     548             : }
     549             : 
     550         585 : static enum ndr_err_code ndr_push_echo_Enum3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union echo_Enum3 *r)
     551             : {
     552           4 :         uint32_t level;
     553         585 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     554         585 :         if (ndr_flags & NDR_SCALARS) {
     555             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     556         585 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     557         585 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
     558         585 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
     559         585 :                 NDR_CHECK(ndr_push_union_align(ndr, 4));
     560         585 :                 switch (level) {
     561         585 :                         case ECHO_ENUM1: {
     562         589 :                                 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, r->e1));
     563         581 :                         break; }
     564             : 
     565           0 :                         case ECHO_ENUM2: {
     566           0 :                                 NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, &r->e2));
     567           0 :                         break; }
     568             : 
     569           0 :                         default:
     570           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     571             :                 }
     572             :         }
     573         585 :         if (ndr_flags & NDR_BUFFERS) {
     574           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     575             :                         /* We didn't get it above, and the token is not needed after this. */
     576           0 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
     577             :                 }
     578           0 :                 switch (level) {
     579           0 :                         case ECHO_ENUM1:
     580           0 :                         break;
     581             : 
     582           0 :                         case ECHO_ENUM2:
     583           0 :                         break;
     584             : 
     585           0 :                         default:
     586           0 :                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
     587             :                 }
     588             :         }
     589         581 :         return NDR_ERR_SUCCESS;
     590             : }
     591             : 
     592         568 : static enum ndr_err_code ndr_pull_echo_Enum3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union echo_Enum3 *r)
     593             : {
     594           4 :         uint32_t level;
     595           4 :         uint16_t _level;
     596         568 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     597         568 :         if (ndr_flags & NDR_SCALARS) {
     598             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
     599         568 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     600         568 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
     601         568 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
     602         568 :                 if (_level != level) {
     603           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
     604             :                 }
     605         568 :                 NDR_CHECK(ndr_pull_union_align(ndr, 4));
     606         568 :                 switch (level) {
     607         568 :                         case ECHO_ENUM1: {
     608         572 :                                 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, &r->e1));
     609         564 :                         break; }
     610             : 
     611           0 :                         case ECHO_ENUM2: {
     612           0 :                                 NDR_CHECK(ndr_pull_echo_Enum2(ndr, NDR_SCALARS, &r->e2));
     613           0 :                         break; }
     614             : 
     615           0 :                         default:
     616           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     617             :                 }
     618             :         }
     619         568 :         if (ndr_flags & NDR_BUFFERS) {
     620           0 :                 if (!(ndr_flags & NDR_SCALARS)) {
     621             :                         /* We didn't get it above, and the token is not needed after this. */
     622           0 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
     623             :                 }
     624           0 :                 switch (level) {
     625           0 :                         case ECHO_ENUM1:
     626           0 :                         break;
     627             : 
     628           0 :                         case ECHO_ENUM2:
     629           0 :                         break;
     630             : 
     631           0 :                         default:
     632           0 :                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
     633             :                 }
     634             :         }
     635         564 :         return NDR_ERR_SUCCESS;
     636             : }
     637             : 
     638          34 : _PUBLIC_ void ndr_print_echo_Enum3(struct ndr_print *ndr, const char *name, const union echo_Enum3 *r)
     639             : {
     640           0 :         uint32_t level;
     641          34 :         level = ndr_print_steal_switch_value(ndr, r);
     642          34 :         ndr_print_union(ndr, name, level, "echo_Enum3");
     643          34 :         switch (level) {
     644          34 :                 case ECHO_ENUM1:
     645          34 :                         ndr_print_echo_Enum1(ndr, "e1", r->e1);
     646          34 :                 break;
     647             : 
     648           0 :                 case ECHO_ENUM2:
     649           0 :                         ndr_print_echo_Enum2(ndr, "e2", &r->e2);
     650           0 :                 break;
     651             : 
     652           0 :                 default:
     653           0 :                         ndr_print_bad_level(ndr, name, level);
     654             :         }
     655          34 : }
     656             : 
     657         587 : static enum ndr_err_code ndr_push_echo_Surrounding(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct echo_Surrounding *r)
     658             : {
     659           4 :         uint32_t cntr_surrounding_0;
     660         587 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     661         587 :         if (ndr_flags & NDR_SCALARS) {
     662         587 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->x));
     663         587 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     664         587 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->x));
     665       18279 :                 for (cntr_surrounding_0 = 0; cntr_surrounding_0 < (r->x); cntr_surrounding_0++) {
     666       17692 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->surrounding[cntr_surrounding_0]));
     667             :                 }
     668         587 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     669             :         }
     670         587 :         if (ndr_flags & NDR_BUFFERS) {
     671           4 :         }
     672         587 :         return NDR_ERR_SUCCESS;
     673             : }
     674             : 
     675         570 : static enum ndr_err_code ndr_pull_echo_Surrounding(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct echo_Surrounding *r)
     676             : {
     677         570 :         uint32_t size_surrounding_0 = 0;
     678           4 :         uint32_t cntr_surrounding_0;
     679         570 :         TALLOC_CTX *_mem_save_surrounding_0 = NULL;
     680         570 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     681         570 :         if (ndr_flags & NDR_SCALARS) {
     682         570 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->surrounding));
     683         570 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     684         570 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->x));
     685         570 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->surrounding, &size_surrounding_0));
     686         570 :                 NDR_PULL_ALLOC_N(ndr, r->surrounding, size_surrounding_0);
     687         570 :                 _mem_save_surrounding_0 = NDR_PULL_GET_MEM_CTX(ndr);
     688         570 :                 NDR_PULL_SET_MEM_CTX(ndr, r->surrounding, 0);
     689       17582 :                 for (cntr_surrounding_0 = 0; cntr_surrounding_0 < (size_surrounding_0); cntr_surrounding_0++) {
     690       17012 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->surrounding[cntr_surrounding_0]));
     691             :                 }
     692         570 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_surrounding_0, 0);
     693         570 :                 if (r->surrounding) {
     694         570 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->surrounding, r->x));
     695             :                 }
     696         570 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     697             :         }
     698         570 :         if (ndr_flags & NDR_BUFFERS) {
     699           4 :         }
     700         570 :         return NDR_ERR_SUCCESS;
     701             : }
     702             : 
     703          34 : _PUBLIC_ void ndr_print_echo_Surrounding(struct ndr_print *ndr, const char *name, const struct echo_Surrounding *r)
     704             : {
     705           0 :         uint32_t cntr_surrounding_0;
     706          34 :         ndr_print_struct(ndr, name, "echo_Surrounding");
     707          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     708          34 :         ndr->depth++;
     709          34 :         ndr_print_uint32(ndr, "x", r->x);
     710          34 :         ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "surrounding", (uint32_t)(r->x));
     711          34 :         ndr->depth++;
     712        1394 :         for (cntr_surrounding_0 = 0; cntr_surrounding_0 < (r->x); cntr_surrounding_0++) {
     713        1360 :                 ndr_print_uint16(ndr, "surrounding", r->surrounding[cntr_surrounding_0]);
     714             :         }
     715          34 :         ndr->depth--;
     716          34 :         ndr->depth--;
     717             : }
     718             : 
     719       41321 : static enum ndr_err_code ndr_push_echo_AddOne(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_AddOne *r)
     720             : {
     721       41321 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     722       41321 :         if (flags & NDR_IN) {
     723       20539 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data));
     724             :         }
     725       41321 :         if (flags & NDR_OUT) {
     726       20782 :                 if (r->out.out_data == NULL) {
     727           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     728             :                 }
     729       20782 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.out_data));
     730             :         }
     731        8199 :         return NDR_ERR_SUCCESS;
     732             : }
     733             : 
     734       41083 : static enum ndr_err_code ndr_pull_echo_AddOne(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_AddOne *r)
     735             : {
     736       41083 :         TALLOC_CTX *_mem_save_out_data_0 = NULL;
     737       41083 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     738       41083 :         if (flags & NDR_IN) {
     739       20544 :                 NDR_ZERO_STRUCT(r->out);
     740             : 
     741       20544 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.in_data));
     742       20544 :                 NDR_PULL_ALLOC(ndr, r->out.out_data);
     743       20544 :                 NDR_ZERO_STRUCTP(r->out.out_data);
     744             :         }
     745       41083 :         if (flags & NDR_OUT) {
     746             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     747             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     748       20539 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     749       16801 :                         NDR_PULL_ALLOC(ndr, r->out.out_data);
     750             :                 }
     751       20539 :                 _mem_save_out_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
     752       20539 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.out_data, LIBNDR_FLAG_REF_ALLOC);
     753       20539 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.out_data));
     754       20539 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_data_0, LIBNDR_FLAG_REF_ALLOC);
     755             :         }
     756        7961 :         return NDR_ERR_SUCCESS;
     757             : }
     758             : 
     759         476 : _PUBLIC_ void ndr_print_echo_AddOne(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_AddOne *r)
     760             : {
     761         476 :         ndr_print_struct(ndr, name, "echo_AddOne");
     762         476 :         if (r == NULL) { ndr_print_null(ndr); return; }
     763         476 :         ndr->depth++;
     764         476 :         if (flags & NDR_SET_VALUES) {
     765           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     766             :         }
     767         476 :         if (flags & NDR_IN) {
     768           0 :                 ndr_print_struct(ndr, "in", "echo_AddOne");
     769           0 :                 ndr->depth++;
     770           0 :                 ndr_print_uint32(ndr, "in_data", r->in.in_data);
     771           0 :                 ndr->depth--;
     772             :         }
     773         476 :         if (flags & NDR_OUT) {
     774         476 :                 ndr_print_struct(ndr, "out", "echo_AddOne");
     775         476 :                 ndr->depth++;
     776         476 :                 ndr_print_ptr(ndr, "out_data", r->out.out_data);
     777         476 :                 ndr->depth++;
     778         476 :                 ndr_print_uint32(ndr, "out_data", *r->out.out_data);
     779         476 :                 ndr->depth--;
     780         476 :                 ndr->depth--;
     781             :         }
     782         476 :         ndr->depth--;
     783             : }
     784             : 
     785         605 : static enum ndr_err_code ndr_push_echo_EchoData(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_EchoData *r)
     786             : {
     787         605 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     788         605 :         if (flags & NDR_IN) {
     789         294 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
     790         294 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.len));
     791         294 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.in_data, r->in.len));
     792             :         }
     793         605 :         if (flags & NDR_OUT) {
     794         311 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.len));
     795         311 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.out_data, r->in.len));
     796             :         }
     797         599 :         return NDR_ERR_SUCCESS;
     798             : }
     799             : 
     800         588 : static enum ndr_err_code ndr_pull_echo_EchoData(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_EchoData *r)
     801             : {
     802         588 :         uint32_t size_in_data_0 = 0;
     803         588 :         uint32_t size_out_data_0 = 0;
     804         588 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     805         588 :         if (flags & NDR_IN) {
     806         294 :                 NDR_ZERO_STRUCT(r->out);
     807             : 
     808         294 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
     809         294 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.in_data));
     810         294 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.in_data, &size_in_data_0));
     811         294 :                 NDR_PULL_ALLOC_N(ndr, r->in.in_data, size_in_data_0);
     812         294 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.in_data, size_in_data_0));
     813         294 :                 if (r->in.in_data) {
     814         294 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.in_data, r->in.len));
     815             :                 }
     816             :         }
     817         588 :         if (flags & NDR_OUT) {
     818             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     819             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     820         294 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.out_data));
     821         294 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.out_data, &size_out_data_0));
     822         294 :                 NDR_PULL_ALLOC_N(ndr, r->out.out_data, size_out_data_0);
     823         294 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.out_data, size_out_data_0));
     824         294 :                 if (r->out.out_data) {
     825         294 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.out_data, r->in.len));
     826             :                 }
     827             :         }
     828         582 :         return NDR_ERR_SUCCESS;
     829             : }
     830             : 
     831          34 : _PUBLIC_ void ndr_print_echo_EchoData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_EchoData *r)
     832             : {
     833          34 :         ndr_print_struct(ndr, name, "echo_EchoData");
     834          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     835          34 :         ndr->depth++;
     836          34 :         if (flags & NDR_SET_VALUES) {
     837           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     838             :         }
     839          34 :         if (flags & NDR_IN) {
     840           0 :                 ndr_print_struct(ndr, "in", "echo_EchoData");
     841           0 :                 ndr->depth++;
     842           0 :                 ndr_print_uint32(ndr, "len", r->in.len);
     843           0 :                 ndr_print_array_uint8(ndr, "in_data", r->in.in_data, r->in.len);
     844           0 :                 ndr->depth--;
     845             :         }
     846          34 :         if (flags & NDR_OUT) {
     847          34 :                 ndr_print_struct(ndr, "out", "echo_EchoData");
     848          34 :                 ndr->depth++;
     849          34 :                 ndr_print_array_uint8(ndr, "out_data", r->out.out_data, r->in.len);
     850          34 :                 ndr->depth--;
     851             :         }
     852          34 :         ndr->depth--;
     853             : }
     854             : 
     855         589 : static enum ndr_err_code ndr_push_echo_SinkData(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_SinkData *r)
     856             : {
     857         589 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     858         589 :         if (flags & NDR_IN) {
     859         286 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
     860         286 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.len));
     861         286 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.len));
     862             :         }
     863         589 :         if (flags & NDR_OUT) {
     864           4 :         }
     865         589 :         return NDR_ERR_SUCCESS;
     866             : }
     867             : 
     868         572 : static enum ndr_err_code ndr_pull_echo_SinkData(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_SinkData *r)
     869             : {
     870         572 :         uint32_t size_data_0 = 0;
     871         572 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     872         572 :         if (flags & NDR_IN) {
     873         286 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
     874         286 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
     875         286 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.data, &size_data_0));
     876         286 :                 NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_0);
     877         286 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, size_data_0));
     878         286 :                 if (r->in.data) {
     879         286 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.data, r->in.len));
     880             :                 }
     881             :         }
     882         572 :         if (flags & NDR_OUT) {
     883             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     884             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     885           4 :         }
     886         572 :         return NDR_ERR_SUCCESS;
     887             : }
     888             : 
     889          34 : _PUBLIC_ void ndr_print_echo_SinkData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_SinkData *r)
     890             : {
     891          34 :         ndr_print_struct(ndr, name, "echo_SinkData");
     892          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     893          34 :         ndr->depth++;
     894          34 :         if (flags & NDR_SET_VALUES) {
     895           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     896             :         }
     897          34 :         if (flags & NDR_IN) {
     898           0 :                 ndr_print_struct(ndr, "in", "echo_SinkData");
     899           0 :                 ndr->depth++;
     900           0 :                 ndr_print_uint32(ndr, "len", r->in.len);
     901           0 :                 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.len);
     902           0 :                 ndr->depth--;
     903             :         }
     904          34 :         if (flags & NDR_OUT) {
     905          34 :                 ndr_print_struct(ndr, "out", "echo_SinkData");
     906          34 :                 ndr->depth++;
     907          34 :                 ndr->depth--;
     908             :         }
     909          34 :         ndr->depth--;
     910             : }
     911             : 
     912         589 : static enum ndr_err_code ndr_push_echo_SourceData(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_SourceData *r)
     913             : {
     914         589 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     915         589 :         if (flags & NDR_IN) {
     916         286 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.len));
     917             :         }
     918         589 :         if (flags & NDR_OUT) {
     919         303 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.len));
     920         303 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.len));
     921             :         }
     922         585 :         return NDR_ERR_SUCCESS;
     923             : }
     924             : 
     925         572 : static enum ndr_err_code ndr_pull_echo_SourceData(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_SourceData *r)
     926             : {
     927         572 :         uint32_t size_data_0 = 0;
     928         572 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     929         572 :         if (flags & NDR_IN) {
     930         286 :                 NDR_ZERO_STRUCT(r->out);
     931             : 
     932         286 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.len));
     933             :         }
     934         572 :         if (flags & NDR_OUT) {
     935             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     936             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     937         286 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
     938         286 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.data, &size_data_0));
     939         286 :                 NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_0);
     940         286 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, size_data_0));
     941         286 :                 if (r->out.data) {
     942         286 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.data, r->in.len));
     943             :                 }
     944             :         }
     945         568 :         return NDR_ERR_SUCCESS;
     946             : }
     947             : 
     948          34 : _PUBLIC_ void ndr_print_echo_SourceData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_SourceData *r)
     949             : {
     950          34 :         ndr_print_struct(ndr, name, "echo_SourceData");
     951          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
     952          34 :         ndr->depth++;
     953          34 :         if (flags & NDR_SET_VALUES) {
     954           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     955             :         }
     956          34 :         if (flags & NDR_IN) {
     957           0 :                 ndr_print_struct(ndr, "in", "echo_SourceData");
     958           0 :                 ndr->depth++;
     959           0 :                 ndr_print_uint32(ndr, "len", r->in.len);
     960           0 :                 ndr->depth--;
     961             :         }
     962          34 :         if (flags & NDR_OUT) {
     963          34 :                 ndr_print_struct(ndr, "out", "echo_SourceData");
     964          34 :                 ndr->depth++;
     965          34 :                 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.len);
     966          34 :                 ndr->depth--;
     967             :         }
     968          34 :         ndr->depth--;
     969             : }
     970             : 
     971         587 : static enum ndr_err_code ndr_push_echo_TestCall(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_TestCall *r)
     972             : {
     973         587 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     974         587 :         if (flags & NDR_IN) {
     975         287 :                 if (r->in.s1 == NULL) {
     976           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     977             :                 }
     978         287 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.s1, CH_UTF16)));
     979         287 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     980         287 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.s1, CH_UTF16)));
     981         287 :                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.s1, ndr_charset_length(r->in.s1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     982             :         }
     983         587 :         if (flags & NDR_OUT) {
     984         300 :                 if (r->out.s2 == NULL) {
     985           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     986             :                 }
     987         300 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.s2));
     988         300 :                 if (*r->out.s2) {
     989         300 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16)));
     990         300 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
     991         300 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.s2, CH_UTF16)));
     992         300 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.s2, ndr_charset_length(*r->out.s2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
     993             :                 }
     994             :         }
     995         583 :         return NDR_ERR_SUCCESS;
     996             : }
     997             : 
     998         570 : static enum ndr_err_code ndr_pull_echo_TestCall(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_TestCall *r)
     999             : {
    1000         570 :         uint32_t size_s1_1 = 0;
    1001         570 :         uint32_t length_s1_1 = 0;
    1002           4 :         uint32_t _ptr_s2;
    1003         570 :         uint32_t size_s2_2 = 0;
    1004         570 :         uint32_t length_s2_2 = 0;
    1005         570 :         TALLOC_CTX *_mem_save_s2_0 = NULL;
    1006         570 :         TALLOC_CTX *_mem_save_s2_1 = NULL;
    1007         570 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    1008         570 :         if (flags & NDR_IN) {
    1009         287 :                 NDR_ZERO_STRUCT(r->out);
    1010             : 
    1011         287 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.s1));
    1012         287 :                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.s1));
    1013         287 :                 NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.s1, &size_s1_1));
    1014         287 :                 NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.s1, &length_s1_1));
    1015         287 :                 if (length_s1_1 > size_s1_1) {
    1016           0 :                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_s1_1, length_s1_1);
    1017             :                 }
    1018         287 :                 NDR_CHECK(ndr_check_string_terminator(ndr, length_s1_1, sizeof(uint16_t)));
    1019         287 :                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.s1, length_s1_1, sizeof(uint16_t), CH_UTF16));
    1020         287 :                 NDR_PULL_ALLOC(ndr, r->out.s2);
    1021         287 :                 NDR_ZERO_STRUCTP(r->out.s2);
    1022             :         }
    1023         570 :         if (flags & NDR_OUT) {
    1024             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    1025             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    1026         283 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1027          20 :                         NDR_PULL_ALLOC(ndr, r->out.s2);
    1028             :                 }
    1029         283 :                 _mem_save_s2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1030         283 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.s2, LIBNDR_FLAG_REF_ALLOC);
    1031         283 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s2));
    1032         283 :                 if (_ptr_s2) {
    1033         283 :                         NDR_PULL_ALLOC(ndr, *r->out.s2);
    1034             :                 } else {
    1035           0 :                         *r->out.s2 = NULL;
    1036             :                 }
    1037         283 :                 if (*r->out.s2) {
    1038         283 :                         _mem_save_s2_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1039         283 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.s2, 0);
    1040         283 :                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.s2));
    1041         283 :                         NDR_CHECK(ndr_pull_array_length(ndr, r->out.s2));
    1042         283 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.s2, &size_s2_2));
    1043         283 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.s2, &length_s2_2));
    1044         283 :                         if (length_s2_2 > size_s2_2) {
    1045           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_s2_2, length_s2_2);
    1046             :                         }
    1047         283 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_s2_2, sizeof(uint16_t)));
    1048         283 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.s2, length_s2_2, sizeof(uint16_t), CH_UTF16));
    1049         283 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_1, 0);
    1050             :                 }
    1051         283 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s2_0, LIBNDR_FLAG_REF_ALLOC);
    1052             :         }
    1053         566 :         return NDR_ERR_SUCCESS;
    1054             : }
    1055             : 
    1056          34 : _PUBLIC_ void ndr_print_echo_TestCall(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_TestCall *r)
    1057             : {
    1058          34 :         ndr_print_struct(ndr, name, "echo_TestCall");
    1059          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1060          34 :         ndr->depth++;
    1061          34 :         if (flags & NDR_SET_VALUES) {
    1062           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    1063             :         }
    1064          34 :         if (flags & NDR_IN) {
    1065           0 :                 ndr_print_struct(ndr, "in", "echo_TestCall");
    1066           0 :                 ndr->depth++;
    1067           0 :                 ndr_print_ptr(ndr, "s1", r->in.s1);
    1068           0 :                 ndr->depth++;
    1069           0 :                 ndr_print_string(ndr, "s1", r->in.s1);
    1070           0 :                 ndr->depth--;
    1071           0 :                 ndr->depth--;
    1072             :         }
    1073          34 :         if (flags & NDR_OUT) {
    1074          34 :                 ndr_print_struct(ndr, "out", "echo_TestCall");
    1075          34 :                 ndr->depth++;
    1076          34 :                 ndr_print_ptr(ndr, "s2", r->out.s2);
    1077          34 :                 ndr->depth++;
    1078          34 :                 ndr_print_ptr(ndr, "s2", *r->out.s2);
    1079          34 :                 ndr->depth++;
    1080          34 :                 if (*r->out.s2) {
    1081          34 :                         ndr_print_string(ndr, "s2", *r->out.s2);
    1082             :                 }
    1083          34 :                 ndr->depth--;
    1084          34 :                 ndr->depth--;
    1085          34 :                 ndr->depth--;
    1086             :         }
    1087          34 :         ndr->depth--;
    1088             : }
    1089             : 
    1090        4071 : static enum ndr_err_code ndr_push_echo_TestCall2(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_TestCall2 *r)
    1091             : {
    1092        4071 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    1093        4071 :         if (flags & NDR_IN) {
    1094        1978 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
    1095             :         }
    1096        4071 :         if (flags & NDR_OUT) {
    1097        2093 :                 if (r->out.info == NULL) {
    1098           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1099             :                 }
    1100        2093 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
    1101        2093 :                 NDR_CHECK(ndr_push_echo_Info(ndr, NDR_SCALARS, r->out.info));
    1102        2093 :                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
    1103             :         }
    1104        4043 :         return NDR_ERR_SUCCESS;
    1105             : }
    1106             : 
    1107        3952 : static enum ndr_err_code ndr_pull_echo_TestCall2(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_TestCall2 *r)
    1108             : {
    1109        3952 :         TALLOC_CTX *_mem_save_info_0 = NULL;
    1110        3952 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    1111        3952 :         if (flags & NDR_IN) {
    1112        1978 :                 NDR_ZERO_STRUCT(r->out);
    1113             : 
    1114        1978 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
    1115        1978 :                 NDR_PULL_ALLOC(ndr, r->out.info);
    1116        1978 :                 NDR_ZERO_STRUCTP(r->out.info);
    1117             :         }
    1118        3952 :         if (flags & NDR_OUT) {
    1119             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    1120             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    1121        1974 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1122         133 :                         NDR_PULL_ALLOC(ndr, r->out.info);
    1123             :                 }
    1124        1974 :                 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1125        1974 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
    1126        1974 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
    1127        1974 :                 NDR_CHECK(ndr_pull_echo_Info(ndr, NDR_SCALARS, r->out.info));
    1128        1974 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
    1129        1974 :                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
    1130             :         }
    1131        3924 :         return NDR_ERR_SUCCESS;
    1132             : }
    1133             : 
    1134         238 : _PUBLIC_ void ndr_print_echo_TestCall2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_TestCall2 *r)
    1135             : {
    1136         238 :         ndr_print_struct(ndr, name, "echo_TestCall2");
    1137         238 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1138         238 :         ndr->depth++;
    1139         238 :         if (flags & NDR_SET_VALUES) {
    1140           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    1141             :         }
    1142         238 :         if (flags & NDR_IN) {
    1143           0 :                 ndr_print_struct(ndr, "in", "echo_TestCall2");
    1144           0 :                 ndr->depth++;
    1145           0 :                 ndr_print_uint16(ndr, "level", r->in.level);
    1146           0 :                 ndr->depth--;
    1147             :         }
    1148         238 :         if (flags & NDR_OUT) {
    1149         238 :                 ndr_print_struct(ndr, "out", "echo_TestCall2");
    1150         238 :                 ndr->depth++;
    1151         238 :                 ndr_print_ptr(ndr, "info", r->out.info);
    1152         238 :                 ndr->depth++;
    1153         238 :                 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
    1154         238 :                 ndr_print_echo_Info(ndr, "info", r->out.info);
    1155         238 :                 ndr->depth--;
    1156         238 :                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
    1157         238 :                 ndr->depth--;
    1158             :         }
    1159         238 :         ndr->depth--;
    1160             : }
    1161             : 
    1162         291 : static enum ndr_err_code ndr_push_echo_TestSleep(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_TestSleep *r)
    1163             : {
    1164         291 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    1165         291 :         if (flags & NDR_IN) {
    1166         144 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.seconds));
    1167             :         }
    1168         291 :         if (flags & NDR_OUT) {
    1169         147 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->out.result));
    1170             :         }
    1171         291 :         return NDR_ERR_SUCCESS;
    1172             : }
    1173             : 
    1174         288 : static enum ndr_err_code ndr_pull_echo_TestSleep(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_TestSleep *r)
    1175             : {
    1176         288 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    1177         288 :         if (flags & NDR_IN) {
    1178         144 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.seconds));
    1179             :         }
    1180         288 :         if (flags & NDR_OUT) {
    1181             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    1182             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    1183         144 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->out.result));
    1184             :         }
    1185         288 :         return NDR_ERR_SUCCESS;
    1186             : }
    1187             : 
    1188           6 : _PUBLIC_ void ndr_print_echo_TestSleep(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_TestSleep *r)
    1189             : {
    1190           6 :         ndr_print_struct(ndr, name, "echo_TestSleep");
    1191           6 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1192           6 :         ndr->depth++;
    1193           6 :         if (flags & NDR_SET_VALUES) {
    1194           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    1195             :         }
    1196           6 :         if (flags & NDR_IN) {
    1197           0 :                 ndr_print_struct(ndr, "in", "echo_TestSleep");
    1198           0 :                 ndr->depth++;
    1199           0 :                 ndr_print_uint32(ndr, "seconds", r->in.seconds);
    1200           0 :                 ndr->depth--;
    1201             :         }
    1202           6 :         if (flags & NDR_OUT) {
    1203           6 :                 ndr_print_struct(ndr, "out", "echo_TestSleep");
    1204           6 :                 ndr->depth++;
    1205           6 :                 ndr_print_uint32(ndr, "result", r->out.result);
    1206           6 :                 ndr->depth--;
    1207             :         }
    1208           6 :         ndr->depth--;
    1209             : }
    1210             : 
    1211         585 : static enum ndr_err_code ndr_push_echo_TestEnum(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_TestEnum *r)
    1212             : {
    1213         585 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    1214         585 :         if (flags & NDR_IN) {
    1215         286 :                 if (r->in.foo1 == NULL) {
    1216           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1217             :                 }
    1218         286 :                 if (r->in.foo2 == NULL) {
    1219           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1220             :                 }
    1221         286 :                 if (r->in.foo3 == NULL) {
    1222           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1223             :                 }
    1224         288 :                 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, *r->in.foo1));
    1225         286 :                 NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, r->in.foo2));
    1226         286 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.foo3, *r->in.foo1));
    1227         286 :                 NDR_CHECK(ndr_push_echo_Enum3(ndr, NDR_SCALARS, r->in.foo3));
    1228             :         }
    1229         585 :         if (flags & NDR_OUT) {
    1230         299 :                 if (r->out.foo1 == NULL) {
    1231           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1232             :                 }
    1233         299 :                 if (r->out.foo2 == NULL) {
    1234           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1235             :                 }
    1236         299 :                 if (r->out.foo3 == NULL) {
    1237           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1238             :                 }
    1239         301 :                 NDR_CHECK(ndr_push_echo_Enum1(ndr, NDR_SCALARS, *r->out.foo1));
    1240         299 :                 NDR_CHECK(ndr_push_echo_Enum2(ndr, NDR_SCALARS, r->out.foo2));
    1241         299 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.foo3, *r->out.foo1));
    1242         299 :                 NDR_CHECK(ndr_push_echo_Enum3(ndr, NDR_SCALARS, r->out.foo3));
    1243             :         }
    1244         581 :         return NDR_ERR_SUCCESS;
    1245             : }
    1246             : 
    1247         568 : static enum ndr_err_code ndr_pull_echo_TestEnum(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_TestEnum *r)
    1248             : {
    1249         568 :         TALLOC_CTX *_mem_save_foo1_0 = NULL;
    1250         568 :         TALLOC_CTX *_mem_save_foo2_0 = NULL;
    1251         568 :         TALLOC_CTX *_mem_save_foo3_0 = NULL;
    1252         568 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    1253         568 :         if (flags & NDR_IN) {
    1254         286 :                 NDR_ZERO_STRUCT(r->out);
    1255             : 
    1256         286 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1257         286 :                         NDR_PULL_ALLOC(ndr, r->in.foo1);
    1258             :                 }
    1259         286 :                 _mem_save_foo1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1260         286 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo1, LIBNDR_FLAG_REF_ALLOC);
    1261         288 :                 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, r->in.foo1));
    1262         286 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo1_0, LIBNDR_FLAG_REF_ALLOC);
    1263         286 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1264         286 :                         NDR_PULL_ALLOC(ndr, r->in.foo2);
    1265             :                 }
    1266         286 :                 _mem_save_foo2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1267         286 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo2, LIBNDR_FLAG_REF_ALLOC);
    1268         286 :                 NDR_CHECK(ndr_pull_echo_Enum2(ndr, NDR_SCALARS, r->in.foo2));
    1269         286 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo2_0, LIBNDR_FLAG_REF_ALLOC);
    1270         286 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1271         286 :                         NDR_PULL_ALLOC(ndr, r->in.foo3);
    1272             :                 }
    1273         286 :                 _mem_save_foo3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1274         286 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.foo3, LIBNDR_FLAG_REF_ALLOC);
    1275         286 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.foo3, *r->in.foo1));
    1276         286 :                 NDR_CHECK(ndr_pull_echo_Enum3(ndr, NDR_SCALARS, r->in.foo3));
    1277         286 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo3_0, LIBNDR_FLAG_REF_ALLOC);
    1278         286 :                 NDR_PULL_ALLOC(ndr, r->out.foo1);
    1279         286 :                 *r->out.foo1 = *r->in.foo1;
    1280         286 :                 NDR_PULL_ALLOC(ndr, r->out.foo2);
    1281         286 :                 *r->out.foo2 = *r->in.foo2;
    1282         286 :                 NDR_PULL_ALLOC(ndr, r->out.foo3);
    1283         286 :                 *r->out.foo3 = *r->in.foo3;
    1284             :         }
    1285         568 :         if (flags & NDR_OUT) {
    1286             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    1287             :                 if (r->in.foo1 == NULL) {
    1288             :                         NDR_PULL_ALLOC(ndr, r->in.foo1);
    1289             :                         NDR_ZERO_STRUCTP(r->in.foo1);
    1290             :                 }
    1291             :                 if (r->in.foo2 == NULL) {
    1292             :                         NDR_PULL_ALLOC(ndr, r->in.foo2);
    1293             :                         NDR_ZERO_STRUCTP(r->in.foo2);
    1294             :                 }
    1295             :                 if (r->in.foo3 == NULL) {
    1296             :                         NDR_PULL_ALLOC(ndr, r->in.foo3);
    1297             :                         NDR_ZERO_STRUCTP(r->in.foo3);
    1298             :                 }
    1299             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    1300         282 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1301          19 :                         NDR_PULL_ALLOC(ndr, r->out.foo1);
    1302             :                 }
    1303         282 :                 _mem_save_foo1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1304         282 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo1, LIBNDR_FLAG_REF_ALLOC);
    1305         284 :                 NDR_CHECK(ndr_pull_echo_Enum1(ndr, NDR_SCALARS, r->out.foo1));
    1306         282 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo1_0, LIBNDR_FLAG_REF_ALLOC);
    1307         282 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1308          19 :                         NDR_PULL_ALLOC(ndr, r->out.foo2);
    1309             :                 }
    1310         282 :                 _mem_save_foo2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1311         282 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo2, LIBNDR_FLAG_REF_ALLOC);
    1312         282 :                 NDR_CHECK(ndr_pull_echo_Enum2(ndr, NDR_SCALARS, r->out.foo2));
    1313         282 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo2_0, LIBNDR_FLAG_REF_ALLOC);
    1314         282 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1315          19 :                         NDR_PULL_ALLOC(ndr, r->out.foo3);
    1316             :                 }
    1317         282 :                 _mem_save_foo3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1318         282 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.foo3, LIBNDR_FLAG_REF_ALLOC);
    1319         282 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.foo3, *r->out.foo1));
    1320         282 :                 NDR_CHECK(ndr_pull_echo_Enum3(ndr, NDR_SCALARS, r->out.foo3));
    1321         282 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_foo3_0, LIBNDR_FLAG_REF_ALLOC);
    1322             :         }
    1323         564 :         return NDR_ERR_SUCCESS;
    1324             : }
    1325             : 
    1326          34 : _PUBLIC_ void ndr_print_echo_TestEnum(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_TestEnum *r)
    1327             : {
    1328          34 :         ndr_print_struct(ndr, name, "echo_TestEnum");
    1329          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1330          34 :         ndr->depth++;
    1331          34 :         if (flags & NDR_SET_VALUES) {
    1332           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    1333             :         }
    1334          34 :         if (flags & NDR_IN) {
    1335           0 :                 ndr_print_struct(ndr, "in", "echo_TestEnum");
    1336           0 :                 ndr->depth++;
    1337           0 :                 ndr_print_ptr(ndr, "foo1", r->in.foo1);
    1338           0 :                 ndr->depth++;
    1339           0 :                 ndr_print_echo_Enum1(ndr, "foo1", *r->in.foo1);
    1340           0 :                 ndr->depth--;
    1341           0 :                 ndr_print_ptr(ndr, "foo2", r->in.foo2);
    1342           0 :                 ndr->depth++;
    1343           0 :                 ndr_print_echo_Enum2(ndr, "foo2", r->in.foo2);
    1344           0 :                 ndr->depth--;
    1345           0 :                 ndr_print_ptr(ndr, "foo3", r->in.foo3);
    1346           0 :                 ndr->depth++;
    1347           0 :                 ndr_print_set_switch_value(ndr, r->in.foo3, *r->in.foo1);
    1348           0 :                 ndr_print_echo_Enum3(ndr, "foo3", r->in.foo3);
    1349           0 :                 ndr->depth--;
    1350           0 :                 ndr->depth--;
    1351             :         }
    1352          34 :         if (flags & NDR_OUT) {
    1353          34 :                 ndr_print_struct(ndr, "out", "echo_TestEnum");
    1354          34 :                 ndr->depth++;
    1355          34 :                 ndr_print_ptr(ndr, "foo1", r->out.foo1);
    1356          34 :                 ndr->depth++;
    1357          34 :                 ndr_print_echo_Enum1(ndr, "foo1", *r->out.foo1);
    1358          34 :                 ndr->depth--;
    1359          34 :                 ndr_print_ptr(ndr, "foo2", r->out.foo2);
    1360          34 :                 ndr->depth++;
    1361          34 :                 ndr_print_echo_Enum2(ndr, "foo2", r->out.foo2);
    1362          34 :                 ndr->depth--;
    1363          34 :                 ndr_print_ptr(ndr, "foo3", r->out.foo3);
    1364          34 :                 ndr->depth++;
    1365          34 :                 ndr_print_set_switch_value(ndr, r->out.foo3, *r->out.foo1);
    1366          34 :                 ndr_print_echo_Enum3(ndr, "foo3", r->out.foo3);
    1367          34 :                 ndr->depth--;
    1368          34 :                 ndr->depth--;
    1369             :         }
    1370          34 :         ndr->depth--;
    1371             : }
    1372             : 
    1373         587 : static enum ndr_err_code ndr_push_echo_TestSurrounding(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_TestSurrounding *r)
    1374             : {
    1375         587 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    1376         587 :         if (flags & NDR_IN) {
    1377         287 :                 if (r->in.data == NULL) {
    1378           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1379             :                 }
    1380         287 :                 NDR_CHECK(ndr_push_echo_Surrounding(ndr, NDR_SCALARS, r->in.data));
    1381             :         }
    1382         587 :         if (flags & NDR_OUT) {
    1383         300 :                 if (r->out.data == NULL) {
    1384           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1385             :                 }
    1386         300 :                 NDR_CHECK(ndr_push_echo_Surrounding(ndr, NDR_SCALARS, r->out.data));
    1387             :         }
    1388         583 :         return NDR_ERR_SUCCESS;
    1389             : }
    1390             : 
    1391         570 : static enum ndr_err_code ndr_pull_echo_TestSurrounding(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_TestSurrounding *r)
    1392             : {
    1393         570 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    1394         570 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    1395         570 :         if (flags & NDR_IN) {
    1396         287 :                 NDR_ZERO_STRUCT(r->out);
    1397             : 
    1398         287 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1399         287 :                         NDR_PULL_ALLOC(ndr, r->in.data);
    1400             :                 }
    1401         287 :                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1402         287 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
    1403         287 :                 NDR_CHECK(ndr_pull_echo_Surrounding(ndr, NDR_SCALARS, r->in.data));
    1404         287 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
    1405         287 :                 NDR_PULL_ALLOC(ndr, r->out.data);
    1406         287 :                 *r->out.data = *r->in.data;
    1407             :         }
    1408         570 :         if (flags & NDR_OUT) {
    1409             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    1410             :                 if (r->in.data == NULL) {
    1411             :                         NDR_PULL_ALLOC(ndr, r->in.data);
    1412             :                         NDR_ZERO_STRUCTP(r->in.data);
    1413             :                 }
    1414             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    1415         283 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1416          20 :                         NDR_PULL_ALLOC(ndr, r->out.data);
    1417             :                 }
    1418         283 :                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1419         283 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
    1420         283 :                 NDR_CHECK(ndr_pull_echo_Surrounding(ndr, NDR_SCALARS, r->out.data));
    1421         283 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
    1422             :         }
    1423         566 :         return NDR_ERR_SUCCESS;
    1424             : }
    1425             : 
    1426          34 : _PUBLIC_ void ndr_print_echo_TestSurrounding(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_TestSurrounding *r)
    1427             : {
    1428          34 :         ndr_print_struct(ndr, name, "echo_TestSurrounding");
    1429          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1430          34 :         ndr->depth++;
    1431          34 :         if (flags & NDR_SET_VALUES) {
    1432           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    1433             :         }
    1434          34 :         if (flags & NDR_IN) {
    1435           0 :                 ndr_print_struct(ndr, "in", "echo_TestSurrounding");
    1436           0 :                 ndr->depth++;
    1437           0 :                 ndr_print_ptr(ndr, "data", r->in.data);
    1438           0 :                 ndr->depth++;
    1439           0 :                 ndr_print_echo_Surrounding(ndr, "data", r->in.data);
    1440           0 :                 ndr->depth--;
    1441           0 :                 ndr->depth--;
    1442             :         }
    1443          34 :         if (flags & NDR_OUT) {
    1444          34 :                 ndr_print_struct(ndr, "out", "echo_TestSurrounding");
    1445          34 :                 ndr->depth++;
    1446          34 :                 ndr_print_ptr(ndr, "data", r->out.data);
    1447          34 :                 ndr->depth++;
    1448          34 :                 ndr_print_echo_Surrounding(ndr, "data", r->out.data);
    1449          34 :                 ndr->depth--;
    1450          34 :                 ndr->depth--;
    1451             :         }
    1452          34 :         ndr->depth--;
    1453             : }
    1454             : 
    1455         585 : static enum ndr_err_code ndr_push_echo_TestDoublePointer(struct ndr_push *ndr, ndr_flags_type flags, const struct echo_TestDoublePointer *r)
    1456             : {
    1457         585 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
    1458         585 :         if (flags & NDR_IN) {
    1459         286 :                 if (r->in.data == NULL) {
    1460           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
    1461             :                 }
    1462         286 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.data));
    1463         286 :                 if (*r->in.data) {
    1464         286 :                         NDR_CHECK(ndr_push_unique_ptr(ndr, **r->in.data));
    1465         286 :                         if (**r->in.data) {
    1466         286 :                                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ***r->in.data));
    1467             :                         }
    1468             :                 }
    1469             :         }
    1470         585 :         if (flags & NDR_OUT) {
    1471         299 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.result));
    1472             :         }
    1473         581 :         return NDR_ERR_SUCCESS;
    1474             : }
    1475             : 
    1476         568 : static enum ndr_err_code ndr_pull_echo_TestDoublePointer(struct ndr_pull *ndr, ndr_flags_type flags, struct echo_TestDoublePointer *r)
    1477             : {
    1478           4 :         uint32_t _ptr_data;
    1479         568 :         TALLOC_CTX *_mem_save_data_0 = NULL;
    1480         568 :         TALLOC_CTX *_mem_save_data_1 = NULL;
    1481         568 :         TALLOC_CTX *_mem_save_data_2 = NULL;
    1482         568 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
    1483         568 :         if (flags & NDR_IN) {
    1484         286 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
    1485         286 :                         NDR_PULL_ALLOC(ndr, r->in.data);
    1486             :                 }
    1487         286 :                 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1488         286 :                 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, LIBNDR_FLAG_REF_ALLOC);
    1489         286 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    1490         286 :                 if (_ptr_data) {
    1491         286 :                         NDR_PULL_ALLOC(ndr, *r->in.data);
    1492             :                 } else {
    1493           0 :                         *r->in.data = NULL;
    1494             :                 }
    1495         286 :                 if (*r->in.data) {
    1496         286 :                         _mem_save_data_1 = NDR_PULL_GET_MEM_CTX(ndr);
    1497         286 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->in.data, 0);
    1498         286 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
    1499         286 :                         if (_ptr_data) {
    1500         286 :                                 NDR_PULL_ALLOC(ndr, **r->in.data);
    1501             :                         } else {
    1502           0 :                                 **r->in.data = NULL;
    1503             :                         }
    1504         286 :                         if (**r->in.data) {
    1505         286 :                                 _mem_save_data_2 = NDR_PULL_GET_MEM_CTX(ndr);
    1506         286 :                                 NDR_PULL_SET_MEM_CTX(ndr, **r->in.data, 0);
    1507         286 :                                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, **r->in.data));
    1508         286 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_2, 0);
    1509             :                         }
    1510         286 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_1, 0);
    1511             :                 }
    1512         286 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
    1513             :         }
    1514         568 :         if (flags & NDR_OUT) {
    1515             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
    1516             :                 if (r->in.data == NULL) {
    1517             :                         NDR_PULL_ALLOC(ndr, r->in.data);
    1518             :                         NDR_ZERO_STRUCTP(r->in.data);
    1519             :                 }
    1520             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
    1521         282 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.result));
    1522             :         }
    1523         564 :         return NDR_ERR_SUCCESS;
    1524             : }
    1525             : 
    1526          34 : _PUBLIC_ void ndr_print_echo_TestDoublePointer(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct echo_TestDoublePointer *r)
    1527             : {
    1528          34 :         ndr_print_struct(ndr, name, "echo_TestDoublePointer");
    1529          34 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1530          34 :         ndr->depth++;
    1531          34 :         if (flags & NDR_SET_VALUES) {
    1532           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
    1533             :         }
    1534          34 :         if (flags & NDR_IN) {
    1535           0 :                 ndr_print_struct(ndr, "in", "echo_TestDoublePointer");
    1536           0 :                 ndr->depth++;
    1537           0 :                 ndr_print_ptr(ndr, "data", r->in.data);
    1538           0 :                 ndr->depth++;
    1539           0 :                 ndr_print_ptr(ndr, "data", *r->in.data);
    1540           0 :                 ndr->depth++;
    1541           0 :                 if (*r->in.data) {
    1542           0 :                         ndr_print_ptr(ndr, "data", **r->in.data);
    1543           0 :                         ndr->depth++;
    1544           0 :                         if (**r->in.data) {
    1545           0 :                                 ndr_print_uint16(ndr, "data", ***r->in.data);
    1546             :                         }
    1547           0 :                         ndr->depth--;
    1548             :                 }
    1549           0 :                 ndr->depth--;
    1550           0 :                 ndr->depth--;
    1551           0 :                 ndr->depth--;
    1552             :         }
    1553          34 :         if (flags & NDR_OUT) {
    1554          34 :                 ndr_print_struct(ndr, "out", "echo_TestDoublePointer");
    1555          34 :                 ndr->depth++;
    1556          34 :                 ndr_print_uint16(ndr, "result", r->out.result);
    1557          34 :                 ndr->depth--;
    1558             :         }
    1559          34 :         ndr->depth--;
    1560             : }
    1561             : 
    1562             : #ifndef SKIP_NDR_TABLE_rpcecho
    1563             : static const struct ndr_interface_public_struct rpcecho_public_structs[] = {
    1564             :         {
    1565             :                 .name = "echo_info1",
    1566             :                 .struct_size = sizeof(struct echo_info1 ),
    1567             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_echo_info1,
    1568             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_echo_info1,
    1569             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_echo_info1,
    1570             :         },
    1571             :         { .name = NULL }
    1572             : };
    1573             : 
    1574             : static const struct ndr_interface_call rpcecho_calls[] = {
    1575             :         {
    1576             :                 "echo_AddOne",
    1577             :                 sizeof(struct echo_AddOne),
    1578             :                 (ndr_push_flags_fn_t) ndr_push_echo_AddOne,
    1579             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_AddOne,
    1580             :                 (ndr_print_function_t) ndr_print_echo_AddOne,
    1581             :                 { 0, NULL },
    1582             :                 { 0, NULL },
    1583             :         },
    1584             :         {
    1585             :                 "echo_EchoData",
    1586             :                 sizeof(struct echo_EchoData),
    1587             :                 (ndr_push_flags_fn_t) ndr_push_echo_EchoData,
    1588             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_EchoData,
    1589             :                 (ndr_print_function_t) ndr_print_echo_EchoData,
    1590             :                 { 0, NULL },
    1591             :                 { 0, NULL },
    1592             :         },
    1593             :         {
    1594             :                 "echo_SinkData",
    1595             :                 sizeof(struct echo_SinkData),
    1596             :                 (ndr_push_flags_fn_t) ndr_push_echo_SinkData,
    1597             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_SinkData,
    1598             :                 (ndr_print_function_t) ndr_print_echo_SinkData,
    1599             :                 { 0, NULL },
    1600             :                 { 0, NULL },
    1601             :         },
    1602             :         {
    1603             :                 "echo_SourceData",
    1604             :                 sizeof(struct echo_SourceData),
    1605             :                 (ndr_push_flags_fn_t) ndr_push_echo_SourceData,
    1606             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_SourceData,
    1607             :                 (ndr_print_function_t) ndr_print_echo_SourceData,
    1608             :                 { 0, NULL },
    1609             :                 { 0, NULL },
    1610             :         },
    1611             :         {
    1612             :                 "echo_TestCall",
    1613             :                 sizeof(struct echo_TestCall),
    1614             :                 (ndr_push_flags_fn_t) ndr_push_echo_TestCall,
    1615             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestCall,
    1616             :                 (ndr_print_function_t) ndr_print_echo_TestCall,
    1617             :                 { 0, NULL },
    1618             :                 { 0, NULL },
    1619             :         },
    1620             :         {
    1621             :                 "echo_TestCall2",
    1622             :                 sizeof(struct echo_TestCall2),
    1623             :                 (ndr_push_flags_fn_t) ndr_push_echo_TestCall2,
    1624             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestCall2,
    1625             :                 (ndr_print_function_t) ndr_print_echo_TestCall2,
    1626             :                 { 0, NULL },
    1627             :                 { 0, NULL },
    1628             :         },
    1629             :         {
    1630             :                 "echo_TestSleep",
    1631             :                 sizeof(struct echo_TestSleep),
    1632             :                 (ndr_push_flags_fn_t) ndr_push_echo_TestSleep,
    1633             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestSleep,
    1634             :                 (ndr_print_function_t) ndr_print_echo_TestSleep,
    1635             :                 { 0, NULL },
    1636             :                 { 0, NULL },
    1637             :         },
    1638             :         {
    1639             :                 "echo_TestEnum",
    1640             :                 sizeof(struct echo_TestEnum),
    1641             :                 (ndr_push_flags_fn_t) ndr_push_echo_TestEnum,
    1642             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestEnum,
    1643             :                 (ndr_print_function_t) ndr_print_echo_TestEnum,
    1644             :                 { 0, NULL },
    1645             :                 { 0, NULL },
    1646             :         },
    1647             :         {
    1648             :                 "echo_TestSurrounding",
    1649             :                 sizeof(struct echo_TestSurrounding),
    1650             :                 (ndr_push_flags_fn_t) ndr_push_echo_TestSurrounding,
    1651             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestSurrounding,
    1652             :                 (ndr_print_function_t) ndr_print_echo_TestSurrounding,
    1653             :                 { 0, NULL },
    1654             :                 { 0, NULL },
    1655             :         },
    1656             :         {
    1657             :                 "echo_TestDoublePointer",
    1658             :                 sizeof(struct echo_TestDoublePointer),
    1659             :                 (ndr_push_flags_fn_t) ndr_push_echo_TestDoublePointer,
    1660             :                 (ndr_pull_flags_fn_t) ndr_pull_echo_TestDoublePointer,
    1661             :                 (ndr_print_function_t) ndr_print_echo_TestDoublePointer,
    1662             :                 { 0, NULL },
    1663             :                 { 0, NULL },
    1664             :         },
    1665             :         { .name = NULL }
    1666             : };
    1667             : 
    1668             : static const char * const rpcecho_endpoint_strings[] = {
    1669             :         "ncacn_np:[\\pipe\\rpcecho]", 
    1670             :         "ncacn_ip_tcp:", 
    1671             :         "ncalrpc:", 
    1672             : };
    1673             : 
    1674             : static const struct ndr_interface_string_array rpcecho_endpoints = {
    1675             :         .count  = 3,
    1676             :         .names  = rpcecho_endpoint_strings
    1677             : };
    1678             : 
    1679             : static const char * const rpcecho_authservice_strings[] = {
    1680             :         "host", 
    1681             : };
    1682             : 
    1683             : static const struct ndr_interface_string_array rpcecho_authservices = {
    1684             :         .count  = 1,
    1685             :         .names  = rpcecho_authservice_strings
    1686             : };
    1687             : 
    1688             : 
    1689             : const struct ndr_interface_table ndr_table_rpcecho = {
    1690             :         .name           = "rpcecho",
    1691             :         .syntax_id      = {
    1692             :                 {0x60a15ec5,0x4de8,0x11d7,{0xa6,0x37},{0x00,0x50,0x56,0xa2,0x01,0x82}},
    1693             :                 NDR_RPCECHO_VERSION
    1694             :         },
    1695             :         .helpstring     = NDR_RPCECHO_HELPSTRING,
    1696             :         .num_calls      = 10,
    1697             :         .calls          = rpcecho_calls,
    1698             :         .num_public_structs     = 1,
    1699             :         .public_structs         = rpcecho_public_structs,
    1700             :         .endpoints      = &rpcecho_endpoints,
    1701             :         .authservices   = &rpcecho_authservices
    1702             : };
    1703             : 
    1704             : #endif /* SKIP_NDR_TABLE_rpcecho */

Generated by: LCOV version 1.14