diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-19 14:36:27 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-19 14:36:27 +0000 |
commit | b0c148793b8ac4b62e9a66ce7e269ab50b90bf8d (patch) | |
tree | 427359e3acaa0939c60557d50d9a8076e4d99eb8 /source3/include | |
parent | baddbcdb149c5365f9103fdaa719f9a98e2df004 (diff) | |
download | samba-b0c148793b8ac4b62e9a66ce7e269ab50b90bf8d.tar.gz samba-b0c148793b8ac4b62e9a66ce7e269ab50b90bf8d.tar.bz2 samba-b0c148793b8ac4b62e9a66ce7e269ab50b90bf8d.zip |
added the following structures:
SH_INFO_1
SH_INFO_1_STR
SHARE_INFO_1_CTR
SRV_Q_NET_SHARE_ENUM
SRV_R_NET_SHARE_ENUM
the share info1 container can handle a maximum of 32 shares. the share info1
string structures contain two unicode strings, with 1024 uint16 characters
_each_. we're going to _have_ to dynamically allocate the unicode strings,
else we'll run out of stack space. rapidly.
(This used to be commit e8bedb18bf249d2f06834b0f151ea22df86e2602)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/smb.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h index 11ec6940a6..facb059f36 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -836,6 +836,72 @@ typedef struct lsa_r_sam_logoff_info } LSA_R_SAM_LOGOFF; + +/* SH_INFO_1 (pointers to level 1 share info strings) */ +typedef struct ptr_share_info1 +{ + uint32 ptr_shi1_netname; /* pointer to net name. */ + uint32 shi1_type; /* type of share. 0 - undocumented. */ + uint32 ptr_shi1_remark; /* pointer to comment. */ + +} SH_INFO_1; + +/* SH_INFO_1_STR (level 1 share info strings) */ +typedef struct str_share_info1 +{ + UNISTR2 uni_shi1_netname; /* unicode string of net name */ + UNISTR2 uni_shi1_remark; /* unicode string of comment. */ + +} SH_INFO_1_STR; + +/* oops - this is going to take up a *massive* amount of stack. */ +/* the UNISTR2s already have 1024 uint16 chars in them... */ +#define MAX_SHARE_ENTRIES 32 + +/* SHARE_INFO_1_CONTAINER */ +typedef struct share_info_ctr +{ + uint32 num_entries_read; /* EntriesRead */ + uint32 ptr_share_info; /* Buffer */ + SH_INFO_1 info_1 [MAX_SHARE_ENTRIES]; /* share entry pointers */ + SH_INFO_1_STR info_1_str[MAX_SHARE_ENTRIES]; /* share entry strings */ + uint32 num_entries_read2; /* EntriesRead2 */ + +} SHARE_INFO_1_CTR; + + +/* SRV_Q_NET_SHARE_ENUM */ +typedef struct q_net_share_enum_info +{ + uint32 ptr_srv_name; /* pointer (to server name?) */ + UNISTR2 uni_srv_name; /* server name */ + + uint32 share_level; /* share level */ + uint32 switch_value; /* switch value */ + + uint32* ptr_share_info; /* pointer to SHARE_INFO_1_CTR */ + SHARE_INFO_1_CTR share_info; /* share info with 0 entries */ + + uint32 preferred_len; /* preferred maximum length (0xffff ffff) */ + +} SRV_Q_NET_SHARE_ENUM; + + +/* SRV_R_NET_SHARE_ENUM */ +typedef struct r_net_share_enum_info +{ + uint32 share_level; /* share level */ + uint32 switch_value; /* switch value */ + + uint32* ptr_share_info; /* pointer to SHARE_INFO_1_CTR */ + SHARE_INFO_1_CTR share_info; /* share info with 0 entries */ + + uint32 status; /* return status */ + +} SRV_R_NET_SHARE_ENUM; + + + /* Yet to be turned into structures: @@ -931,6 +997,7 @@ typedef struct time_t atime; time_t ctime; pstring name; + } file_info; |