4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Copyright (c) 2000-2001 Boris Popov
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * All rights reserved.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Redistribution and use in source and binary forms, with or without
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * modification, are permitted provided that the following conditions
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * 1. Redistributions of source code must retain the above copyright
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * notice, this list of conditions and the following disclaimer.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * 2. Redistributions in binary form must reproduce the above copyright
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * notice, this list of conditions and the following disclaimer in the
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * documentation and/or other materials provided with the distribution.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * 3. All advertising materials mentioning features or use of this software
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * must display the following acknowledgement:
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * This product includes software developed by Boris Popov.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * 4. Neither the name of the author nor the names of any co-contributors
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * may be used to endorse or promote products derived from this software
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * without specific prior written permission.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * SUCH DAMAGE.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * $Id: smb_lib.h,v 1.21.82.2 2005/06/02 00:55:39 lindak Exp $
a547be5daca7e465ca82df6d179f6b1f8e0cda72Gordon Ross * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
85e6b6747d07050e01ec91acef2453655821f9abGordon Ross * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Internal interface exported to our commands in:
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Rossextern const char smbutil_std_opts[];
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * bits to indicate the source of error
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Size of all LM/NTLM hashes (16 bytes).
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * The driver needs to know this, so it's
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * This is what goes across the door call to the IOD
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * when asking for a new connection.
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross /* Kerberos cred. cache res. name? */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * SMB work context. Used to store all values which are necessary
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * to establish connection to an SMB server.
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross char *ct_fullserver; /* orig. server name from cmd line */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross char *ct_srvaddr_s; /* hostname or IP address of server */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross struct addrinfo *ct_addrinfo; /* IP addresses of the server */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross /* smbioc_oshare_t ct_sh; XXX */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross /* Connection setup SMB stuff. */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross /* Strings from the SMB negotiate response. */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross /* NTLM auth. stuff */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Short-hand for some of the substruct fields above
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross#define ct_srvaddr ct_iod_ssn.iod_ossn.ssn_srvaddr
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross#define ct_srvname ct_iod_ssn.iod_ossn.ssn_srvname
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross#define ct_mackey ct_work.wk_iods.is_u_mackey.lp_ptr
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Bits in smb_ctx_t.ct_flags
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_NOPWD 0x0001 /* don't ask for a password */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_SRIGHTS 0x0002 /* share access rights supplied */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_CMD_DOM 0x0010 /* CMD specified domain */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_CMD_USR 0x0020 /* CMD specified user */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_CMD_PW 0x0040 /* CMD specified password */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_RESOLVED 0x8000 /* structure has been verified */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_KCBAD 0x00080000 /* keychain password failed */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_KCFOUND 0x00100000 /* password is from keychain */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_BROWSEOK 0x00200000 /* browser dialogue may be used */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_AUTHREQ 0x00400000 /* auth. dialog requested */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_KCSAVE 0x00800000 /* add to keychain requested */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_XXX 0x01000000 /* mount-all, a very bad thing */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_SSNACTIVE 0x02000000 /* session setup succeeded */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBCF_KCDOMAIN 0x04000000 /* use domain in KC lookup */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Context management
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * I/O daemon stuff
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Other stuff
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint nls_setrecode(const char *, const char *);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint nls_setlocale(const char *);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowchar *nls_str_toext(char *, const char *);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowchar *nls_str_toloc(char *, const char *);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowvoid *nls_mem_toext(void *, const void *, int);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowvoid *nls_mem_toloc(void *, const void *, int);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowchar *nls_str_upper(char *, const char *);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowchar *nls_str_lower(char *, const char *);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#endif /* _NETSMB_SMB_LIB_H_ */