1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

r12639: - do some tests with 0x20 0x1B names

- do some tests with 0xBF and 0xBE, this shows that the '+' padding
  should be done by the client

metze
(This used to be commit 5a257ba9811b247a0df2b44c99df00f59dacc1e0)
This commit is contained in:
Stefan Metzmacher 2005-12-31 08:42:01 +00:00 committed by Gerald (Jerry) Carter
parent d73156d2c4
commit 76480dba70

View File

@ -25,8 +25,8 @@
#define CHECK_VALUE(v, correct) do { \
if ((v) != (correct)) { \
printf("(%s) Incorrect value %s=%d - should be %d\n", \
__location__, #v, v, correct); \
printf("(%s) Incorrect value %s=%d (0x%X) - should be %d (0x%X)\n", \
__location__, #v, v, v, correct, correct); \
ret = False; \
}} while (0)
@ -40,7 +40,7 @@
#define CHECK_NAME(_name, correct) do { \
CHECK_STRING((_name).name, (correct).name); \
CHECK_VALUE((_name).type, (correct).type); \
CHECK_VALUE((uint8_t)(_name).type, (uint8_t)(correct).type); \
CHECK_STRING((_name).scope, (correct).scope); \
} while (0)
@ -303,12 +303,24 @@ static BOOL nbt_test_wins(TALLOC_CTX *mem_ctx, const char *address)
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H | NBT_NM_GROUP);
name.type = NBT_NAME_SERVER;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
name.type = NBT_NAME_LOGON;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H | NBT_NM_GROUP);
name.type = NBT_NAME_BROWSER;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H | NBT_NM_GROUP);
name.type = NBT_NAME_PDC;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
name.type = 0xBF;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
name.type = 0xBE;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
name.scope = "example";
name.type = 0x72;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);