LCOV - code coverage report
Current view: top level - bin/default/source4/librpc/gen_ndr - ndr_sasl_helpers.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 0 66 0.0 %
Date: 2024-04-21 15:09:00 Functions: 0 4 0.0 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/source4/librpc/gen_ndr/ndr_sasl_helpers.h"
       5             : 
       6           0 : _PUBLIC_ enum ndr_err_code ndr_push_saslauthdRequest(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct saslauthdRequest *r)
       7             : {
       8             :         {
       9           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
      10           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
      11           0 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      12           0 :                 if (ndr_flags & NDR_SCALARS) {
      13           0 :                         NDR_CHECK(ndr_push_align(ndr, 2));
      14           0 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->authid)));
      15           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->authid, strlen_m(r->authid), sizeof(uint8_t), CH_UTF8));
      16           0 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->passwd_length));
      17           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->passwd, r->passwd_length));
      18           0 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->service)));
      19           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->service, strlen_m(r->service), sizeof(uint8_t), CH_UTF8));
      20           0 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->realm)));
      21           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->realm, strlen_m(r->realm), sizeof(uint8_t), CH_UTF8));
      22           0 :                         NDR_CHECK(ndr_push_trailer_align(ndr, 2));
      23             :                 }
      24           0 :                 if (ndr_flags & NDR_BUFFERS) {
      25           0 :                 }
      26           0 :                 ndr->flags = _flags_save_STRUCT;
      27             :         }
      28           0 :         return NDR_ERR_SUCCESS;
      29             : }
      30             : 
      31           0 : _PUBLIC_ enum ndr_err_code ndr_pull_saslauthdRequest(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct saslauthdRequest *r)
      32             : {
      33           0 :         uint32_t size_authid_0 = 0;
      34           0 :         uint32_t size_passwd_0 = 0;
      35           0 :         uint32_t size_service_0 = 0;
      36           0 :         uint32_t size_realm_0 = 0;
      37             :         {
      38           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
      39           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
      40           0 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      41           0 :                 if (ndr_flags & NDR_SCALARS) {
      42           0 :                         NDR_CHECK(ndr_pull_align(ndr, 2));
      43           0 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->authid_length));
      44           0 :                         size_authid_0 = r->authid_length;
      45           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->authid, size_authid_0, sizeof(uint8_t), CH_UTF8));
      46           0 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->passwd_length));
      47           0 :                         size_passwd_0 = r->passwd_length;
      48           0 :                         NDR_PULL_ALLOC_N(ndr, r->passwd, size_passwd_0);
      49           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->passwd, size_passwd_0));
      50           0 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_length));
      51           0 :                         size_service_0 = r->service_length;
      52           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->service, size_service_0, sizeof(uint8_t), CH_UTF8));
      53           0 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->realm_length));
      54           0 :                         size_realm_0 = r->realm_length;
      55           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->realm, size_realm_0, sizeof(uint8_t), CH_UTF8));
      56           0 :                         NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
      57             :                 }
      58           0 :                 if (ndr_flags & NDR_BUFFERS) {
      59           0 :                 }
      60           0 :                 ndr->flags = _flags_save_STRUCT;
      61             :         }
      62           0 :         return NDR_ERR_SUCCESS;
      63             : }
      64             : 
      65           0 : static void ndr_print_flags_saslauthdRequest(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct saslauthdRequest *r)
      66             : {
      67           0 :         ndr_print_saslauthdRequest(ndr, name, r);
      68           0 : }
      69             : 
      70           0 : _PUBLIC_ void ndr_print_saslauthdRequest(struct ndr_print *ndr, const char *name, const struct saslauthdRequest *r)
      71             : {
      72           0 :         ndr_print_struct(ndr, name, "saslauthdRequest");
      73           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
      74             :         {
      75           0 :                 libndr_flags _flags_save_STRUCT = ndr->flags;
      76           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_BIGENDIAN|LIBNDR_PRINT_ARRAY_HEX);
      77           0 :                 ndr->depth++;
      78           0 :                 ndr_print_uint16(ndr, "authid_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->authid):r->authid_length);
      79           0 :                 ndr_print_string(ndr, "authid", r->authid);
      80           0 :                 ndr_print_uint16(ndr, "passwd_length", r->passwd_length);
      81           0 :                 ndr_print_array_uint8(ndr, "passwd", r->passwd, r->passwd_length);
      82           0 :                 ndr_print_uint16(ndr, "service_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->service):r->service_length);
      83           0 :                 ndr_print_string(ndr, "service", r->service);
      84           0 :                 ndr_print_uint16(ndr, "realm_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->realm):r->realm_length);
      85           0 :                 ndr_print_string(ndr, "realm", r->realm);
      86           0 :                 ndr->depth--;
      87           0 :                 ndr->flags = _flags_save_STRUCT;
      88             :         }
      89             : }
      90             : 
      91             : #ifndef SKIP_NDR_TABLE_sasl_helpers
      92             : static const struct ndr_interface_public_struct sasl_helpers_public_structs[] = {
      93             :         {
      94             :                 .name = "saslauthdRequest",
      95             :                 .struct_size = sizeof(struct saslauthdRequest ),
      96             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_saslauthdRequest,
      97             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_saslauthdRequest,
      98             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_saslauthdRequest,
      99             :         },
     100             :         { .name = NULL }
     101             : };
     102             : 
     103             : static const struct ndr_interface_call sasl_helpers_calls[] = {
     104             :         { .name = NULL }
     105             : };
     106             : 
     107             : static const char * const sasl_helpers_endpoint_strings[] = {
     108             :         "ncacn_np:[\\pipe\\sasl_helpers]", 
     109             : };
     110             : 
     111             : static const struct ndr_interface_string_array sasl_helpers_endpoints = {
     112             :         .count  = 1,
     113             :         .names  = sasl_helpers_endpoint_strings
     114             : };
     115             : 
     116             : static const char * const sasl_helpers_authservice_strings[] = {
     117             :         "host", 
     118             : };
     119             : 
     120             : static const struct ndr_interface_string_array sasl_helpers_authservices = {
     121             :         .count  = 1,
     122             :         .names  = sasl_helpers_authservice_strings
     123             : };
     124             : 
     125             : 
     126             : const struct ndr_interface_table ndr_table_sasl_helpers = {
     127             :         .name           = "sasl_helpers",
     128             :         .syntax_id      = {
     129             :                 {0x7512b2f4,0x5f4f,0x11e4,{0xbb,0xe6},{0x3c,0x97,0x0e,0x8d,0x82,0x26}},
     130             :                 NDR_SASL_HELPERS_VERSION
     131             :         },
     132             :         .helpstring     = NDR_SASL_HELPERS_HELPSTRING,
     133             :         .num_calls      = 0,
     134             :         .calls          = sasl_helpers_calls,
     135             :         .num_public_structs     = 1,
     136             :         .public_structs         = sasl_helpers_public_structs,
     137             :         .endpoints      = &sasl_helpers_endpoints,
     138             :         .authservices   = &sasl_helpers_authservices
     139             : };
     140             : 
     141             : #endif /* SKIP_NDR_TABLE_sasl_helpers */

Generated by: LCOV version 1.14