libcli: Move "struct cldap_netlogon" definition to torture
[samba4-gss.git] / librpc / rpc / dcerpc_pkt_auth.h
blob1dcee12f53c2c51dece84d6d6875d23c0674fdb5
1 /*
2 Unix SMB/CIFS implementation.
4 Copyright (C) Stefan Metzmacher 2010-2011
5 Copyright (C) Andrew Tridgell 2010-2011
6 Copyright (C) Simo Sorce 2010
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.
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.
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/>.
22 #ifndef __LIBRPC_RPC_DCERPC_PKT_AUTH_H__
23 #define __LIBRPC_RPC_DCERPC_PKT_AUTH_H__
25 #include "replace.h"
26 #include <talloc.h>
27 #include "lib/util/data_blob.h"
28 #include "libcli/util/ntstatus.h"
29 #include "librpc/rpc/rpc_common.h"
30 #include "librpc/gen_ndr/dcerpc.h"
32 NTSTATUS dcerpc_ncacn_pull_pkt_auth(const struct dcerpc_auth *auth_state,
33 struct gensec_security *gensec,
34 bool check_pkt_auth_fields,
35 TALLOC_CTX *mem_ctx,
36 enum dcerpc_pkt_type ptype,
37 uint8_t required_flags,
38 uint8_t optional_flags,
39 uint8_t payload_offset,
40 DATA_BLOB *payload_and_verifier,
41 DATA_BLOB *raw_packet,
42 const struct ncacn_packet *pkt);
43 NTSTATUS dcerpc_ncacn_push_pkt_auth(const struct dcerpc_auth *auth_state,
44 struct gensec_security *gensec,
45 TALLOC_CTX *mem_ctx,
46 DATA_BLOB *raw_packet,
47 size_t sig_size,
48 uint8_t payload_offset,
49 const DATA_BLOB *payload,
50 const struct ncacn_packet *pkt);
51 struct tevent_req *dcerpc_read_ncacn_packet_send(TALLOC_CTX *mem_ctx,
52 struct tevent_context *ev,
53 struct tstream_context *stream);
54 NTSTATUS dcerpc_read_ncacn_packet_recv(struct tevent_req *req,
55 TALLOC_CTX *mem_ctx,
56 struct ncacn_packet **pkt,
57 DATA_BLOB *buffer);
59 #endif