diff options
author | Tim Potter <tpot@samba.org> | 2005-05-22 10:23:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:58 -0500 |
commit | 2b7fe67f4d02f861c9a4bfe823e648f0a995e613 (patch) | |
tree | 969cd8c1c004517303dc25629ecaf0227c45bfbe /source4/torture/nbt | |
parent | ffbeabef646987f02b98cd1f781d3c2a614b3d24 (diff) | |
download | samba-2b7fe67f4d02f861c9a4bfe823e648f0a995e613.tar.gz samba-2b7fe67f4d02f861c9a4bfe823e648f0a995e613.tar.bz2 samba-2b7fe67f4d02f861c9a4bfe823e648f0a995e613.zip |
r6933: Add a couple of helper functions for creating nbt names.
(This used to be commit b896daf11c3efb1b3ca939575da9dab82b395777)
Diffstat (limited to 'source4/torture/nbt')
-rw-r--r-- | source4/torture/nbt/dgram.c | 13 | ||||
-rw-r--r-- | source4/torture/nbt/query.c | 4 | ||||
-rw-r--r-- | source4/torture/nbt/register.c | 4 | ||||
-rw-r--r-- | source4/torture/nbt/wins.c | 4 | ||||
-rw-r--r-- | source4/torture/nbt/winsbench.c | 4 | ||||
-rw-r--r-- | source4/torture/nbt/winsreplication.c | 4 |
6 files changed, 8 insertions, 25 deletions
diff --git a/source4/torture/nbt/dgram.c b/source4/torture/nbt/dgram.c index 5726e68471..d5fa014ce1 100644 --- a/source4/torture/nbt/dgram.c +++ b/source4/torture/nbt/dgram.c @@ -92,9 +92,7 @@ static BOOL nbt_test_netlogon(TALLOC_CTX *mem_ctx, logon.req.pdc.lmnt_token = 0xFFFF; logon.req.pdc.lm20_token = 0xFFFF; - myname.name = TEST_NAME; - myname.type = NBT_NAME_CLIENT; - myname.scope = NULL; + make_nbt_name_client(&myname, TEST_NAME); status = dgram_mailslot_netlogon_send(dgmsock, &name, address, 0, &myname, &logon); @@ -154,9 +152,7 @@ static BOOL nbt_test_netlogon2(TALLOC_CTX *mem_ctx, logon.req.pdc2.lmnt_token = 0xFFFF; logon.req.pdc2.lm20_token = 0xFFFF; - myname.name = TEST_NAME; - myname.type = NBT_NAME_CLIENT; - myname.scope = NULL; + make_nbt_name_client(&myname, TEST_NAME); status = dgram_mailslot_netlogon_send(dgmsock, &name, address, 0, &myname, &logon); @@ -257,10 +253,7 @@ static BOOL nbt_test_ntlogon(TALLOC_CTX *mem_ctx, logon.req.logon.lmnt_token = 0xFFFF; logon.req.logon.lm20_token = 0xFFFF; - - myname.name = TEST_NAME; - myname.type = NBT_NAME_CLIENT; - myname.scope = NULL; + make_nbt_name_client(&myname, TEST_NAME); status = dgram_mailslot_ntlogon_send(dgmsock, &name, address, 0, &myname, &logon); diff --git a/source4/torture/nbt/query.c b/source4/torture/nbt/query.c index a9141f4431..3764596f3f 100644 --- a/source4/torture/nbt/query.c +++ b/source4/torture/nbt/query.c @@ -110,9 +110,7 @@ BOOL torture_bench_nbt(void) NTSTATUS status; BOOL ret = True; - name.name = lp_parm_string(-1, "torture", "host"); - name.type = NBT_NAME_SERVER; - name.scope = NULL; + make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host")); /* do an initial name resolution to find its IP */ status = resolve_name(&name, mem_ctx, &address); diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c index e9b98663a5..463783e1c9 100644 --- a/source4/torture/nbt/register.c +++ b/source4/torture/nbt/register.c @@ -160,9 +160,7 @@ BOOL torture_nbt_register(void) NTSTATUS status; BOOL ret = True; - name.name = strupper_talloc(mem_ctx, lp_parm_string(-1, "torture", "host")); - name.type = NBT_NAME_SERVER; - name.scope = NULL; + make_nbt_name_server(&name, strupper_talloc(mem_ctx, lp_parm_string(-1, "torture", "host"))); /* do an initial name resolution to find its IP */ status = resolve_name(&name, mem_ctx, &address); diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c index f92a23f732..b099f48476 100644 --- a/source4/torture/nbt/wins.c +++ b/source4/torture/nbt/wins.c @@ -345,9 +345,7 @@ BOOL torture_nbt_wins(void) NTSTATUS status; BOOL ret = True; - name.name = lp_parm_string(-1, "torture", "host"); - name.type = NBT_NAME_SERVER; - name.scope = NULL; + make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host")); /* do an initial name resolution to find its IP */ status = resolve_name(&name, mem_ctx, &address); diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c index 54f730ce84..76763d3bf0 100644 --- a/source4/torture/nbt/winsbench.c +++ b/source4/torture/nbt/winsbench.c @@ -276,9 +276,7 @@ BOOL torture_bench_wins(void) NTSTATUS status; BOOL ret = True; - name.name = lp_parm_string(-1, "torture", "host"); - name.type = NBT_NAME_SERVER; - name.scope = NULL; + make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host")); /* do an initial name resolution to find its IP */ status = resolve_name(&name, mem_ctx, &address); diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c index 5ba6003b78..4e91deb84a 100644 --- a/source4/torture/nbt/winsreplication.c +++ b/source4/torture/nbt/winsreplication.c @@ -124,9 +124,7 @@ BOOL torture_nbt_winsreplication(void) NTSTATUS status; BOOL ret = True; - name.name = lp_parm_string(-1, "torture", "host"); - name.type = NBT_NAME_SERVER; - name.scope = NULL; + make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host")); /* do an initial name resolution to find its IP */ status = resolve_name(&name, mem_ctx, &address); |