型定義 | |
typedef void(*) | smbc_get_auth_data_fn (const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen) |
Authentication callback function type (traditional method) | |
typedef void(*) | smbc_get_auth_data_with_context_fn (SMBCCTX *c, const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen) |
Authentication callback function type (method that includes context) | |
typedef void(*) | smbc_list_print_job_fn (struct print_job_info *i) |
Print job info callback function type. | |
typedef int(*) | smbc_check_server_fn (SMBCCTX *c, SMBCSRV *srv) |
Check if a server is still good | |
typedef int(*) | smbc_remove_unused_server_fn (SMBCCTX *c, SMBCSRV *srv) |
Remove a server if unused | |
typedef int(*) | smbc_add_cached_srv_fn (SMBCCTX *c, SMBCSRV *srv, const char *server, const char *share, const char *workgroup, const char *username) |
Add a server to the cache system | |
typedef SMBCSRV *(*) | smbc_get_cached_srv_fn (SMBCCTX *c, const char *server, const char *share, const char *workgroup, const char *username) |
Look up a server in the cache system | |
typedef int(*) | smbc_remove_cached_srv_fn (SMBCCTX *c, SMBCSRV *srv) |
Check if a server is still good | |
typedef int(*) | smbc_purge_cached_fn (SMBCCTX *c) |
Try to remove all servers from the cache system and disconnect | |
関数 | |
int | smbc_remove_unused_server (SMBCCTX *context, SMBCSRV *srv) |
Remove a server from the cached server list it's unused. |
typedef void(*) smbc_get_auth_data_fn(const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen) |
Authentication callback function type (traditional method)
Type for the the authentication function called by the library to obtain authentication credentals
srv | Server being authenticated to | |
shr | Share being authenticated to | |
wg | Pointer to buffer containing a "hint" for the workgroup to be authenticated. Should be filled in with the correct workgroup if the hint is wrong. | |
wglen | The size of the workgroup buffer in bytes | |
un | Pointer to buffer containing a "hint" for the user name to be use for authentication. Should be filled in with the correct workgroup if the hint is wrong. | |
unlen | The size of the username buffer in bytes | |
pw | Pointer to buffer containing to which password copied | |
pwlen | The size of the password buffer in bytes |
libsmbclient.h の 249 行で定義されています。
typedef void(*) smbc_get_auth_data_with_context_fn(SMBCCTX *c, const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen) |
Authentication callback function type (method that includes context)
Type for the the authentication function called by the library to obtain authentication credentals
c | Pointer to the smb context | |
srv | Server being authenticated to | |
shr | Share being authenticated to | |
wg | Pointer to buffer containing a "hint" for the workgroup to be authenticated. Should be filled in with the correct workgroup if the hint is wrong. | |
wglen | The size of the workgroup buffer in bytes | |
un | Pointer to buffer containing a "hint" for the user name to be use for authentication. Should be filled in with the correct workgroup if the hint is wrong. | |
unlen | The size of the username buffer in bytes | |
pw | Pointer to buffer containing to which password copied | |
pwlen | The size of the password buffer in bytes |
libsmbclient.h の 285 行で定義されています。
typedef void(*) smbc_list_print_job_fn(struct print_job_info *i) |
Print job info callback function type.
i | pointer to print job information structure |
libsmbclient.h の 299 行で定義されています。
typedef int(*) smbc_check_server_fn(SMBCCTX *c, SMBCSRV *srv) |
Check if a server is still good
c | pointer to smb context | |
srv | pointer to server to check |
libsmbclient.h の 312 行で定義されています。
typedef int(*) smbc_remove_unused_server_fn(SMBCCTX *c, SMBCSRV *srv) |
Remove a server if unused
c | pointer to smb context | |
srv | pointer to server to remove |
libsmbclient.h の 324 行で定義されています。
typedef int(*) smbc_add_cached_srv_fn(SMBCCTX *c, SMBCSRV *srv, const char *server, const char *share, const char *workgroup, const char *username) |
Add a server to the cache system
c | pointer to smb context | |
srv | pointer to server to add | |
server | server name | |
share | share name | |
workgroup | workgroup used to connect | |
username | username used to connect |
libsmbclient.h の 345 行で定義されています。
typedef SMBCSRV*(*) smbc_get_cached_srv_fn(SMBCCTX *c, const char *server, const char *share, const char *workgroup, const char *username) |
Look up a server in the cache system
c | pointer to smb context | |
server | server name to match | |
share | share name to match | |
workgroup | workgroup to match | |
username | username to match |
libsmbclient.h の 365 行で定義されています。
typedef int(*) smbc_remove_cached_srv_fn(SMBCCTX *c, SMBCSRV *srv) |
Check if a server is still good
c | pointer to smb context | |
srv | pointer to server to remove |
libsmbclient.h の 379 行で定義されています。
typedef int(*) smbc_purge_cached_fn(SMBCCTX *c) |
Try to remove all servers from the cache system and disconnect
c | pointer to smb context |
libsmbclient.h の 390 行で定義されています。
Remove a server from the cached server list it's unused.
context | pointer to smb context | |
srv | pointer to server to remove |
libsmbclient.c の 517 行で定義されています。
参照先 smbc_internal_data::_files・smbc_internal_data::_initialized・smbc_internal_data::_servers・_SMBCCTX::callbacks・_SMBCSRV::cli・cli_shutdown()・_SMBCCTX::internal・_SMBCFILE::next・_SMBCCTX::_smbc_callbacks::remove_cached_srv_fn・_SMBCFILE::srv.
参照元 smbc_new_context()・smbc_purge_cached().
00519 { 00520 SMBCFILE * file; 00521 00522 /* are we being fooled ? */ 00523 if (!context || !context->internal || 00524 !context->internal->_initialized || !srv) return 1; 00525 00526 00527 /* Check all open files/directories for a relation with this server */ 00528 for (file = context->internal->_files; file; file=file->next) { 00529 if (file->srv == srv) { 00530 /* Still used */ 00531 DEBUG(3, ("smbc_remove_usused_server: " 00532 "%p still used by %p.\n", 00533 srv, file)); 00534 return 1; 00535 } 00536 } 00537 00538 DLIST_REMOVE(context->internal->_servers, srv); 00539 00540 cli_shutdown(srv->cli); 00541 srv->cli = NULL; 00542 00543 DEBUG(3, ("smbc_remove_usused_server: %p removed.\n", srv)); 00544 00545 (context->callbacks.remove_cached_srv_fn)(context, srv); 00546 00547 SAFE_FREE(srv); 00548 00549 return 0; 00550 }