Line data Source code
1 : /* 2 : Unix SMB/CIFS implementation. 3 : 4 : routines for marshalling/unmarshalling special netlogon types 5 : 6 : Copyright (C) Guenther Deschner 2008 7 : 8 : This program is free software; you can redistribute it and/or modify 9 : it under the terms of the GNU General Public License as published by 10 : the Free Software Foundation; either version 3 of the License, or 11 : (at your option) any later version. 12 : 13 : This program is distributed in the hope that it will be useful, 14 : but WITHOUT ANY WARRANTY; without even the implied warranty of 15 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 : GNU General Public License for more details. 17 : 18 : You should have received a copy of the GNU General Public License 19 : along with this program. If not, see <http://www.gnu.org/licenses/>. 20 : */ 21 : 22 : #include "includes.h" 23 : #include "librpc/gen_ndr/ndr_netlogon.h" 24 : #include "librpc/gen_ndr/ndr_misc.h" 25 : #include "librpc/gen_ndr/ndr_samr.h" 26 : 27 48 : _PUBLIC_ enum ndr_err_code ndr_push_netr_SamDatabaseID8Bit(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_SamDatabaseID8Bit r) 28 : { 29 48 : if (r > 0xff) return NDR_ERR_BUFSIZE; 30 48 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r)); 31 40 : return NDR_ERR_SUCCESS; 32 : } 33 : 34 24 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_SamDatabaseID8Bit(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_SamDatabaseID8Bit *r) 35 : { 36 4 : uint8_t v; 37 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v)); 38 24 : *r = v; 39 24 : return NDR_ERR_SUCCESS; 40 : } 41 : 42 0 : _PUBLIC_ void ndr_print_netr_SamDatabaseID8Bit(struct ndr_print *ndr, const char *name, enum netr_SamDatabaseID8Bit r) 43 : { 44 0 : ndr_print_netr_SamDatabaseID(ndr, name, r); 45 0 : } 46 : 47 48 : _PUBLIC_ enum ndr_err_code ndr_push_netr_DeltaEnum8Bit(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum netr_DeltaEnum8Bit r) 48 : { 49 48 : if (r > 0xff) return NDR_ERR_BUFSIZE; 50 48 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r)); 51 40 : return NDR_ERR_SUCCESS; 52 : } 53 : 54 24 : _PUBLIC_ enum ndr_err_code ndr_pull_netr_DeltaEnum8Bit(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum netr_DeltaEnum8Bit *r) 55 : { 56 4 : uint8_t v; 57 24 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v)); 58 24 : *r = v; 59 24 : return NDR_ERR_SUCCESS; 60 : } 61 : 62 0 : _PUBLIC_ void ndr_print_netr_DeltaEnum8Bit(struct ndr_print *ndr, const char *name, enum netr_DeltaEnum8Bit r) 63 : { 64 0 : ndr_print_netr_DeltaEnum(ndr, name, r); 65 0 : }