smb_conn.h revision 02d09e03eb27f3a2dc299de704e45dae5173f43f
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright (c) 2000-2001 Boris Popov
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Redistribution and use in source and binary forms, with or without
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * modification, are permitted provided that the following conditions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 1. Redistributions of source code must retain the above copyright
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * notice, this list of conditions and the following disclaimer.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 2. Redistributions in binary form must reproduce the above copyright
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * notice, this list of conditions and the following disclaimer in the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * documentation and/or other materials provided with the distribution.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 3. All advertising materials mentioning features or use of this software
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * must display the following acknowledgement:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * This product includes software developed by Boris Popov.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 4. Neither the name of the author nor the names of any co-contributors
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * may be used to endorse or promote products derived from this software
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * without specific prior written permission.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * SUCH DAMAGE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * $Id: smb_conn.h,v 1.32.42.1 2005/05/27 02:35:29 lindak Exp $
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Credentials of user/process for processing in the connection procedures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct smb_cred {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common object flags
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Bits in vc_flags (a.k.a. vc_co.co_flags)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Many of these were duplicates of SMBVOPT_ flags
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and we now keep those too instead of merging
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * them into vc_flags.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMBV_WIN95 0x0010 /* used to apply bugfixes for this OS */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMBV_NT4 0x0020 /* used when NT4 issues invalid resp */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMBV_UNICODE 0x0040 /* conn configured to use Unicode */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Note: the common "obj" level uses this GONE flag by
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the name SMBO_GONE. Keep this alias as a reminder.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * bits in smb_share ss_flags (a.k.a. ss_co.co_flags)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMBS_FST_FAT 0x0010 /* share FS Type is FAT */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Note: the common "obj" level uses this GONE flag by
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * the name SMBO_GONE. Keep this alias as a reminder.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* This declares struct smb_rqhead */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMB_DEFRQTIMO 30 /* 30 for oplock revoke/writeback */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMB_DIALECT(vcp) ((vcp)->vc_sopt.sv_proto)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Connection object
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMB_CO_LOCK(cp) mutex_enter(&(cp)->co_lock)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define SMB_CO_UNLOCK(cp) mutex_exit(&(cp)->co_lock)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common part of smb_vc, smb_share
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Locking: co_lock protects most
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields in this struct, except
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * as noted below:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* Note: must lock co_parent before child. */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* this.co_lock protects the co_children list */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Linkage in parent's list of children.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Must hold parent.co_lock to traverse.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /* These two are set only at creation. */
#define SMBL_SM 0
typedef struct smb_vc {
} smb_vc_t;
typedef struct smb_share {
int ss_conn_waiters;
} smb_share_t;
typedef struct smb_fscb {
} smb_fscb_t;
typedef struct smb_dev {
} smb_dev_t;
int smb_sm_init(void);
int smb_sm_idle(void);
void smb_sm_done(void);