2 * Unix SMB/CIFS implementation.
4 * Copyright (C) Guenther Deschner 2008
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 3 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, see <http://www.gnu.org/licenses/>.
20 #include <sys/types.h>
30 NET_API_STATUS
netapitest_server(struct libnetapi_ctx
*ctx
,
33 NET_API_STATUS status
= 0;
34 uint32_t levels
[] = { 100, 101, 102, 402, 403, 502, 503, 1005 };
37 printf("NetServer tests\n");
40 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
41 uint8_t *buffer
= NULL
;
42 printf("testing NetServerGetInfo level %d\n", levels
[i
]);
44 status
= NetServerGetInfo(hostname
, levels
[i
], &buffer
);
45 if (status
&& status
!= 124) {
46 NETAPI_STATUS(ctx
, status
, "NetServerGetInfo");
53 printf("NetServer tests succeeded\n");
56 printf("NetServer testsuite failed with: %s\n",
57 libnetapi_get_error_string(ctx
, status
));