2 Unix SMB/CIFS implementation.
4 Copyright (C) Jelmer Vernooij 2006
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include "torture/torture.h"
23 #include "torture/nbt/proto.h"
24 #include "torture/ui.h"
25 #include "libcli/resolve/resolve.h"
27 bool torture_nbt_get_name(struct torture_context
*tctx
,
28 struct nbt_name
*name
,
31 make_nbt_name_server(name
, strupper_talloc(tctx
,
32 torture_setting_string(tctx
, "host", NULL
)));
34 /* do an initial name resolution to find its IP */
35 torture_assert_ntstatus_ok(tctx
,
36 resolve_name(name
, tctx
, address
, NULL
),
38 "Failed to resolve %s", name
->name
));
43 NTSTATUS
torture_nbt_init(void)
45 struct torture_suite
*suite
= torture_suite_create(
46 talloc_autofree_context(),
49 torture_suite_add_suite(suite
, torture_nbt_register());
50 torture_suite_add_suite(suite
, torture_nbt_wins());
51 torture_suite_add_suite(suite
, torture_nbt_dgram());
52 torture_suite_add_suite(suite
, torture_nbt_winsreplication());
53 torture_suite_add_suite(suite
, torture_bench_nbt());
54 torture_suite_add_suite(suite
, torture_bench_wins());
56 suite
->description
= talloc_strdup(suite
,
57 "NetBIOS over TCP/IP and WINS tests");
59 torture_register_suite(suite
);