libsmbfs.h revision 2
4c0f084e476c05989eb702c500a763ef09ba044ejeff.schenk * CDDL HEADER START
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * The contents of this file are subject to the terms of the
6e153e9671eb382c49354ab856404a71477cce58jeff.schenk * Common Development and Distribution License (the "License").
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * You may not use this file except in compliance with the License.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * See the License for the specific language governing permissions
6e153e9671eb382c49354ab856404a71477cce58jeff.schenk * and limitations under the License.
6e153e9671eb382c49354ab856404a71477cce58jeff.schenk * When distributing Covered Code, include this CDDL HEADER in each
6e153e9671eb382c49354ab856404a71477cce58jeff.schenk * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6e153e9671eb382c49354ab856404a71477cce58jeff.schenk * If applicable, add the following below this CDDL HEADER, with the
6e153e9671eb382c49354ab856404a71477cce58jeff.schenk * fields enclosed by brackets "[]" replaced with your own identifying
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * information: Portions Copyright [yyyy] [name of copyright owner]
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * CDDL HEADER END
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Defines the API exported to smbfs commands and to the
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * MS-style RPC-over-named-pipes library (libndr).
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Some errno values we need to expose in this API.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * NB: These two defines are duplicated from the
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * driver smb_dev.h to avoid exposing that here.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * EBADRPC is used for message decoding errors.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * EAUTH is used for CIFS authentication errors.
6e153e9671eb382c49354ab856404a71477cce58jeff.schenk * Share type values for smb_ctx_new, _init
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Based on NetUseAdd() USE_INFO_[12] _asg_type values
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * They also happen to match: STYPE_DISKTREE, etc.
fb98811412f1a61efdc30b38091bf4708148a806Allan Fostertypedef enum {
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Parse "level" spec. for smb_ctx_parseunc()
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * i.e. whether we require a share name, etc.
fb98811412f1a61efdc30b38091bf4708148a806Allan Fostertypedef enum {
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Authentication type flags
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * See: smb_ctx_setauthflags()
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster#define SMB_AT_ANON 1 /* anonymous (NULL session) */
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster#define SMB_AT_DEFAULT (SMB_AT_KRB5 | SMB_AT_NTLM2 | SMB_AT_NTLM1)
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster * Value of the ct_rflags, used to determine the context of request.
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster#define SMBFS_STANDALONE 0x00000000 /* Client standalone request */
fb98811412f1a61efdc30b38091bf4708148a806Allan Foster#define SMBFS_OUTBOUNDDC 0x00000001 /* SMB server request */
fb98811412f1a61efdc30b38091bf4708148a806Allan Fosterstruct smb_ctx; /* anonymous here; real one in smb_lib.h */
extern int smbfs_debug;
int smbfs_lib_init(void);
void smbfs_error(const char *, int, ...);
int smbfs_ctx_parsedomuser(char *, char **, char **);
typedef struct smbfs_fh_ctx {
char *sf_realm;
int smbfs_fh_close(int);
int smbfs_fh_xactnp(int, int, const char *,
int smbfs_print(const char *, const char *, const char *);
void smbfs_set_default_domain(const char *);
void smbfs_set_default_user(const char *);
char *smbfs_strerror(int);
* Real decl. in: common/smbclnt/smbfs_ntacl.h
struct i_ntsd;
struct __FILE;
* These are duplicated from common/smbclnt/smbfs_ntacl.h
#define SMB_KEYCHAIN_SUCCESS 0
int smbfs_keychain_del_everyone(void);
#ifdef __cplusplus