smb_dev.h (9b4fcf851a73554063d4a2de9a4f10cd23a0a4f6) | smb_dev.h (92a4d9bcc8361aabe232a0d731002564c6809bbd) |
---|---|
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 --- 141 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 { | 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 --- 141 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_ */ |