summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/smbsrv/smb_xdr.h
diff options
context:
space:
mode:
authorGordon Ross <gwr@nexenta.com>2013-06-26 16:05:44 -0400
committerGordon Ross <gwr@nexenta.com>2015-11-06 12:22:30 -0500
commita90cf9f29973990687fa61de9f1f6ea22e924e40 (patch)
tree42f77e59c4470ef6d2ba3118ba6c75e43686c398 /usr/src/uts/common/smbsrv/smb_xdr.h
parentb24e356b384ccc80805e7150979de2373d44347c (diff)
downloadillumos-joyent-a90cf9f29973990687fa61de9f1f6ea22e924e40.tar.gz
6399 SMB2 support
Portions contributed by: Alek Pinchuk <alek@nexenta.com> Portions contributed by: Kevin Crowe <kevin.crowe@nexenta.com> Portions contributed by: Matt Barden <Matt.Barden@nexenta.com> Reviewed by: Alek Pinchuk <alek@nexenta.com> Reviewed by: Bayard Bell <bayard.bell@nexenta.com> Reviewed by: Dan Fields <dan.fields@nexenta.com> Reviewed by: Daniel Borek <daniel.borek@nexenta.com> Reviewed by: Gordon Ross <gordon.ross@nexenta.com> Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com> Reviewed by: Matt Barden <matt.barden@nexenta.com> Reviewed by: Yuri Pankov <Yuri.Pankov@nexenta.com> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/smbsrv/smb_xdr.h')
-rw-r--r--usr/src/uts/common/smbsrv/smb_xdr.h57
1 files changed, 56 insertions, 1 deletions
diff --git a/usr/src/uts/common/smbsrv/smb_xdr.h b/usr/src/uts/common/smbsrv/smb_xdr.h
index e4df610969..51bf3b57e2 100644
--- a/usr/src/uts/common/smbsrv/smb_xdr.h
+++ b/usr/src/uts/common/smbsrv/smb_xdr.h
@@ -53,7 +53,10 @@ extern "C" {
#include <stddef.h> /* offsetof */
#endif /* _KERNEL */
-/* null-terminated string */
+/*
+ * null-terminated string
+ * See also: smb_string_xdr()
+ */
typedef struct smb_string {
char *buf;
} smb_string_t;
@@ -103,6 +106,8 @@ typedef struct smb_pipehdr {
* resid For opipe: the number of bytes remaining in the server.
* door_rc Return code provided by the door server.
* status A pass-through status provided by the door operation.
+ *
+ * See also: smb_doorhdr_xdr()
*/
typedef struct smb_doorhdr {
uint32_t dh_magic;
@@ -116,6 +121,11 @@ typedef struct smb_doorhdr {
uint32_t dh_status;
} smb_doorhdr_t;
+/*
+ * Information about the client of a named pipe, provided by smbsrv
+ * to the server side of the named pipe (the RPC service).
+ * See also: smb_netuserinfo_xdr()
+ */
typedef struct smb_netuserinfo {
uint64_t ui_session_id;
uint16_t ui_smb_uid;
@@ -141,6 +151,10 @@ typedef struct smb_opennum {
char qualifier[MAXNAMELEN];
} smb_opennum_t;
+/*
+ * SMB (internal) representation of a tree connection (etc.)
+ * See also: smb_netconnectinfo_xdr()
+ */
typedef struct smb_netconnectinfo {
uint32_t ci_id;
uint32_t ci_type;
@@ -153,6 +167,10 @@ typedef struct smb_netconnectinfo {
char *ci_share;
} smb_netconnectinfo_t;
+/*
+ * SMB (internal) representation of an open file.
+ * See also: smb_netfileinfo_xdr()
+ */
typedef struct smb_netfileinfo {
uint16_t fi_fid;
uint32_t fi_uniqid;
@@ -220,13 +238,25 @@ bool_t lsa_account_xdr(XDR *, lsa_account_t *);
*/
#define SMB_VSS_GMT_SIZE sizeof ("@GMT-yyyy.mm.dd-hh.mm.ss")
+/*
+ * Args for enumerating "previous versions".
+ * See also: smb_gmttoken_query_xdr()
+ */
typedef struct smb_gmttoken_query {
uint32_t gtq_count;
char *gtq_path;
} smb_gmttoken_query_t;
+/*
+ * Part of response for enumerating "previous versions".
+ * See also: smb_gmttoken_xdr()
+ */
typedef char *smb_gmttoken_t;
+/*
+ * Response for enumerating "previous versions".
+ * See also: smb_gmttoken_response_xdr()
+ */
typedef struct smb_gmttoken_response {
uint32_t gtr_count;
struct {
@@ -235,9 +265,14 @@ typedef struct smb_gmttoken_response {
} gtr_gmttokens;
} smb_gmttoken_response_t;
+/*
+ * Args to lookup "previous versions" during open.
+ * See also: smb_gmttoken_snapname_xdr()
+ */
typedef struct smb_gmttoken_snapname {
char *gts_path;
char *gts_gmttoken;
+ uint64_t gts_toktime; /* seconds */
} smb_gmttoken_snapname_t;
bool_t smb_gmttoken_query_xdr(XDR *, smb_gmttoken_query_t *);
@@ -252,6 +287,10 @@ bool_t smb_gmttoken_snapname_xdr(XDR *, smb_gmttoken_snapname_t *);
*/
#define SMB_QUOTA_UNLIMITED 0xFFFFFFFFFFFFFFFF
+/*
+ * SMB (internal) representation of a quota response
+ * See also: smb_quota_xdr()
+ */
typedef struct smb_quota {
list_node_t q_list_node;
char q_sidstr[SMB_SID_STRSZ];
@@ -262,6 +301,10 @@ typedef struct smb_quota {
avl_node_t q_avl_node;
} smb_quota_t;
+/*
+ * Part of a quota response
+ * See also: smb_quota_sid_xdr()
+ */
typedef struct smb_quota_sid {
list_node_t qs_list_node;
char qs_sidstr[SMB_SID_STRSZ];
@@ -274,6 +317,10 @@ typedef enum {
SMB_QUOTA_QUERY_ALL
} smb_quota_query_op_t;
+/*
+ * SMB (internal) form of a quota lookup
+ * See also: smb_quota_query_xdr()
+ */
typedef struct smb_quota_query {
char *qq_root_path;
uint32_t qq_query_op; /* smb_quota_query_op_t */
@@ -283,11 +330,19 @@ typedef struct smb_quota_query {
list_t qq_sid_list; /* list of smb_quota_sid_t */
} smb_quota_query_t;
+/*
+ * The get quota response (list of quota records)
+ * See also: smb_quota_response_xdr()
+ */
typedef struct smb_quota_response {
uint32_t qr_status;
list_t qr_quota_list; /* list of smb_quota_t */
} smb_quota_response_t;
+/*
+ * The set quota request (list of quota records)
+ * See also: smb_quota_set_xdr()
+ */
typedef struct smb_quota_set {
char *qs_root_path;
list_t qs_quota_list; /* list of smb_quota_t */