2 Unix SMB/CIFS implementation.
6 Copyright (C) Andrew Tridgell 2005
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 #define WINSDB_FLAG_ALLOC_VERSION (1<<0)
23 #define WINSDB_FLAG_TAKE_OWNERSHIP (1<<1)
27 const char *wins_owner
;
32 each record in the database contains the following information
34 struct winsdb_record
{
35 struct nbt_name
*name
;
36 enum wrepl_name_type type
;
37 enum wrepl_name_state state
;
38 enum wrepl_name_node node
;
42 const char *wins_owner
;
43 struct winsdb_addr
**addresses
;
45 /* only needed for debugging problems */
46 const char *registered_by
;
49 enum winsdb_handle_caller
{
50 WINSDB_HANDLE_CALLER_ADMIN
= 0,
51 WINSDB_HANDLE_CALLER_NBTD
= 1,
52 WINSDB_HANDLE_CALLER_WREPL
= 2
55 struct winsdb_handle
{
56 /* wins server database handle */
57 struct ldb_context
*ldb
;
60 * the type of the caller, as we pass this to the
61 * 'wins_ldb' ldb module can decide if it needs to verify the
62 * the records before they're written to disk
64 enum winsdb_handle_caller caller
;
66 /* local owner address */
67 const char *local_owner
;
69 /* wins hook script */
70 const char *hook_script
;
73 enum wins_hook_action
{
80 struct tevent_context
;
81 #include "nbt_server/wins/winsdb_proto.h"