diff options
author | Richard Sharpe <sharpe@samba.org> | 2001-01-05 13:43:19 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 2001-01-05 13:43:19 +0000 |
commit | b6e811b90bf8cc6ca440ffedd210e5b16df555b2 (patch) | |
tree | 07860050ac28bb93ebdb340f318703129e1d5fe2 /source3/include | |
parent | dca808cbc4b52e38701f814f7aac043ddd1ca1c1 (diff) | |
download | samba-b6e811b90bf8cc6ca440ffedd210e5b16df555b2.tar.gz samba-b6e811b90bf8cc6ca440ffedd210e5b16df555b2.tar.bz2 samba-b6e811b90bf8cc6ca440ffedd210e5b16df555b2.zip |
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)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/libsmbclient.h | 25 |
1 files changed, 23 insertions, 2 deletions
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 <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <dirent.h> + +#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 |