2 Samba Unix/Linux SMB client library
3 More client RAP (SMB Remote Procedure Calls) functions
4 Copyright (C) 2001 Steve French (sfrench@us.ibm.com)
5 Copyright (C) 2001 Jim McDonough (jmcd@us.ibm.com)
6 Copyright (C) 2007 Jeremy Allison. jra@samba.org
7 Copyright (C) Andrew Tridgell 1994-1998
8 Copyright (C) Gerald (Jerry) Carter 2004
9 Copyright (C) James Peach 2007
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #ifndef __UTILS_CLIRAP2_H__
26 #define __UTILS_CLIRAP2_H__
28 #include "../libsmb/clirap.h"
30 struct rap_group_info_1
;
31 struct rap_user_info_1
;
32 struct rap_share_info_2
;
34 int cli_NetGroupDelete(struct cli_state
*cli
, const char *group_name
);
35 int cli_NetGroupAdd(struct cli_state
*cli
, struct rap_group_info_1
*grinfo
);
36 int cli_RNetGroupEnum(struct cli_state
*cli
, void (*fn
)(const char *, const char *, void *), void *state
);
37 int cli_RNetGroupEnum0(struct cli_state
*cli
,
38 void (*fn
)(const char *, void *),
40 int cli_NetGroupDelUser(struct cli_state
* cli
, const char *group_name
, const char *user_name
);
41 int cli_NetGroupAddUser(struct cli_state
* cli
, const char *group_name
, const char *user_name
);
42 int cli_NetGroupGetUsers(struct cli_state
* cli
, const char *group_name
, void (*fn
)(const char *, void *), void *state
);
43 int cli_NetUserGetGroups(struct cli_state
* cli
, const char *user_name
, void (*fn
)(const char *, void *), void *state
);
44 int cli_NetUserDelete(struct cli_state
*cli
, const char * user_name
);
45 int cli_NetUserAdd(struct cli_state
*cli
, struct rap_user_info_1
* userinfo
);
46 int cli_RNetUserEnum(struct cli_state
*cli
, void (*fn
)(const char *, const char *, const char *, const char *, void *), void *state
);
47 int cli_RNetUserEnum0(struct cli_state
*cli
,
48 void (*fn
)(const char *, void *),
50 int cli_NetFileClose(struct cli_state
*cli
, uint32_t file_id
);
51 int cli_NetFileGetInfo(struct cli_state
*cli
, uint32_t file_id
, void (*fn
)(const char *, const char *, uint16_t, uint16_t, uint32_t));
52 int cli_NetFileEnum(struct cli_state
*cli
, const char * user
,
53 const char * base_path
,
54 void (*fn
)(const char *, const char *, uint16_t, uint16_t,
56 int cli_NetShareAdd(struct cli_state
*cli
, struct rap_share_info_2
* sinfo
);
57 int cli_NetShareDelete(struct cli_state
*cli
, const char * share_name
);
58 bool cli_get_pdc_name(struct cli_state
*cli
, const char *workgroup
, char **pdc_name
);
59 bool cli_get_server_name(TALLOC_CTX
*mem_ctx
, struct cli_state
*cli
,
61 bool cli_ns_check_server_type(struct cli_state
*cli
, char *workgroup
, uint32_t stype
);
62 bool cli_NetWkstaUserLogoff(struct cli_state
*cli
, const char *user
, const char *workstation
);
63 int cli_NetPrintQEnum(struct cli_state
*cli
,
64 void (*qfn
)(const char*,uint16_t,uint16_t,uint16_t,const char*,const char*,const char*,const char*,const char*,uint16_t,uint16_t),
65 void (*jfn
)(uint16_t,const char*,const char*,const char*,const char*,uint16_t,uint16_t,const char*,unsigned int,unsigned int,const char*));
66 int cli_NetPrintQGetInfo(struct cli_state
*cli
, const char *printer
,
67 void (*qfn
)(const char*,uint16_t,uint16_t,uint16_t,const char*,const char*,const char*,const char*,const char*,uint16_t,uint16_t),
68 void (*jfn
)(uint16_t,const char*,const char*,const char*,const char*,uint16_t,uint16_t,const char*,unsigned int,unsigned int,const char*));
69 int cli_RNetServiceEnum(struct cli_state
*cli
, void (*fn
)(const char *, const char *, void *), void *state
);
70 int cli_NetSessionEnum(struct cli_state
*cli
, void (*fn
)(char *, char *, uint16_t, uint16_t, uint16_t, unsigned int, unsigned int, unsigned int, char *));
71 int cli_NetSessionGetInfo(struct cli_state
*cli
, const char *workstation
,
72 void (*fn
)(const char *, const char *, uint16_t, uint16_t, uint16_t, unsigned int, unsigned int, unsigned int, const char *));
73 int cli_NetSessionDel(struct cli_state
*cli
, const char *workstation
);
74 int cli_NetConnectionEnum(struct cli_state
*cli
, const char *qualifier
,
75 void (*fn
)(uint16_t conid
, uint16_t contype
,
76 uint16_t numopens
, uint16_t numusers
,
77 uint32_t contime
, const char *username
,
78 const char *netname
));
80 #endif /* __UTILS_CLIRAP2_H__ */