|
libdsm
0.0.4-11-g223c1ba
Minimalist and read-only SMB client lib
|
List and connect to SMB shares. More...
Functions | |
| size_t | smb_share_get_list (smb_session *s, smb_share_list *list) |
| List the existing share of this sessions's machine. More... | |
| size_t | smb_share_list_count (smb_share_list list) |
| Get the number of share in the list. More... | |
| const char * | smb_share_list_at (smb_share_list list, size_t index) |
| Get the name of the share in the list at the given index. More... | |
| void | smb_share_list_destroy (smb_share_list list) |
| Destroy an opaque share list object. More... | |
| smb_tid | smb_tree_connect (smb_session *s, const char *name) |
| Connects to a SMB share. More... | |
| int | smb_tree_disconnect (smb_session *s, smb_tid tid) |
| Disconnect from a share. More... | |
List and connect to SMB shares.
| size_t smb_share_get_list | ( | smb_session * | s, |
| smb_share_list * | list | ||
| ) |
List the existing share of this sessions's machine.
This function makes a RPC to the machine this session is currently authenticated to and list all the existing shares of this machines. The share starting with a $ are supposed to be system/hidden share.
| [in] | s | The session object |
| [out] | list | A pointer to an opaque share_list object. |
| const char* smb_share_list_at | ( | smb_share_list | list, |
| size_t | index | ||
| ) |
Get the name of the share in the list at the given index.
| list | An opaque share list object |
| index | The index of the returned item in the list |
| size_t smb_share_list_count | ( | smb_share_list | list | ) |
Get the number of share in the list.
| list | An opaque share list returned by smb_share_list() |
| void smb_share_list_destroy | ( | smb_share_list | list | ) |
Destroy an opaque share list object.
| list | The list to destroy. The object is not usable anymore afterward, you can set it to 'NULL' |
| smb_tid smb_tree_connect | ( | smb_session * | s, |
| const char * | name | ||
| ) |
Connects to a SMB share.
Before being able to list/read files on a SMB file server, you have to be connected to the share containing the files you want to read or the directories you want to list
| s | The session object |
| name | The share name |
| int smb_tree_disconnect | ( | smb_session * | s, |
| smb_tid | tid | ||
| ) |
Disconnect from a share.
UNIMPLEMENTED
1.8.8