diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-08-13 01:53:07 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-08-13 01:53:07 +0000 |
commit | ef2e26c91b80556af033d3335e55f5dfa6fff31d (patch) | |
tree | faa21bfd7e7b5247250b47c7891dc1a5ebee6be9 /source4/wrepld/wins_repl.h | |
download | samba-ef2e26c91b80556af033d3335e55f5dfa6fff31d.tar.gz samba-ef2e26c91b80556af033d3335e55f5dfa6fff31d.tar.bz2 samba-ef2e26c91b80556af033d3335e55f5dfa6fff31d.zip |
first public release of samba4 code
(This used to be commit b0510b5428b3461aeb9bbe3cc95f62fc73e2b97f)
Diffstat (limited to 'source4/wrepld/wins_repl.h')
-rw-r--r-- | source4/wrepld/wins_repl.h | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/source4/wrepld/wins_repl.h b/source4/wrepld/wins_repl.h new file mode 100644 index 0000000000..25b4442212 --- /dev/null +++ b/source4/wrepld/wins_repl.h @@ -0,0 +1,161 @@ +/* + * Unix SMB/CIFS implementation. + * RPC Pipe client / server routines + * Copyright (C) Jean François Micouleau 1998-2002. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#define OPCODE_NON_NBT 0x00007800 + +/* the messages */ +#define MESSAGE_TYPE_START_ASSOC_REQUEST 0 +#define MESSAGE_TYPE_START_ASSOC_REPLY 1 +#define MESSAGE_TYPE_STOP_ASSOC 2 +#define MESSAGE_TYPE_REPLICATE 3 + +/* the replication sub-message */ +#define MESSAGE_REP_ADD_VERSION_REQUEST 0 +#define MESSAGE_REP_ADD_VERSION_REPLY 1 +#define MESSAGE_REP_SEND_ENTRIES_REQUEST 2 +#define MESSAGE_REP_SEND_ENTRIES_REPLY 3 +#define MESSAGE_REP_UPDATE_NOTIFY_REQUEST 4 + +/* stop reasons */ +#define STOP_REASON_USER_REASON 0 +#define STOP_REASON_AUTH_FAILED 1 +#define STOP_REASON_INCOMPLETE_VERSION 2 +#define STOP_REASON_BUG_CHECK 3 +#define STOP_REASON_MESSAGE_ERROR 4 + + +typedef struct _WINS_OWNER { + struct in_addr address; + SMB_BIG_UINT max_version; + SMB_BIG_UINT min_version; + int type; + time_t last_pull; + time_t last_push; +} WINS_OWNER; + +typedef struct _WINS_NAME { + int name_len; /* always 0x11 */ + char name[16]; + char type; + int empty; + int name_flag; + int group_flag; + SMB_BIG_UINT id; + int num_ip; + struct in_addr owner; + struct in_addr *others; + int foo; /* 0xffffff */ +} WINS_NAME; + +typedef struct _WINS_PARTNERS +{ + int client_assoc; + int server_assoc; + BOOL pull_partner; + BOOL push_partner; + struct in_addr partner_server; + struct in_addr other_server; +} WINS_PARTNER; + +typedef struct _generic_header{ + int data_size; + int opcode; + int assoc_ctx; + int mess_type; +} generic_header; + +typedef struct _START_ASSOC_REQUEST { + int assoc_ctx; + int min_ver; + int maj_ver; +} START_ASSOC_REQUEST; + +typedef struct _START_ASSOC_REPLY { + int assoc_ctx; + int min_ver; + int maj_ver; +} START_ASSOC_REPLY; + +typedef struct _STOP_ASSOC { + int reason; +} STOP_ASSOC; + +typedef struct _AVMT_REP { + int partner_count; + WINS_OWNER *wins_owner; + struct in_addr initiating_wins_server; +} AVMT_REP; + +typedef struct _SEND_ENTRIES_REQUEST { + WINS_OWNER wins_owner; +} SEND_ENTRIES_REQUEST; + +typedef struct _SEND_ENTRIES_REPLY { + int max_names; + WINS_NAME *wins_name; +} SEND_ENTRIES_REPLY; + +typedef struct _UPDATE_NOTIFY_REQUEST { + int partner_count; + WINS_OWNER *wins_owner; + struct in_addr initiating_wins_server; +} UPDATE_NOTIFY_REQUEST; + +typedef struct _REPLICATE { + int msg_type; + + AVMT_REP avmt_rep; + SEND_ENTRIES_REQUEST se_rq; + SEND_ENTRIES_REPLY se_rp; + UPDATE_NOTIFY_REQUEST un_rq; +} REPLICATE; + + +typedef struct _GENERIC_PACKET { + int fd; + + generic_header header; + + START_ASSOC_REQUEST sa_rq; + START_ASSOC_REPLY sa_rp; + STOP_ASSOC so; + REPLICATE rep; +} GENERIC_PACKET; + +struct wins_packet_struct +{ + struct wins_packet_struct *next; + struct wins_packet_struct *prev; + BOOL stop_packet; + int fd; + time_t timestamp; + GENERIC_PACKET *packet; +}; + +struct BUFFER { + char *buffer; + int offset; + int length; +}; + + + +#include "wrepld_proto.h" + |