From b6e811b90bf8cc6ca440ffedd210e5b16df555b2 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Fri, 5 Jan 2001 13:43:19 +0000 Subject: The latest changes to libsmbclient ... It can now do a directory listing for workgroups, servers, and shares, and, with a bit more effort, it will be able to list directories and files. I also does not request a username and password for the IPC$ share, but it should if the first attempt to connect fails. (This used to be commit 38ff91c5059a32c7ad2fd6074697c7c7f68a878c) --- source3/include/libsmbclient.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'source3/include/libsmbclient.h') diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h index a56ff2d7eb..173a56270b 100644 --- a/source3/include/libsmbclient.h +++ b/source3/include/libsmbclient.h @@ -29,7 +29,28 @@ #include #include #include -#include + +#define SMBC_MAX_NAME 1023 + +struct smbc_dirent { + + uint smbc_type; /* Type of entity, see below */ + uint namelen; + uint commentlen; + char *comment; /* Points to the comment futher down */ + char name[1]; + +}; + +#define SMBC_WORKGROUP 1 +#define SMBC_SERVER 2 +#define SMBC_FILE_SHARE 3 +#define SMBC_PRINTER_SHARE 4 +#define SMBC_COMMS_SHARE 5 +#define SMBC_IPC_SHARE 6 +#define SMBC_DIR 7 +#define SMBC_FILE 8 +#define SMBC_LINK 9 #define SMBC_FILE_MODE (S_IFREG | 0444) #define SMBC_DIR_MODE (S_IFDIR | 0555) @@ -133,7 +154,7 @@ int smbc_closedir(int fd); * Get a directory entry */ -int smbc_getdents(unsigned int fd, struct dirent *dirp, int count); +int smbc_getdents(unsigned int fd, struct smbc_dirent *dirp, int count); /* * Create a directory on a server, share, dir in fname URL -- cgit