smb_dev.h (217174) | smb_dev.h (250236) |
---|---|
1/*- 2 * Copyright (c) 2000-2001 Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2000-2001 Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/netsmb/smb_dev.h 217174 2011-01-08 23:06:54Z csjp $ | 26 * $FreeBSD: head/sys/netsmb/smb_dev.h 250236 2013-05-04 14:03:18Z davide $ |
27 */ 28#ifndef _NETSMB_DEV_H_ 29#define _NETSMB_DEV_H_ 30 31#ifndef _KERNEL 32#include <sys/types.h> 33#endif 34#include <sys/ioccom.h> --- 115 unchanged lines hidden (view full) --- 150 151#ifdef _KERNEL 152 153#define SMBST_CONNECTED 1 154 155STAILQ_HEAD(smbrqh, smb_rq); 156 157struct smb_dev { | 27 */ 28#ifndef _NETSMB_DEV_H_ 29#define _NETSMB_DEV_H_ 30 31#ifndef _KERNEL 32#include <sys/types.h> 33#endif 34#include <sys/ioccom.h> --- 115 unchanged lines hidden (view full) --- 150 151#ifdef _KERNEL 152 153#define SMBST_CONNECTED 1 154 155STAILQ_HEAD(smbrqh, smb_rq); 156 157struct smb_dev { |
158 struct cdev * dev; |
|
158 int sd_opened; 159 int sd_level; 160 struct smb_vc * sd_vc; /* reference to VC */ 161 struct smb_share *sd_share; /* reference to share if any */ 162 int sd_poll; 163 int sd_seq; | 159 int sd_opened; 160 int sd_level; 161 struct smb_vc * sd_vc; /* reference to VC */ 162 struct smb_share *sd_share; /* reference to share if any */ 163 int sd_poll; 164 int sd_seq; |
164/* struct ifqueue sd_rdqueue; 165 struct ifqueue sd_wrqueue; 166 struct selinfo sd_pollinfo; 167 struct smbrqh sd_rqlist; 168 struct smbrqh sd_rplist; 169 struct ucred *sd_owner;*/ | |
170 int sd_flags; | 165 int sd_flags; |
166 int refcount; 167 int usecount; |
|
171}; 172 | 168}; 169 |
170extern struct sx smb_lock; 171#define SMB_LOCK() sx_xlock(&smb_lock) 172#define SMB_UNLOCK() sx_unlock(&smb_lock) 173#define SMB_LOCKASSERT() sx_assert(&smb_lock, SA_XLOCKED) 174 |
|
173struct smb_cred; | 175struct smb_cred; |
176 177void sdp_dtor(void *arg); 178void sdp_trydestroy(struct smb_dev *dev); 179 |
|
174/* 175 * Compound user interface 176 */ 177int smb_usr_lookup(struct smbioc_lookup *dp, struct smb_cred *scred, 178 struct smb_vc **vcpp, struct smb_share **sspp); 179int smb_usr_opensession(struct smbioc_ossn *data, 180 struct smb_cred *scred, struct smb_vc **vcpp); 181int smb_usr_openshare(struct smb_vc *vcp, struct smbioc_oshare *data, 182 struct smb_cred *scred, struct smb_share **sspp); 183int smb_usr_simplerequest(struct smb_share *ssp, struct smbioc_rq *data, 184 struct smb_cred *scred); 185int smb_usr_t2request(struct smb_share *ssp, struct smbioc_t2rq *data, 186 struct smb_cred *scred); 187int smb_dev2share(int fd, int mode, struct smb_cred *scred, | 180/* 181 * Compound user interface 182 */ 183int smb_usr_lookup(struct smbioc_lookup *dp, struct smb_cred *scred, 184 struct smb_vc **vcpp, struct smb_share **sspp); 185int smb_usr_opensession(struct smbioc_ossn *data, 186 struct smb_cred *scred, struct smb_vc **vcpp); 187int smb_usr_openshare(struct smb_vc *vcp, struct smbioc_oshare *data, 188 struct smb_cred *scred, struct smb_share **sspp); 189int smb_usr_simplerequest(struct smb_share *ssp, struct smbioc_rq *data, 190 struct smb_cred *scred); 191int smb_usr_t2request(struct smb_share *ssp, struct smbioc_t2rq *data, 192 struct smb_cred *scred); 193int smb_dev2share(int fd, int mode, struct smb_cred *scred, |
188 struct smb_share **sspp); | 194 struct smb_share **sspp, struct smb_dev **ssdp); |
189 190 191#endif /* _KERNEL */ 192 193#endif /* _NETSMB_DEV_H_ */ | 195 196 197#endif /* _KERNEL */ 198 199#endif /* _NETSMB_DEV_H_ */ |