svn commit: samba r10627 - in branches/SAMBA_4_0/source: libcli/wrepl librpc/idl torture/nbt

metze at samba.org metze at samba.org
Thu Sep 29 22:06:25 GMT 2005


Author: metze
Date: 2005-09-29 22:06:24 +0000 (Thu, 29 Sep 2005)
New Revision: 10627

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10627

Log:
- use a wrepl specific enum for the node type
- the unknown flag 0x10 seems to mean that this name was localy registered on this
  currently asked server, that flag is not present in replica records

metze
Modified:
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.h
   branches/SAMBA_4_0/source/librpc/idl/winsrepl.idl
   branches/SAMBA_4_0/source/torture/nbt/winsreplication.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c	2005-09-29 19:32:59 UTC (rev 10626)
+++ branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c	2005-09-29 22:06:24 UTC (rev 10627)
@@ -707,7 +707,7 @@
 		talloc_steal(io->out.names, wname->name.scope);
 		name->type	= WREPL_NAME_TYPE(wname->flags);
 		name->state	= WREPL_NAME_STATE(wname->flags);
-		name->node	= WREPL_NBT_NODE(wname->flags);
+		name->node	= WREPL_NAME_NODE(wname->flags);
 		name->is_static	= WREPL_NAME_IS_STATIC(wname->flags);
 		name->raw_flags	= wname->flags;
 		name->version_id= wname->id;

Modified: branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.h
===================================================================
--- branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.h	2005-09-29 19:32:59 UTC (rev 10626)
+++ branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.h	2005-09-29 22:06:24 UTC (rev 10627)
@@ -106,11 +106,11 @@
 
 #define WREPL_NAME_TYPE(flags) (flags & WREPL_FLAGS_RECORD_TYPE)
 #define WREPL_NAME_STATE(flags) ((flags & WREPL_FLAGS_RECORD_STATE)>>2)
-#define WREPL_NBT_NODE(flags) ((flags & WREPL_FLAGS_NODE_TYPE)<<8)
+#define WREPL_NAME_NODE(flags) ((flags & WREPL_FLAGS_NODE_TYPE)>>5)
 #define WREPL_NAME_IS_STATIC(flags) ((flags & WREPL_FLAGS_IS_STATIC)?True:False)
 
 #define WREPL_NAME_FLAGS(type, state, node, is_static) \
-	(type | (state << 2) | (node>>8) | \
+	(type | (state << 2) | (node << 5) | \
 	 (is_static ? WREPL_FLAGS_IS_STATIC : 0))
 
 /*
@@ -127,7 +127,7 @@
 			struct nbt_name name;
 			enum wrepl_name_type type;
 			enum wrepl_name_state state;
-			enum nbt_node_type node;
+			enum wrepl_name_node node;
 			BOOL is_static;
 			uint32_t raw_flags;
 			uint64_t version_id;

Modified: branches/SAMBA_4_0/source/librpc/idl/winsrepl.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/winsrepl.idl	2005-09-29 19:32:59 UTC (rev 10626)
+++ branches/SAMBA_4_0/source/librpc/idl/winsrepl.idl	2005-09-29 22:06:24 UTC (rev 10627)
@@ -49,10 +49,17 @@
 		WREPL_STATE_RESERVED	= 0x3
 	} wrepl_name_state;
 
+	typedef [enum8bit] enum {
+		WREPL_NODE_B	= 0x0,
+		WREPL_NODE_P	= 0x1,
+		WREPL_NODE_M	= 0x2,
+		WREPL_NODE_H	= 0x3
+	} wrepl_name_node;
+
 	typedef [bitmap32bit] bitmap {
 		WREPL_FLAGS_RECORD_TYPE		= 0x00000003,
 		WREPL_FLAGS_RECORD_STATE	= 0x0000000C,
-		WREPL_FLAGS_0x00000010		= 0x00000010,
+		WREPL_FLAGS_REGISTERED_LOCAL	= 0x00000010,
 		WREPL_FLAGS_NODE_TYPE		= 0x00000060,
 		WREPL_FLAGS_IS_STATIC		= 0x00000080
 	} wrepl_flags;

Modified: branches/SAMBA_4_0/source/torture/nbt/winsreplication.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2005-09-29 19:32:59 UTC (rev 10626)
+++ branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2005-09-29 22:06:24 UTC (rev 10627)
@@ -147,9 +147,9 @@
 	int i;
 
 	printf("%s\n", nbt_name_string(mem_ctx, &name->name));
-	printf("\tTYPE:%u STATE:%u NODE:0x%04X STATIC:%u VERSION_ID: %llu\n",
+	printf("\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
 		name->type, name->state, name->node, name->is_static, name->version_id);
-	printf("\tRAW_FLAGS:0x%08X OWNER: %-15s\n",
+	printf("\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
 		name->raw_flags, name->owner);
 	for (i=0;i<name->num_addresses;i++) {
 		printf("\tADDR: %-15s OWNER: %-15s\n", 



More information about the samba-cvs mailing list