smb_conn.h revision 9c9af2590af49bb395bc8d2eace0f2d4ea16d165
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * Copyright (c) 2000-2001 Boris Popov
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * All rights reserved.
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * Redistribution and use in source and binary forms, with or without
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * modification, are permitted provided that the following conditions
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * 1. Redistributions of source code must retain the above copyright
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * notice, this list of conditions and the following disclaimer.
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * 2. Redistributions in binary form must reproduce the above copyright
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * notice, this list of conditions and the following disclaimer in the
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * documentation and/or other materials provided with the distribution.
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * 3. All advertising materials mentioning features or use of this software
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * must display the following acknowledgement:
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * This product includes software developed by Boris Popov.
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * 4. Neither the name of the author nor the names of any co-contributors
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * may be used to endorse or promote products derived from this software
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * without specific prior written permission.
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * SUCH DAMAGE.
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * $Id: smb_conn.h,v 1.32.42.1 2005/05/27 02:35:29 lindak Exp $
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * Use is subject to license terms.
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * Credentials of user/process for processing in the connection procedures
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslamtypedef struct smb_cred {
b8fac8e162eda7e98db13dfa3e439e43f90f41d9jhaslam * Common object flags
* Bits in vc_flags (a.k.a. vc_co.co_flags)
* bits in smb_share ss_flags (a.k.a. ss_co.co_flags)
struct smb_sopt {
int sv_proto;
enum smbiod_state {
#define SMB_INFO_NONE 0
struct smb_vc_info {
int itype;
int usecount;
int flags;
struct smb_share_info {
int itype;
int usecount;
int flags;
struct smb_rq;
#define SMBNOREPLYWAIT (0)
struct smb_connobj {
int co_flags;
int co_usecount;
/* this.co_lock protects the co_children list */
* Must hold parent.co_lock to traverse.
typedef struct smb_vc {
char *vc_srvname;
char *vc_username;
} smb_vc_t;
typedef struct smb_share {
int ss_conn_waiters;
char *ss_name;
char *ss_fsname;
} smb_share_t;
struct smb_vcspec {
char *srvname;
int optflags;
char *domain;
char *username;
char *pass;
char *localcs;
char *servercs;
struct smb_sharespec {
char *name;
char *pass;
int stype;
int optflags;
#ifdef NEED_SMBFS_CALLBACKS
typedef struct smb_fscb {
} smb_fscb_t;
int smb_sm_init(void);
int smb_sm_idle(void);
void smb_sm_done(void);
int smb_share_count(void);
#ifdef APPLE