Print this page
12513 SMB 3.1.1 support for server
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/smbsrv/smb2_kproto.h
+++ new/usr/src/uts/common/smbsrv/smb2_kproto.h
1 1 /*
2 2 * This file and its contents are supplied under the terms of the
3 3 * Common Development and Distribution License ("CDDL"), version 1.0.
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
4 4 * You may only use this file in accordance with the terms of version
5 5 * 1.0 of the CDDL.
6 6 *
7 7 * A full copy of the text of the CDDL should have accompanied this
8 8 * source. A copy of the CDDL is also available via the Internet at
9 9 * http://www.illumos.org/license/CDDL.
10 10 */
11 11
12 12 /*
13 13 * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
14 + * Copyright 2020 RackTop Systems, Inc.
14 15 */
15 16
16 17 #ifndef _SMB2_KPROTO_H_
17 18 #define _SMB2_KPROTO_H_
18 19
19 20 #include <smbsrv/smb_kproto.h>
20 21 #include <smbsrv/smb2.h>
21 22
22 23 #ifdef __cplusplus
23 24 extern "C" {
24 25 #endif
25 26
26 27 extern uint32_t smb2_tcp_rcvbuf;
27 28 extern uint32_t smb2_max_rwsize;
28 29 extern uint32_t smb2_max_trans;
29 30
30 31 extern int smb2_aapl_use_file_ids;
31 32 extern uint32_t smb2_dh_def_timeout;
32 33 extern uint32_t smb2_dh_max_timeout;
33 34 extern uint32_t smb2_res_def_timeout;
34 35 extern uint32_t smb2_res_max_timeout;
35 36 extern uint32_t smb2_persist_timeout;
36 37 extern int smb2_enable_dh;
37 38
38 39 #define SMB3_CLIENT_ENCRYPTS(sr) \
39 40 ((sr->session->capabilities & SMB2_CAP_ENCRYPTION) != 0)
40 41
41 42 void smb2_dispatch_stats_init(smb_server_t *);
42 43 void smb2_dispatch_stats_fini(smb_server_t *);
43 44 void smb2_dispatch_stats_update(smb_server_t *,
44 45 smb_kstat_req_t *, int, int);
45 46
46 47 int smb2sr_newrq(smb_request_t *);
47 48 void smb2sr_work(smb_request_t *);
48 49 uint32_t smb2sr_go_async(smb_request_t *);
49 50 void smb2sr_append_postwork(smb_request_t *, smb_request_t *);
50 51
51 52 int smb2_decode_header(smb_request_t *);
52 53 int smb2_encode_header(smb_request_t *, boolean_t);
53 54 int smb3_decode_tform_header(smb_request_t *);
54 55 int smb3_encode_tform_header(smb_request_t *, struct mbuf_chain *mbc);
55 56
↓ open down ↓ |
32 lines elided |
↑ open up ↑ |
56 57 void smb2_send_reply(smb_request_t *);
57 58 void smb2sr_put_error(smb_request_t *, uint32_t);
58 59 void smb2sr_put_error_data(smb_request_t *, uint32_t, mbuf_chain_t *);
59 60 void smb2sr_put_errno(struct smb_request *, int);
60 61 uint32_t smb2sr_lookup_fid(smb_request_t *, smb2fid_t *);
61 62
62 63 /* SMB2 signing routines - smb2_signing.c */
63 64 int smb2_sign_check_request(smb_request_t *);
64 65 void smb2_sign_reply(smb_request_t *);
65 66 void smb2_sign_init_mech(smb_session_t *);
67 +void smb31_preauth_init_mech(smb_session_t *);
68 +void smb31_preauth_fini(smb_session_t *s);
69 +int smb31_preauth_sha512_calc(smb_request_t *, struct mbuf_chain *,
70 + uint8_t *);
66 71
67 72 int smb3_encrypt_sr(smb_request_t *, struct mbuf_chain *, struct mbuf_chain *);
68 73 int smb3_decrypt_sr(smb_request_t *);
69 74 int smb3_encrypt_init_mech(smb_session_t *s);
70 75
71 76 uint32_t smb2_fsctl_fs(smb_request_t *, smb_fsctl_t *);
72 77 uint32_t smb2_fsctl_netfs(smb_request_t *, smb_fsctl_t *);
73 78 uint32_t smb2_fsctl_copychunk(smb_request_t *, smb_fsctl_t *);
74 79 uint32_t smb2_fsctl_odx_read(smb_request_t *, smb_fsctl_t *);
75 80 uint32_t smb2_fsctl_odx_write(smb_request_t *, smb_fsctl_t *);
76 81 uint32_t smb2_fsctl_set_resilient(smb_request_t *, smb_fsctl_t *);
77 82
78 83 /* smb2_fsctl_sparse.c */
79 84 uint32_t smb2_fsctl_set_sparse(smb_request_t *, smb_fsctl_t *);
80 85 uint32_t smb2_fsctl_set_zero_data(smb_request_t *, smb_fsctl_t *);
81 86 uint32_t smb2_fsctl_query_alloc_ranges(smb_request_t *, smb_fsctl_t *);
82 87 uint32_t smb2_fsctl_query_file_regions(smb_request_t *, smb_fsctl_t *);
83 88 uint32_t smb2_sparse_copy(smb_request_t *sr,
84 89 smb_ofile_t *src_ofile, smb_ofile_t *dst_ofile,
85 90 off64_t src_off, off64_t dst_off, uint32_t *residp,
86 91 void *buffer, size_t bufsize);
87 92
88 93 uint32_t smb2_nego_validate(smb_request_t *, smb_fsctl_t *);
89 94
90 95 smb_sdrc_t smb2_negotiate(smb_request_t *);
91 96 smb_sdrc_t smb2_session_setup(smb_request_t *);
92 97 smb_sdrc_t smb2_logoff(smb_request_t *);
93 98 smb_sdrc_t smb2_tree_connect(smb_request_t *);
94 99 smb_sdrc_t smb2_tree_disconn(smb_request_t *);
95 100 smb_sdrc_t smb2_create(smb_request_t *);
96 101 smb_sdrc_t smb2_close(smb_request_t *);
97 102 smb_sdrc_t smb2_flush(smb_request_t *);
98 103 smb_sdrc_t smb2_read(smb_request_t *);
99 104 smb_sdrc_t smb2_write(smb_request_t *);
100 105 smb_sdrc_t smb2_lock(smb_request_t *);
101 106 smb_sdrc_t smb2_ioctl(smb_request_t *);
102 107 smb_sdrc_t smb2_cancel(smb_request_t *);
103 108 smb_sdrc_t smb2_echo(smb_request_t *);
104 109 smb_sdrc_t smb2_query_dir(smb_request_t *);
105 110 smb_sdrc_t smb2_change_notify(smb_request_t *);
106 111 smb_sdrc_t smb2_query_info(smb_request_t *);
107 112 smb_sdrc_t smb2_set_info(smb_request_t *);
108 113 smb_sdrc_t smb2_oplock_break_ack(smb_request_t *);
109 114 smb_sdrc_t smb2_lease_break_ack(smb_request_t *);
110 115
111 116 int smb2_newrq_negotiate(smb_request_t *);
112 117 int smb2_newrq_cancel(smb_request_t *);
113 118
114 119 uint32_t smb2_aapl_crctx(smb_request_t *,
115 120 mbuf_chain_t *, mbuf_chain_t *);
116 121
117 122 uint32_t smb2_ofile_getattr(smb_request_t *, smb_ofile_t *, smb_attr_t *);
118 123 uint32_t smb2_ofile_getstd(smb_ofile_t *, smb_queryinfo_t *);
119 124 uint32_t smb2_ofile_getname(smb_ofile_t *, smb_queryinfo_t *);
120 125
121 126 uint32_t smb2_qinfo_file(smb_request_t *, smb_queryinfo_t *);
122 127 uint32_t smb2_qinfo_fs(smb_request_t *, smb_queryinfo_t *);
123 128 uint32_t smb2_qinfo_sec(smb_request_t *, smb_queryinfo_t *);
124 129 uint32_t smb2_qinfo_quota(smb_request_t *, smb_queryinfo_t *);
125 130 uint32_t smb2_qinfo_stream(smb_request_t *, smb_queryinfo_t *);
126 131
127 132 uint32_t smb2_setinfo_file(smb_request_t *, smb_setinfo_t *, int);
128 133 uint32_t smb2_setinfo_fs(smb_request_t *, smb_setinfo_t *, int);
129 134 uint32_t smb2_setinfo_sec(smb_request_t *, smb_setinfo_t *, uint32_t);
130 135 uint32_t smb2_setinfo_quota(smb_request_t *, smb_setinfo_t *);
131 136
132 137 void smb2_oplock_acquire(smb_request_t *sr);
133 138 void smb2_oplock_reconnect(smb_request_t *sr);
134 139 void smb2_lease_acquire(smb_request_t *sr);
135 140 uint32_t smb2_lease_create(smb_request_t *sr, uint8_t *);
136 141 void smb2_lease_rele(smb_lease_t *);
137 142 void smb2_lease_init(void);
138 143 void smb2_lease_fini(void);
139 144 void smb2_lease_ofile_close(smb_ofile_t *);
140 145
141 146 void smb2_durable_timers(smb_server_t *);
142 147
143 148 uint32_t smb2_dh_reconnect(smb_request_t *);
144 149 boolean_t smb_dh_should_save(smb_ofile_t *);
145 150 extern void smb2_dh_shutdown(smb_server_t *);
146 151 int smb2_dh_new_ca_share(smb_server_t *, smb_kshare_t *);
147 152 void smb2_dh_close_persistent(smb_ofile_t *);
148 153 void smb2_dh_close_my_orphans(smb_request_t *, smb_ofile_t *);
149 154 int smb2_dh_make_persistent(smb_request_t *, smb_ofile_t *);
150 155 void smb2_dh_setdoc_persistent(smb_ofile_t *);
151 156 void smb2_dh_update_nvfile(smb_request_t *);
152 157 void smb2_dh_update_oplock(smb_request_t *, smb_ofile_t *);
153 158 void smb2_dh_update_locks(smb_request_t *, smb_ofile_t *);
154 159 void smb2_dh_update_times(smb_request_t *, smb_ofile_t *, smb_attr_t *);
155 160
156 161 #ifdef __cplusplus
157 162 }
158 163 #endif
159 164
160 165 #endif /* _SMB2_KPROTO_H_ */
↓ open down ↓ |
85 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX