2 * Unix SMB/CIFS implementation.
3 * NetWorkstation testsuite
4 * Copyright (C) Guenther Deschner 2008
5 * Copyright (C) Hans Leidekker 2013
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #include <sys/types.h>
31 NET_API_STATUS
netapitest_wksta(struct libnetapi_ctx
*ctx
,
34 NET_API_STATUS status
= 0;
35 uint32_t levels
[] = { 100, 101, 102 };
38 printf("NetWorkstation tests\n");
41 for (i
=0; i
<ARRAY_SIZE(levels
); i
++) {
42 uint8_t *buffer
= NULL
;
43 printf("testing NetWkstaGetInfo level %d\n", levels
[i
]);
45 status
= NetWkstaGetInfo(hostname
, levels
[i
], &buffer
);
46 if (status
&& status
!= 124) {
47 NETAPI_STATUS(ctx
, status
, "NetWkstaGetInfo");
54 printf("NetWorkstation tests succeeded\n");
57 printf("NetWorkstation testsuite failed with: %s\n",
58 libnetapi_get_error_string(ctx
, status
));