4
4
structures for WINS replication client library
6
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
9
10
it under the terms of the GNU General Public License as published by
22
23
#include "librpc/gen_ndr/nbt.h"
23
24
#include "librpc/gen_ndr/winsrepl.h"
26
main context structure for the wins replication client library
29
struct socket_context *sock;
30
struct packet_context *packet;
33
struct tevent_context *ctx;
34
struct tevent_fd *fde;
37
/* a queue of replies waiting to be received */
38
struct wrepl_request *recv_queue;
40
/* the default timeout for requests, 0 means no timeout */
41
#define WREPL_SOCKET_REQUEST_TIMEOUT (60)
42
uint32_t request_timeout;
44
/* counter for request timeouts, after 2 timeouts the socket is marked as dead */
45
uint32_t timeout_count;
47
/* remember is the socket is dead */
50
/* remember if we need to free the wrepl_socket at the end of wrepl_socket_dead() */
53
struct smb_iconv_convenience *iconv_convenience;
56
29
struct wrepl_send_ctrl {
58
31
bool disconnect_after_send;
61
enum wrepl_request_state {
62
WREPL_REQUEST_INIT = 0,
63
WREPL_REQUEST_RECV = 1,
64
WREPL_REQUEST_DONE = 2,
65
WREPL_REQUEST_ERROR = 3
69
a WINS replication request
71
struct wrepl_request {
72
struct wrepl_request *next, *prev;
73
struct wrepl_socket *wrepl_socket;
75
enum wrepl_request_state state;
79
struct tevent_timer *te;
81
struct wrepl_packet *packet;
84
void (*fn)(struct wrepl_request *);
91
35
setup an association
129
73
(type | (state << 2) | (node << 5) | \
130
74
(is_static ? WREPL_FLAGS_IS_STATIC : 0))
76
struct wrepl_address {
83
enum wrepl_name_type type;
84
enum wrepl_name_state state;
85
enum wrepl_name_node node;
90
uint32_t num_addresses;
91
struct wrepl_address *addresses;
133
95
a full pull replication
141
103
uint32_t num_names;
143
struct nbt_name name;
144
enum wrepl_name_type type;
145
enum wrepl_name_state state;
146
enum wrepl_name_node node;
151
uint32_t num_addresses;
152
struct wrepl_address {
104
struct wrepl_name *names;
160
struct resolve_context;
108
struct tstream_context;
162
110
#include "libcli/wrepl/winsrepl_proto.h"