smb_rq.h revision 613a2f6ba31e891e3d947a356daf5e563d43c1ce
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_rq.h,v 1.9 2005/01/22 22:20:58 lindak Exp $
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
9c9af2590af49bb395bc8d2eace0f2d4ea16d165Gordon Ross * Use is subject to license terms.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_ALLOCED 0x0001 /* structure was malloced */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_SENT 0x0002 /* request successfully transmitted */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_REXMIT 0x0004 /* request should be retransmitted */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_RESTART 0x0010 /* req should be repeated if possible */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_NORESTART 0x0020 /* request is not restartable */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_MULTIPACKET 0x0040 /* multiple pkts can be sent/received */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross#define SMBR_INTERNAL 0x0080 /* request enqueued by the IOD! */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_NOINTR_SEND 0x0100 /* no interrupt in send wait */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_NOINTR_RECV 0x0200 /* no interrupt in recv wait */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_SENDWAIT 0x0400 /* waiting for send to complete */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross#define SMBR_NORECONNECT 0x0800 /* do not reconnect for this */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross/* SMBR_VCREF 0x4000 * took vc reference (obsolete) */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBR_MOREDATA 0x8000 /* our buffer was too small */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBT2_ALLSENT 0x0001 /* all data and params are sent */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBT2_ALLRECV 0x0002 /* all data and params are received */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBT2_MOREDATA 0x8000 /* our buffer was too small */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMBRQ_UNLOCK(rqp) mutex_exit(&(rqp)->sr_lock)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow SMBRQ_NOTIFIED /* owner notified about completion */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow uint8_t t2_maxscount; /* max setup words to return */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow uint16_t t2_maxpcount; /* max param bytes to return */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow uint16_t t2_maxdcount; /* max data bytes to return */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow struct mbchain t2_tparam; /* parameters to transmit */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow /* unmapped windows error detail */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow uint8_t nt_maxscount; /* max setup words to return */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow uint32_t nt_maxpcount; /* max param bytes to return */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow uint32_t nt_maxdcount; /* max data bytes to return */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow struct mbchain nt_tparam; /* parameters to transmit */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow /* unmapped windows error details */
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint smb_rq_alloc(struct smb_connobj *layer, uchar_t cmd,
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint smb_rq_init(struct smb_rq *rqp, struct smb_connobj *layer,
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint smb_rq_simple_timed(struct smb_rq *rqp, int timeout);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint smb_t2_alloc(struct smb_connobj *layer, ushort_t setup,
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint smb_t2_init(struct smb_t2rq *rqp, struct smb_connobj *layer,
4bff34e37def8a90f9194d81bc345c52ba20086athurlow ushort_t *setup, int setupcnt, struct smb_cred *scred);
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint smb_nt_alloc(struct smb_connobj *layer, ushort_t fn,
4bff34e37def8a90f9194d81bc345c52ba20086athurlowint smb_nt_init(struct smb_ntrq *rqp, struct smb_connobj *layer,
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#endif /* _NETSMB_SMB_RQ_H_ */