s3-docs: overrided -> overridden
[Samba/gebeck_regimport.git] / source4 / libcli / rap / rap.h
blob1d4468275067a019718697fb09235a481cf9a603
1 /*
2 Unix SMB/CIFS implementation.
3 RAP client
4 Copyright (C) Volker Lendecke 2004
5 Copyright (C) Tim Potter 2005
6 Copyright (C) Jelmer Vernooij 2007
7 Copyright (C) Guenther Deschner 2010
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #define RAP_GOTO(call) do { \
24 NTSTATUS _status; \
25 _status = call; \
26 if (!NT_STATUS_IS_OK(_status)) { \
27 result = _status; \
28 goto done; \
29 } \
30 } while (0)
32 #define RAP_RETURN(call) do { \
33 NTSTATUS _status; \
34 _status = call; \
35 if (!NT_STATUS_IS_OK(_status)) { \
36 return _status; \
37 } \
38 } while (0)
40 #define NDR_GOTO(call) do { \
41 enum ndr_err_code _ndr_err; \
42 _ndr_err = call; \
43 if (!NDR_ERR_CODE_IS_SUCCESS(_ndr_err)) { \
44 result = ndr_map_error2ntstatus(_ndr_err); \
45 goto done; \
46 } \
47 } while (0)
49 #define NDR_RETURN(call) do { \
50 enum ndr_err_code _ndr_err; \
51 _ndr_err = call; \
52 if (!NDR_ERR_CODE_IS_SUCCESS(_ndr_err)) { \
53 return ndr_map_error2ntstatus(_ndr_err); \
54 } \
55 } while (0)
57 struct rap_call {
58 uint16_t callno;
59 char *paramdesc;
60 const char *datadesc;
61 const char *auxdatadesc;
63 uint16_t rcv_paramlen, rcv_datalen;
65 struct ndr_push *ndr_push_param;
66 struct ndr_push *ndr_push_data;
68 TALLOC_CTX *pull_mem_ctx;
69 struct ndr_pull *ndr_pull_param;
70 struct ndr_pull *ndr_pull_data;
73 #define RAPNDR_FLAGS (LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
75 #include "../librpc/gen_ndr/rap.h"
76 #include "libcli/rap/proto.h"