4 IDL structures for WINS replication protocol (port 42)
6 Note that WINS replication is not traditionally encoded using
9 Written by Andrew Tridgell <tridge@osdl.org>
15 pointer_default(unique),
16 pointer_default_top(unique)
20 const int WINS_REPLICATION_PORT = 42;
22 typedef [flag(NDR_BIG_ENDIAN)] struct {
27 typedef [flag(NDR_LITTLE_ENDIAN)] struct {
29 wrepl_ip ips[num_ips];
33 typedef [nodiscriminant] union {
34 [case(0)] wrepl_ip address;
35 [case(2)] wrepl_address_list addresses;
42 [flag(NDR_LITTLE_ENDIAN)] uint32 group_flag;
44 [switch_is(flags & 2)] wrepl_addresses addresses;
49 wrepl_wins_name names[num_names];
61 wrepl_wins_owner partners[partner_count];
62 ipv4address initiator;
65 typedef [v1_enum] enum {
66 WREPL_REPL_TABLE_QUERY = 0,
67 WREPL_REPL_TABLE_REPLY = 1,
68 WREPL_REPL_SEND_REQUEST = 2,
69 WREPL_REPL_SEND_REPLY = 3,
70 WREPL_REPL_UPDATE = 4,
72 WREPL_REPL_INFORM = 8,
74 } wrepl_replication_cmd;
76 typedef [nodiscriminant] union {
77 [case(WREPL_REPL_TABLE_QUERY)] ;
78 [case(WREPL_REPL_TABLE_REPLY)] wrepl_table table;
79 [case(WREPL_REPL_SEND_REQUEST)] wrepl_wins_owner owner;
80 [case(WREPL_REPL_SEND_REPLY)] wrepl_send_reply reply;
81 [case(WREPL_REPL_UPDATE)] wrepl_table table;
82 [case(WREPL_REPL_5)] wrepl_table table;
83 [case(WREPL_REPL_INFORM)] wrepl_table table;
84 [case(WREPL_REPL_9)] wrepl_table table;
85 } wrepl_replication_info;
88 wrepl_replication_cmd command;
89 [switch_is(command)] wrepl_replication_info info;
102 typedef [v1_enum] enum {
103 WREPL_START_ASSOCIATION = 0,
104 WREPL_START_ASSOCIATION_REPLY = 1,
105 WREPL_STOP_ASSOCIATION = 2,
106 WREPL_REPLICATION = 3
109 typedef [nodiscriminant] union {
110 [case(WREPL_START_ASSOCIATION)] wrepl_start start;
111 [case(WREPL_START_ASSOCIATION_REPLY)] wrepl_start start_reply;
112 [case(WREPL_STOP_ASSOCIATION)] wrepl_stop stop;
113 [case(WREPL_REPLICATION)] wrepl_replication replication;
117 the opcode appears to be a bitfield, but as far as I can tell
118 you must always set the following bits. Additional bits don't
119 seem to matter. Very strange.
121 const int WREPL_OPCODE_BITS = 0x7800;
124 typedef [gensize,flag(NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {
127 wrepl_mess_type mess_type;
128 [switch_is(mess_type)] wrepl_message message;
129 [flag(NDR_REMAINING)] DATA_BLOB padding;
132 typedef [flag(NDR_BIG_ENDIAN|NDR_PAHEX),public] struct {
133 [value(ndr_size_wrepl_packet(&packet, ndr->flags))] uint32 size;
137 void decode_winsrepl(