s4:libcli/rap: remove unused members from struct rap_call
[mat/samba.git] / source4 / libcli / rap / rap.h
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
8
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.
13
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.
18
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/>.
21 */
22
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)
31
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)
39
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)
48
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)
56
57 struct rap_call {
58         uint16_t callno;
59         char *paramdesc;
60         const char *datadesc;
61         const char *auxdatadesc;
62
63         uint16_t rcv_paramlen, rcv_datalen;
64
65         struct ndr_push *ndr_push_param;
66         struct ndr_push *ndr_push_data;
67         struct ndr_pull *ndr_pull_param;
68         struct ndr_pull *ndr_pull_data;
69 };
70
71 #define RAPNDR_FLAGS (LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
72
73 #include "../librpc/gen_ndr/rap.h"
74 #include "libcli/rap/proto.h"