xref: /illumos-gate/usr/src/uts/common/netsmb/smb_dev.h (revision 686670ea)
14bff34e3Sthurlow /*
24bff34e3Sthurlow  * Copyright (c) 2000-2001 Boris Popov
34bff34e3Sthurlow  * All rights reserved.
44bff34e3Sthurlow  *
54bff34e3Sthurlow  * Redistribution and use in source and binary forms, with or without
64bff34e3Sthurlow  * modification, are permitted provided that the following conditions
74bff34e3Sthurlow  * are met:
84bff34e3Sthurlow  * 1. Redistributions of source code must retain the above copyright
94bff34e3Sthurlow  *    notice, this list of conditions and the following disclaimer.
104bff34e3Sthurlow  * 2. Redistributions in binary form must reproduce the above copyright
114bff34e3Sthurlow  *    notice, this list of conditions and the following disclaimer in the
124bff34e3Sthurlow  *    documentation and/or other materials provided with the distribution.
134bff34e3Sthurlow  * 3. All advertising materials mentioning features or use of this software
144bff34e3Sthurlow  *    must display the following acknowledgement:
154bff34e3Sthurlow  *    This product includes software developed by Boris Popov.
164bff34e3Sthurlow  * 4. Neither the name of the author nor the names of any co-contributors
174bff34e3Sthurlow  *    may be used to endorse or promote products derived from this software
184bff34e3Sthurlow  *    without specific prior written permission.
194bff34e3Sthurlow  *
204bff34e3Sthurlow  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
214bff34e3Sthurlow  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
224bff34e3Sthurlow  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
234bff34e3Sthurlow  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
244bff34e3Sthurlow  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
254bff34e3Sthurlow  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
264bff34e3Sthurlow  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
274bff34e3Sthurlow  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
284bff34e3Sthurlow  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
294bff34e3Sthurlow  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
304bff34e3Sthurlow  * SUCH DAMAGE.
314bff34e3Sthurlow  *
324bff34e3Sthurlow  * $Id: smb_dev.h,v 1.10.178.1 2005/05/27 02:35:29 lindak Exp $
334bff34e3Sthurlow  */
344bff34e3Sthurlow 
354bff34e3Sthurlow /*
36613a2f6bSGordon Ross  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
374bff34e3Sthurlow  * Use is subject to license terms.
3840c0e231SGordon Ross  *
3940c0e231SGordon Ross  * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
404bff34e3Sthurlow  */
414bff34e3Sthurlow 
424bff34e3Sthurlow #ifndef _NETSMB_DEV_H_
434bff34e3Sthurlow #define	_NETSMB_DEV_H_
444bff34e3Sthurlow 
454bff34e3Sthurlow /*
464bff34e3Sthurlow  * This file defines an internal ABI for the "nsmb" driver,
474bff34e3Sthurlow  * particularly the various data structures passed to ioctl.
484bff34e3Sthurlow  * In order to avoid some messy 32-bit to 64-bit conversions
494bff34e3Sthurlow  * in the driver, we take pains to define all data structures
504bff34e3Sthurlow  * that pass across the user/kernel boundary in a way that
514bff34e3Sthurlow  * makes them invariant across 32-bit and 64-bit ABIs.
524bff34e3Sthurlow  * This invariance is checked during the driver build
534bff34e3Sthurlow  * using a mechanism similar to genassym.h builds.
544bff34e3Sthurlow  *
554bff34e3Sthurlow  * If you change any of the ioctl data structures in
564bff34e3Sthurlow  * this file, YOU MUST ALSO edit this file:
574bff34e3Sthurlow  *   uts/common/fs/smbclnt/netsmb/offsets.in
584bff34e3Sthurlow  * and then verify the invariance describe above.
594bff34e3Sthurlow  *
604bff34e3Sthurlow  * Also, remember to "bump" NSMB_VER below when
614bff34e3Sthurlow  * any part of this user/kernel I/F changes.
624bff34e3Sthurlow  */
634bff34e3Sthurlow 
644bff34e3Sthurlow #include <sys/types.h>
654bff34e3Sthurlow #include <sys/socket_impl.h>
66613a2f6bSGordon Ross #include <netinet/in.h>
674bff34e3Sthurlow 
684bff34e3Sthurlow #define	NSMB_NAME		"nsmb"
694bff34e3Sthurlow 
704bff34e3Sthurlow /*
714bff34e3Sthurlow  * Update NSMB_VER* if any of the ioctl codes and/or
724bff34e3Sthurlow  * associated structures change in ways that would
734bff34e3Sthurlow  * make them incompatible with an old driver.
744bff34e3Sthurlow  */
7540c0e231SGordon Ross #define	NSMB_VERMAJ	2
7640c0e231SGordon Ross #define	NSMB_VERMIN	0x100
7740c0e231SGordon Ross #define	NSMB_VERSION	((NSMB_VERMAJ << 16) | NSMB_VERMIN)
784bff34e3Sthurlow 
794bff34e3Sthurlow /*
80613a2f6bSGordon Ross  * Some errno values we need to expose to the library.
81613a2f6bSGordon Ross  * NB: these are also defined in the library smbfs_api.h
82613a2f6bSGordon Ross  * to avoid exposing all of this stuff in that API.
83613a2f6bSGordon Ross  *
844bff34e3Sthurlow  * EBADRPC is used for message decoding errors.
854bff34e3Sthurlow  * EAUTH is used for CIFS authentication errors.
864bff34e3Sthurlow  */
874bff34e3Sthurlow #ifndef EBADRPC
8840c0e231SGordon Ross #define	EBADRPC		113
894bff34e3Sthurlow #endif
904bff34e3Sthurlow #ifndef EAUTH
91613a2f6bSGordon Ross #define	EAUTH		114
924bff34e3Sthurlow #endif
934bff34e3Sthurlow 
944bff34e3Sthurlow /*
954bff34e3Sthurlow  * Upper/lower case options
964bff34e3Sthurlow  */
974bff34e3Sthurlow #define	SMB_CS_NONE	0x0000
984bff34e3Sthurlow #define	SMB_CS_UPPER	0x0001	/* convert passed string to upper case */
994bff34e3Sthurlow #define	SMB_CS_LOWER	0x0002	/* convert passed string to lower case */
1004bff34e3Sthurlow 
1014bff34e3Sthurlow /*
1024bff34e3Sthurlow  * access mode stuff (see also smb_lib.h)
1034bff34e3Sthurlow  */
1044bff34e3Sthurlow #define	SMBM_ANY_OWNER		((uid_t)-1)
1054bff34e3Sthurlow #define	SMBM_ANY_GROUP		((gid_t)-1)
1064bff34e3Sthurlow 
1074bff34e3Sthurlow /*
1084bff34e3Sthurlow  * Option flags in smbioc_ossn.ioc_opt
1094bff34e3Sthurlow  * and vcspec.optflags
1104bff34e3Sthurlow  */
1114bff34e3Sthurlow #define	SMBVOPT_CREATE		0x0001	/* create object if necessary */
1124bff34e3Sthurlow #define	SMBVOPT_PRIVATE		0x0002	/* connection should be private */
1134bff34e3Sthurlow #define	SMBVOPT_SINGLESHARE	0x0004	/* keep only one share at this VC */
1144bff34e3Sthurlow #define	SMBVOPT_PERMANENT	0x0010	/* object will keep last reference */
11540c0e231SGordon Ross #define	SMBVOPT_ANONYMOUS	0x0020	/* using a NULL session */
1169c9af259SGordon Ross 
117adee6784SGordon Ross #define	SMBVOPT_SIGNING_ENABLED		0x10000	/* sign if server agrees */
118adee6784SGordon Ross #define	SMBVOPT_SIGNING_REQUIRED	0x20000 /* signing required */
119adee6784SGordon Ross #define	SMBVOPT_SIGNING_MASK		0x30000	/* all signing bits */
120adee6784SGordon Ross 
121adee6784SGordon Ross #define	SMB2_DIALECT_BASE	0x0200
122adee6784SGordon Ross #define	SMB2_DIALECT_0202	0x0202
123adee6784SGordon Ross #define	SMB2_DIALECT_02ff	0x02ff
124adee6784SGordon Ross #define	SMB2_DIALECT_0210	0x0210
125adee6784SGordon Ross #define	SMB2_DIALECT_0300	0x0300
126adee6784SGordon Ross #define	SMB2_DIALECT_0302	0x0302
127adee6784SGordon Ross 
128adee6784SGordon Ross /* Maximum supported dialect (for ssn_maxver) */
129*686670eaSGordon Ross #define	SMB2_DIALECT_MAX	SMB2_DIALECT_0302
1309c9af259SGordon Ross 
1314bff34e3Sthurlow /*
1324bff34e3Sthurlow  * Option flags in smbioc_oshare.ioc_opt
1334bff34e3Sthurlow  * and sharespec.optflags
1344bff34e3Sthurlow  */
1354bff34e3Sthurlow #define	SMBSOPT_CREATE		SMBVOPT_CREATE
1364bff34e3Sthurlow #define	SMBSOPT_PERMANENT	SMBVOPT_PERMANENT
1374bff34e3Sthurlow 
138613a2f6bSGordon Ross /* All user and machine names. */
139613a2f6bSGordon Ross #define	SMBIOC_MAX_NAME		256
140613a2f6bSGordon Ross 
141613a2f6bSGordon Ross /*
142613a2f6bSGordon Ross  * Size of storage for p/w hashes.
143613a2f6bSGordon Ross  * Also for SMBIOC_GETSSNKEY.
144613a2f6bSGordon Ross  */
145613a2f6bSGordon Ross #define	SMBIOC_HASH_SZ	16
146613a2f6bSGordon Ross 
147613a2f6bSGordon Ross /*
148613a2f6bSGordon Ross  * network IO daemon states
149613a2f6bSGordon Ross  */
150613a2f6bSGordon Ross enum smbiod_state {
15140c0e231SGordon Ross 	SMBIOD_ST_UNINIT = 0,	/* uninitialized */
15240c0e231SGordon Ross 	SMBIOD_ST_RECONNECT,	/* a [re]connect attempt requested */
153613a2f6bSGordon Ross 	SMBIOD_ST_RCFAILED,	/* a reconnect attempt has failed */
15440c0e231SGordon Ross 	SMBIOD_ST_CONNECTED,	/* Transport (TCP) connected */
15540c0e231SGordon Ross 	SMBIOD_ST_NEGOTIATED,	/* Negotiated SMB/SMB2+ */
15640c0e231SGordon Ross 	SMBIOD_ST_AUTHCONT,	/* Session setup continuing */
15740c0e231SGordon Ross 	SMBIOD_ST_AUTHFAIL,	/* Session setup failed */
15840c0e231SGordon Ross 	SMBIOD_ST_AUTHOK,	/* Session setup success */
15940c0e231SGordon Ross 	SMBIOD_ST_VCACTIVE,	/* iod_work running */
16040c0e231SGordon Ross 	SMBIOD_ST_IDLE,		/* no trees, will go DEAD */
161613a2f6bSGordon Ross 	SMBIOD_ST_DEAD		/* connection gone, no IOD */
162613a2f6bSGordon Ross };
163613a2f6bSGordon Ross 
1644bff34e3Sthurlow 
1654bff34e3Sthurlow /*
1664bff34e3Sthurlow  * We're now using structures that are invariant
1674bff34e3Sthurlow  * across 32-bit vs 64-bit compilers for all
1684bff34e3Sthurlow  * member sizes and offsets.  Scalar members
1694bff34e3Sthurlow  * simply have to use fixed-size types.
1704bff34e3Sthurlow  * Pointers are a little harder...
1714bff34e3Sthurlow  * We use this union for all pointers that
1724bff34e3Sthurlow  * must pass between user and kernel.
1734bff34e3Sthurlow  */
1744bff34e3Sthurlow typedef union lptr {
1754bff34e3Sthurlow 	uint64_t lp_ll;
1764bff34e3Sthurlow #ifdef _LP64
1774bff34e3Sthurlow 	void	*lp_ptr;
1784bff34e3Sthurlow #endif
1794bff34e3Sthurlow #ifdef _ILP32
1804bff34e3Sthurlow 	void	*_lp_p2[2];
1814bff34e3Sthurlow #ifdef _LITTLE_ENDIAN
1824bff34e3Sthurlow #define	lp_ptr	_lp_p2[0]
1834bff34e3Sthurlow #define	lp_pad	_lp_p2[1]
1844bff34e3Sthurlow #else /* _ENDIAN */
1854bff34e3Sthurlow #define	lp_pad	_lp_p2[0]
1864bff34e3Sthurlow #define	lp_ptr	_lp_p2[1]
1874bff34e3Sthurlow #endif /* _ENDIAN */
1884bff34e3Sthurlow #endif /* _ILP32 */
1894bff34e3Sthurlow } lptr_t;
1904bff34e3Sthurlow 
1914bff34e3Sthurlow /*
1924bff34e3Sthurlow  * Handy union of sockaddr types we use.
1934bff34e3Sthurlow  * Type discriminator is sa_family
1944bff34e3Sthurlow  */
195613a2f6bSGordon Ross union smbioc_sockaddr {
196613a2f6bSGordon Ross 	struct sockaddr sa;	/* generic */
197613a2f6bSGordon Ross 	struct sockaddr_in sin;
198613a2f6bSGordon Ross 	struct sockaddr_in6 sin6;
1994bff34e3Sthurlow };
200613a2f6bSGordon Ross typedef union smbioc_sockaddr smbioc_sockaddr_t;
2014bff34e3Sthurlow 
202613a2f6bSGordon Ross /*
203613a2f6bSGordon Ross  * This is what identifies a session.
204613a2f6bSGordon Ross  */
205613a2f6bSGordon Ross struct smbioc_ssn_ident {
206613a2f6bSGordon Ross 	smbioc_sockaddr_t id_srvaddr;
207613a2f6bSGordon Ross 	char		id_domain[SMBIOC_MAX_NAME];
208613a2f6bSGordon Ross 	char		id_user[SMBIOC_MAX_NAME];
209613a2f6bSGordon Ross };
210613a2f6bSGordon Ross typedef struct smbioc_ssn_ident smbioc_ssn_ident_t;
2114bff34e3Sthurlow 
2124bff34e3Sthurlow /*
213613a2f6bSGordon Ross  * Flags for smbioc_ossn.ssn_opt
2144bff34e3Sthurlow  */
2154bff34e3Sthurlow #define	SMBLK_CREATE		SMBVOPT_CREATE
2164bff34e3Sthurlow 
217613a2f6bSGordon Ross /*
218613a2f6bSGordon Ross  * Structure used with SMBIOC_SSN_FIND, _CREATE
219613a2f6bSGordon Ross  */
2204bff34e3Sthurlow struct smbioc_ossn {
221613a2f6bSGordon Ross 	uint32_t		ssn_owner;	/* Unix owner (UID) */
222adee6784SGordon Ross 	uint32_t		ssn_vopt;	/* i.e. SMBVOPT_CREATE */
223adee6784SGordon Ross 	uint16_t		ssn_minver;	/* Min SMB version. */
224adee6784SGordon Ross 	uint16_t		ssn_maxver;	/* Max SMB version. */
225613a2f6bSGordon Ross 	smbioc_ssn_ident_t	ssn_id;
226613a2f6bSGordon Ross 	char			ssn_srvname[SMBIOC_MAX_NAME];
2274bff34e3Sthurlow };
2284bff34e3Sthurlow typedef struct smbioc_ossn smbioc_ossn_t;
229613a2f6bSGordon Ross /* Convenience names for members under ssn_id */
230613a2f6bSGordon Ross #define	ssn_srvaddr	ssn_id.id_srvaddr
231613a2f6bSGordon Ross #define	ssn_domain	ssn_id.id_domain
232613a2f6bSGordon Ross #define	ssn_user	ssn_id.id_user
2334bff34e3Sthurlow 
234613a2f6bSGordon Ross /*
235613a2f6bSGordon Ross  * Structure used with SMBIOC_TREE_FIND, _CONNECT
236613a2f6bSGordon Ross  */
2374bff34e3Sthurlow struct smbioc_oshare {
238430b4c46SGordon Ross 	uint32_t	sh_use;		/* requested */
239430b4c46SGordon Ross 	uint32_t	sh_type;	/* returned */
240613a2f6bSGordon Ross 	char		sh_name[SMBIOC_MAX_NAME];
241613a2f6bSGordon Ross 	char		sh_pass[SMBIOC_MAX_NAME];
2424bff34e3Sthurlow };
2434bff34e3Sthurlow typedef struct smbioc_oshare smbioc_oshare_t;
2444bff34e3Sthurlow 
245613a2f6bSGordon Ross typedef struct smbioc_tcon {
246613a2f6bSGordon Ross 	int32_t		tc_flags;
247613a2f6bSGordon Ross 	int32_t		tc_opt;
248613a2f6bSGordon Ross 	smbioc_oshare_t	tc_sh;
249613a2f6bSGordon Ross } smbioc_tcon_t;
250613a2f6bSGordon Ross 
251613a2f6bSGordon Ross /*
252613a2f6bSGordon Ross  * This is the operational state information passed
253613a2f6bSGordon Ross  * in and out of the driver for SMBIOC_SSN_WORK
254613a2f6bSGordon Ross  */
255613a2f6bSGordon Ross struct smbioc_ssn_work {
25640c0e231SGordon Ross 	uint32_t	wk_out_state;	/* out-only */
25740c0e231SGordon Ross 	uint32_t	wk_u_ssnkey_len; /* ssn key length */
25840c0e231SGordon Ross 	lptr_t		wk_u_ssnkey_buf; /* user-space ptr! */
25940c0e231SGordon Ross 	uint32_t	wk_u_auth_rlen;	/* recv auth tok len */
26040c0e231SGordon Ross 	uint32_t	wk_u_auth_wlen;	/* send auth tok len */
26140c0e231SGordon Ross 	lptr_t		wk_u_auth_rbuf;	/* recv auth tok buf */
26240c0e231SGordon Ross 	lptr_t		wk_u_auth_wbuf;	/* send auth tok buf */
263adee6784SGordon Ross 	uint8_t		wk_cl_guid[16];	/* client GUID */
264613a2f6bSGordon Ross };
265613a2f6bSGordon Ross typedef struct smbioc_ssn_work smbioc_ssn_work_t;
266613a2f6bSGordon Ross 
267613a2f6bSGordon Ross /*
268613a2f6bSGordon Ross  * User-level SMB requests
269613a2f6bSGordon Ross  */
270613a2f6bSGordon Ross 
2714bff34e3Sthurlow typedef struct smbioc_rw {
2724bff34e3Sthurlow 	uint32_t	ioc_cnt;
273adee6784SGordon Ross 	uint32_t	ioc_flags;
2744bff34e3Sthurlow 	lloff_t	_ioc_offset;
2754bff34e3Sthurlow 	lptr_t	_ioc_base;
2764bff34e3Sthurlow } smbioc_rw_t;
2774bff34e3Sthurlow #define	ioc_offset	_ioc_offset._f
2784bff34e3Sthurlow #define	ioc_base	_ioc_base.lp_ptr
2794bff34e3Sthurlow 
28040c0e231SGordon Ross /* Transact on named pipe (send/recv) */
28140c0e231SGordon Ross typedef struct smbioc_xnp {
28240c0e231SGordon Ross 	uint32_t	ioc_tdlen;	/* transmit len */
28340c0e231SGordon Ross 	uint32_t	ioc_rdlen;	/* recv maxlen */
28440c0e231SGordon Ross 	uint32_t	ioc_more;	/* more data to read */
285adee6784SGordon Ross 	uint32_t	ioc_pad1;
28640c0e231SGordon Ross 	lptr_t		_ioc_tdata;
28740c0e231SGordon Ross 	lptr_t		_ioc_rdata;
28840c0e231SGordon Ross } smbioc_xnp_t;
28940c0e231SGordon Ross #define	ioc_tdata	_ioc_tdata.lp_ptr
29040c0e231SGordon Ross #define	ioc_rdata	_ioc_rdata.lp_ptr
29140c0e231SGordon Ross 
292430b4c46SGordon Ross typedef struct smbioc_ntcreate {
293430b4c46SGordon Ross 	uint32_t	ioc_req_acc;
294430b4c46SGordon Ross 	uint32_t	ioc_efattr;
295430b4c46SGordon Ross 	uint32_t	ioc_share_acc;
296430b4c46SGordon Ross 	uint32_t	ioc_open_disp;
297430b4c46SGordon Ross 	uint32_t	ioc_creat_opts;
298430b4c46SGordon Ross 	char		ioc_name[SMBIOC_MAX_NAME];
299430b4c46SGordon Ross } smbioc_ntcreate_t;
300430b4c46SGordon Ross 
301430b4c46SGordon Ross typedef struct smbioc_printjob {
302430b4c46SGordon Ross 	uint16_t	ioc_setuplen;
303430b4c46SGordon Ross 	uint16_t	ioc_prmode;
304430b4c46SGordon Ross 	char		ioc_title[SMBIOC_MAX_NAME];
305430b4c46SGordon Ross } smbioc_printjob_t;
306430b4c46SGordon Ross 
3074bff34e3Sthurlow /* Password Keychain (PK) support. */
3084bff34e3Sthurlow typedef struct smbioc_pk {
3094bff34e3Sthurlow 	uid_t	pk_uid;				/* UID for PAM use */
310613a2f6bSGordon Ross 	char pk_dom[SMBIOC_MAX_NAME];		/* CIFS domain name */
311613a2f6bSGordon Ross 	char pk_usr[SMBIOC_MAX_NAME];		/* CIFS user name */
312613a2f6bSGordon Ross 	uchar_t pk_lmhash[SMBIOC_HASH_SZ];	/* LanMan p/w hash */
313613a2f6bSGordon Ross 	uchar_t pk_nthash[SMBIOC_HASH_SZ];	/* NTLM p/w hash */
3144bff34e3Sthurlow } smbioc_pk_t;
3154bff34e3Sthurlow 
3164bff34e3Sthurlow 
3174bff34e3Sthurlow /*
3184bff34e3Sthurlow  * Device IOCTLs
3194bff34e3Sthurlow  *
3204bff34e3Sthurlow  * Define ioctl codes the way ZFS does.
3214bff34e3Sthurlow  * The "base" value is arbitrary, and can
3224bff34e3Sthurlow  * occupy the high word if we like, because
3234bff34e3Sthurlow  * our driver does its own copyin/copyout.
3244bff34e3Sthurlow  * Keep GETVERS first and use it to verify
3254bff34e3Sthurlow  * driver compatibility with the library.
3264bff34e3Sthurlow  */
32740c0e231SGordon Ross #define	SMBIOC_BASE	((('n' << 8) | 's') << 8)
3284bff34e3Sthurlow typedef enum nsmb_ioc {
329613a2f6bSGordon Ross 	SMBIOC_GETVERS = SMBIOC_BASE,	/* keep first */
33040c0e231SGordon Ross 	SMBIOC_FLAGS2,		/* obsolete */
331613a2f6bSGordon Ross 	SMBIOC_GETSSNKEY,	/* get SMB session key */
332430b4c46SGordon Ross 	SMBIOC_DUP_DEV,		/* duplicate dev handle */
333613a2f6bSGordon Ross 
334613a2f6bSGordon Ross 	SMBIOC_READ,		/* read (pipe) */
335613a2f6bSGordon Ross 	SMBIOC_WRITE,		/* write (pipe) */
33640c0e231SGordon Ross 	SMBIOC_XACTNP,		/* "transact" (pipe) */
337430b4c46SGordon Ross 	SMBIOC_NTCREATE,	/* open or create */
338430b4c46SGordon Ross 	SMBIOC_PRINTJOB,	/* open print job */
339430b4c46SGordon Ross 	SMBIOC_CLOSEFH,		/* from ntcreate or printjob */
340613a2f6bSGordon Ross 
341613a2f6bSGordon Ross 	SMBIOC_SSN_CREATE,
342613a2f6bSGordon Ross 	SMBIOC_SSN_FIND,
343613a2f6bSGordon Ross 	SMBIOC_SSN_KILL,	/* force disconnect */
344613a2f6bSGordon Ross 	SMBIOC_SSN_RELE,	/* drop our reference */
345613a2f6bSGordon Ross 
346613a2f6bSGordon Ross 	SMBIOC_TREE_CONNECT,	/* create and connect */
347613a2f6bSGordon Ross 	SMBIOC_TREE_FIND,
348613a2f6bSGordon Ross 	SMBIOC_TREE_KILL,
349613a2f6bSGordon Ross 	SMBIOC_TREE_RELE,
350613a2f6bSGordon Ross 
35140c0e231SGordon Ross 	SMBIOC_IOD_CONNECT,	/* Setup connection */
35240c0e231SGordon Ross 	SMBIOC_IOD_NEGOTIATE,	/* SMB/SMB2 negotiate */
35340c0e231SGordon Ross 	SMBIOC_IOD_SSNSETUP,	/* SMB/SMB2 session setup */
354613a2f6bSGordon Ross 	SMBIOC_IOD_WORK,	/* work on session requests */
355613a2f6bSGordon Ross 	SMBIOC_IOD_IDLE,	/* wait for requests on this session */
35640c0e231SGordon Ross 	SMBIOC_IOD_RCFAIL,	/* tell driver reconnect failed */
357613a2f6bSGordon Ross 
3584bff34e3Sthurlow 	/* Password Keychain (PK) support. */
3594bff34e3Sthurlow 	SMBIOC_PK_ADD,    /* Add/Modify a password entry */
3604bff34e3Sthurlow 	SMBIOC_PK_CHK,    /* Check for a password entry */
3614bff34e3Sthurlow 	SMBIOC_PK_DEL,    /* Delete specified password entry */
3624bff34e3Sthurlow 	SMBIOC_PK_DEL_OWNER,	/* all owned by the caller */
3634bff34e3Sthurlow 	SMBIOC_PK_DEL_EVERYONE	/* all owned by everyone */
3644bff34e3Sthurlow } nsmb_ioc_t;
3654bff34e3Sthurlow 
3664bff34e3Sthurlow #endif /* _NETSMB_DEV_H_ */
367