From a90cf9f29973990687fa61de9f1f6ea22e924e40 Mon Sep 17 00:00:00 2001 From: Gordon Ross Date: Wed, 26 Jun 2013 16:05:44 -0400 Subject: 6399 SMB2 support Portions contributed by: Alek Pinchuk Portions contributed by: Kevin Crowe Portions contributed by: Matt Barden Reviewed by: Alek Pinchuk Reviewed by: Bayard Bell Reviewed by: Dan Fields Reviewed by: Daniel Borek Reviewed by: Gordon Ross Reviewed by: Kevin Crowe Reviewed by: Matt Barden Reviewed by: Yuri Pankov Approved by: Garrett D'Amore --- usr/src/uts/common/smbsrv/smb_xdr.h | 57 ++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) (limited to 'usr/src/uts/common/smbsrv/smb_xdr.h') 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 /* 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 */ -- cgit v1.2.3