1 | /*
|
---|
2 | Unix SMB/CIFS implementation.
|
---|
3 |
|
---|
4 | structures for WINS replication client library
|
---|
5 |
|
---|
6 | Copyright (C) Andrew Tridgell 2005
|
---|
7 | Copyright (C) Stefan Metzmacher 2005-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 | #include "librpc/gen_ndr/nbt.h"
|
---|
24 | #include "librpc/gen_ndr/winsrepl.h"
|
---|
25 |
|
---|
26 | struct wrepl_request;
|
---|
27 | struct wrepl_socket;
|
---|
28 |
|
---|
29 | struct wrepl_send_ctrl {
|
---|
30 | bool send_only;
|
---|
31 | bool disconnect_after_send;
|
---|
32 | };
|
---|
33 |
|
---|
34 | /*
|
---|
35 | setup an association
|
---|
36 | */
|
---|
37 | struct wrepl_associate {
|
---|
38 | struct {
|
---|
39 | uint32_t assoc_ctx;
|
---|
40 | uint16_t major_version;
|
---|
41 | } out;
|
---|
42 | };
|
---|
43 |
|
---|
44 | /*
|
---|
45 | setup an association
|
---|
46 | */
|
---|
47 | struct wrepl_associate_stop {
|
---|
48 | struct {
|
---|
49 | uint32_t assoc_ctx;
|
---|
50 | uint32_t reason;
|
---|
51 | } in;
|
---|
52 | };
|
---|
53 |
|
---|
54 | /*
|
---|
55 | pull the partner table
|
---|
56 | */
|
---|
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;
|
---|
65 | };
|
---|
66 |
|
---|
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)
|
---|
71 |
|
---|
72 | #define WREPL_NAME_FLAGS(type, state, node, is_static) \
|
---|
73 | (type | (state << 2) | (node << 5) | \
|
---|
74 | (is_static ? WREPL_FLAGS_IS_STATIC : 0))
|
---|
75 |
|
---|
76 | struct wrepl_address {
|
---|
77 | const char *owner;
|
---|
78 | const char *address;
|
---|
79 | };
|
---|
80 |
|
---|
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;
|
---|
92 | };
|
---|
93 |
|
---|
94 | /*
|
---|
95 | a full pull replication
|
---|
96 | */
|
---|
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;
|
---|
106 | };
|
---|
107 |
|
---|
108 | struct tstream_context;
|
---|
109 |
|
---|
110 | #include "libcli/wrepl/winsrepl_proto.h"
|
---|