librpc: Shorten dcerpc_binding_handle_call a bit
[Samba/id10ts.git] / source4 / libcli / wrepl / winsrepl.h
blobbc35544ae6f16927c0a3d0a23fce3739338ed753
1 /*
2 Unix SMB/CIFS implementation.
4 structures for WINS replication client library
6 Copyright (C) Andrew Tridgell 2005
7 Copyright (C) Stefan Metzmacher 2005-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 #include "librpc/gen_ndr/nbt.h"
24 #include "librpc/gen_ndr/winsrepl.h"
26 struct wrepl_request;
27 struct wrepl_socket;
29 struct wrepl_send_ctrl {
30 bool send_only;
31 bool disconnect_after_send;
35 setup an association
37 struct wrepl_associate {
38 struct {
39 uint32_t assoc_ctx;
40 uint16_t major_version;
41 } out;
45 setup an association
47 struct wrepl_associate_stop {
48 struct {
49 uint32_t assoc_ctx;
50 uint32_t reason;
51 } in;
55 pull the partner table
57 struct wrepl_pull_table {
58 struct {
59 uint32_t assoc_ctx;
60 } in;
61 struct {
62 uint32_t num_partners;
63 struct wrepl_wins_owner *partners;
64 } out;
67 #define WREPL_NAME_TYPE(flags) (flags & WREPL_FLAGS_RECORD_TYPE)
68 #define WREPL_NAME_STATE(flags) ((flags & WREPL_FLAGS_RECORD_STATE)>>2)
69 #define WREPL_NAME_NODE(flags) ((flags & WREPL_FLAGS_NODE_TYPE)>>5)
70 #define WREPL_NAME_IS_STATIC(flags) ((flags & WREPL_FLAGS_IS_STATIC)?true:false)
72 #define WREPL_NAME_FLAGS(type, state, node, is_static) \
73 (type | (state << 2) | (node << 5) | \
74 (is_static ? WREPL_FLAGS_IS_STATIC : 0))
76 struct wrepl_address {
77 const char *owner;
78 const char *address;
81 struct wrepl_name {
82 struct nbt_name name;
83 enum wrepl_name_type type;
84 enum wrepl_name_state state;
85 enum wrepl_name_node node;
86 bool is_static;
87 uint32_t raw_flags;
88 uint64_t version_id;
89 const char *owner;
90 uint32_t num_addresses;
91 struct wrepl_address *addresses;
95 a full pull replication
97 struct wrepl_pull_names {
98 struct {
99 uint32_t assoc_ctx;
100 struct wrepl_wins_owner partner;
101 } in;
102 struct {
103 uint32_t num_names;
104 struct wrepl_name *names;
105 } out;
108 struct tstream_context;
110 #include "libcli/wrepl/winsrepl_proto.h"