Mercurial > illumos > illumos-gate
comparison usr/src/uts/common/fs/smbclnt/netsmb/smb_conn.h @ 13394:96340372b72d
1120 Use real file descriptors for smbfs named pipes.
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Garrett D'Amore <garrett@nexenta.com>
author | Gordon Ross <gwr@nexenta.com> |
---|---|
date | Thu, 30 Jun 2011 17:58:05 -0400 |
parents | ed3411181494 |
children | 35e2d64a5cf6 |
comparison
equal
deleted
inserted
replaced
13393:a055831123f1 | 13394:96340372b72d |
---|---|
31 * | 31 * |
32 * $Id: smb_conn.h,v 1.32.42.1 2005/05/27 02:35:29 lindak Exp $ | 32 * $Id: smb_conn.h,v 1.32.42.1 2005/05/27 02:35:29 lindak Exp $ |
33 */ | 33 */ |
34 | 34 |
35 /* | 35 /* |
36 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. | |
36 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. | 37 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
37 * Use is subject to license terms. | 38 * Use is subject to license terms. |
38 */ | 39 */ |
39 | 40 |
40 #ifndef _SMB_CONN_H | 41 #ifndef _SMB_CONN_H |
234 } smb_share_t; | 235 } smb_share_t; |
235 | 236 |
236 #define ss_lock ss_co.co_lock | 237 #define ss_lock ss_co.co_lock |
237 #define ss_flags ss_co.co_flags | 238 #define ss_flags ss_co.co_flags |
238 | 239 |
240 #define ss_use ss_ioc.sh_use | |
241 #define ss_type ss_ioc.sh_type | |
239 #define ss_name ss_ioc.sh_name | 242 #define ss_name ss_ioc.sh_name |
240 #define ss_pwlen ss_ioc.sh_pwlen | |
241 #define ss_pass ss_ioc.sh_pass | 243 #define ss_pass ss_ioc.sh_pass |
242 #define ss_type_req ss_ioc.sh_type_req | |
243 #define ss_type_ret ss_ioc.sh_type_ret | |
244 | 244 |
245 #define SMB_SS_LOCK(ssp) mutex_enter(&(ssp)->ss_lock) | 245 #define SMB_SS_LOCK(ssp) mutex_enter(&(ssp)->ss_lock) |
246 #define SMB_SS_UNLOCK(ssp) mutex_exit(&(ssp)->ss_lock) | 246 #define SMB_SS_UNLOCK(ssp) mutex_exit(&(ssp)->ss_lock) |
247 | 247 |
248 #define CPTOVC(cp) ((struct smb_vc *)((void *)(cp))) | 248 #define CPTOVC(cp) ((struct smb_vc *)((void *)(cp))) |
273 /* | 273 /* |
274 * The driver per open instance object. | 274 * The driver per open instance object. |
275 * Mostly used in: smb_dev.c, smb_usr.c | 275 * Mostly used in: smb_dev.c, smb_usr.c |
276 */ | 276 */ |
277 typedef struct smb_dev { | 277 typedef struct smb_dev { |
278 int sd_opened; /* Opened or not */ | 278 dev_info_t *sd_dip; /* ptr to dev_info node */ |
279 int sd_level; /* Future use */ | 279 struct cred *sd_cred; /* per dev credentails */ |
280 struct smb_vc *sd_vc; /* Reference to VC */ | 280 struct smb_vc *sd_vc; /* Reference to VC */ |
281 struct smb_share *sd_share; /* Reference to share if any */ | 281 struct smb_share *sd_share; /* Reference to share if any */ |
282 int sd_level; /* SMBL_VC, ... */ | |
282 int sd_vcgenid; /* Generation of share or VC */ | 283 int sd_vcgenid; /* Generation of share or VC */ |
283 int sd_poll; /* Future use */ | 284 int sd_poll; /* Future use */ |
284 int sd_seq; /* Kind of minor number/instance no */ | 285 int sd_seq; /* Kind of minor number/instance no */ |
285 int sd_flags; /* State of connection */ | 286 int sd_flags; /* State of connection */ |
286 #define NSMBFL_OPEN 0x0001 | 287 #define NSMBFL_OPEN 0x0001 |
287 #define NSMBFL_IOD 0x0002 | 288 #define NSMBFL_IOD 0x0002 |
289 int sd_smbfid; /* library read/write */ | |
288 zoneid_t zoneid; /* Zone id */ | 290 zoneid_t zoneid; /* Zone id */ |
289 dev_info_t *smb_dip; /* ptr to dev_info node */ | |
290 void *sd_devfs; /* Dont know how to use this. but */ | |
291 struct cred *smb_cred; /* per dev credentails. Future use */ | |
292 } smb_dev_t; | 291 } smb_dev_t; |
293 | 292 |
294 extern const uint32_t nsmb_version; | 293 extern const uint32_t nsmb_version; |
295 | 294 |
296 /* | 295 /* |
302 /* | 301 /* |
303 * smb_usr.c | 302 * smb_usr.c |
304 */ | 303 */ |
305 int smb_usr_get_flags2(smb_dev_t *sdp, intptr_t arg, int flags); | 304 int smb_usr_get_flags2(smb_dev_t *sdp, intptr_t arg, int flags); |
306 int smb_usr_get_ssnkey(smb_dev_t *sdp, intptr_t arg, int flags); | 305 int smb_usr_get_ssnkey(smb_dev_t *sdp, intptr_t arg, int flags); |
306 int smb_usr_dup_dev(smb_dev_t *sdp, intptr_t arg, int flags); | |
307 | 307 |
308 int smb_usr_simplerq(smb_dev_t *sdp, intptr_t arg, int flags, cred_t *cr); | 308 int smb_usr_simplerq(smb_dev_t *sdp, intptr_t arg, int flags, cred_t *cr); |
309 int smb_usr_t2request(smb_dev_t *sdp, intptr_t arg, int flags, cred_t *cr); | 309 int smb_usr_t2request(smb_dev_t *sdp, intptr_t arg, int flags, cred_t *cr); |
310 | |
311 int smb_usr_closefh(smb_dev_t *, cred_t *); | |
310 int smb_usr_rw(smb_dev_t *sdp, int cmd, intptr_t arg, int flags, cred_t *cr); | 312 int smb_usr_rw(smb_dev_t *sdp, int cmd, intptr_t arg, int flags, cred_t *cr); |
313 int smb_usr_ntcreate(smb_dev_t *, intptr_t, int, cred_t *); | |
314 int smb_usr_printjob(smb_dev_t *, intptr_t, int, cred_t *); | |
311 | 315 |
312 int smb_usr_get_ssn(smb_dev_t *, int, intptr_t, int, cred_t *); | 316 int smb_usr_get_ssn(smb_dev_t *, int, intptr_t, int, cred_t *); |
313 int smb_usr_drop_ssn(smb_dev_t *sdp, int cmd); | 317 int smb_usr_drop_ssn(smb_dev_t *sdp, int cmd); |
314 | 318 |
315 int smb_usr_get_tree(smb_dev_t *, int, intptr_t, int, cred_t *); | 319 int smb_usr_get_tree(smb_dev_t *, int, intptr_t, int, cred_t *); |
376 void smb_share_kill(smb_share_t *ssp); | 380 void smb_share_kill(smb_share_t *ssp); |
377 | 381 |
378 void smb_share_invalidate(smb_share_t *ssp); | 382 void smb_share_invalidate(smb_share_t *ssp); |
379 int smb_share_tcon(smb_share_t *, smb_cred_t *); | 383 int smb_share_tcon(smb_share_t *, smb_cred_t *); |
380 | 384 |
381 /* | |
382 * SMB protocol level functions | |
383 */ | |
384 int smb_smb_echo(smb_vc_t *vcp, smb_cred_t *scred, int timo); | |
385 int smb_smb_treeconnect(smb_share_t *ssp, smb_cred_t *scred); | |
386 int smb_smb_treedisconnect(smb_share_t *ssp, smb_cred_t *scred); | |
387 | |
388 int smb_rwuio(smb_share_t *ssp, uint16_t fid, uio_rw_t rw, | |
389 uio_t *uiop, smb_cred_t *scred, int timo); | |
390 | |
391 #endif /* _SMB_CONN_H */ | 385 #endif /* _SMB_CONN_H */ |