smb_tran.h revision 4bff34e37def8a90f9194d81bc345c52ba20086a
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_tran.h,v 1.2 2001/12/21 02:41:30 conrad Exp $
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#pragma ident "%Z%%M% %I% %E% SMI"
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Known transports
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Transport parameters
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_create)(struct smb_vc *vcp, struct proc *p);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_bind)(struct smb_vc *vcp, struct sockaddr *sap,
4bff34e37def8a90f9194d81bc345c52ba20086athurlow struct proc *p);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_connect)(struct smb_vc *vcp, struct sockaddr *sap,
4bff34e37def8a90f9194d81bc345c52ba20086athurlow struct proc *p);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_disconnect)(struct smb_vc *vcp, struct proc *p);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_send)(struct smb_vc *vcp, mblk_t *m0, struct proc *p);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_recv)(struct smb_vc *vcp, mblk_t **mpp, struct proc *p);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_poll)(struct smb_vc *vcp, int ticks, struct proc *p);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_getparam)(struct smb_vc *vcp, int param, void *data);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow int (*tr_setparam)(struct smb_vc *vcp, int param, void *data);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_CREATE(vcp, p) (vcp)->vc_tdesc->tr_create(vcp, p)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_DONE(vcp, p) (vcp)->vc_tdesc->tr_done(vcp, p)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_BIND(vcp, sap, p) (vcp)->vc_tdesc->tr_bind(vcp, sap, p)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_CONNECT(vcp, sap, p) (vcp)->vc_tdesc->tr_connect(vcp, sap, p)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_DISCONNECT(vcp, p) (vcp)->vc_tdesc->tr_disconnect(vcp, p)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_SEND(vcp, m0, p) (vcp)->vc_tdesc->tr_send(vcp, m0, p)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_RECV(vcp, m, p) (vcp)->vc_tdesc->tr_recv(vcp, m, p)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_POLL(vcp, t, p) (vcp)->vc_tdesc->tr_poll(vcp, t, p)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#define SMB_TRAN_FATAL(vcp, error) (vcp)->vc_tdesc->tr_fatal(vcp, error)
4bff34e37def8a90f9194d81bc345c52ba20086athurlow/* Ops vectors for each transport. */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow#endif /* _NETSMB_SMB_TRAN_H_ */