xref: /titanic_52/usr/src/lib/libsmbfs/netsmb/smb_rap.h (revision 9c9af2590af49bb395bc8d2eace0f2d4ea16d165)
14bff34e3Sthurlow /*
24bff34e3Sthurlow  * Copyright (c) 2000-2001, Boris Popov
34bff34e3Sthurlow  * All rights reserved.
44bff34e3Sthurlow  *
54bff34e3Sthurlow  * Redistribution and use in source and binary forms, with or without
64bff34e3Sthurlow  * modification, are permitted provided that the following conditions
74bff34e3Sthurlow  * are met:
84bff34e3Sthurlow  * 1. Redistributions of source code must retain the above copyright
94bff34e3Sthurlow  *    notice, this list of conditions and the following disclaimer.
104bff34e3Sthurlow  * 2. Redistributions in binary form must reproduce the above copyright
114bff34e3Sthurlow  *    notice, this list of conditions and the following disclaimer in the
124bff34e3Sthurlow  *    documentation and/or other materials provided with the distribution.
134bff34e3Sthurlow  * 3. All advertising materials mentioning features or use of this software
144bff34e3Sthurlow  *    must display the following acknowledgement:
154bff34e3Sthurlow  *    This product includes software developed by Boris Popov.
164bff34e3Sthurlow  * 4. Neither the name of the author nor the names of any co-contributors
174bff34e3Sthurlow  *    may be used to endorse or promote products derived from this software
184bff34e3Sthurlow  *    without specific prior written permission.
194bff34e3Sthurlow  *
204bff34e3Sthurlow  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
214bff34e3Sthurlow  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
224bff34e3Sthurlow  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
234bff34e3Sthurlow  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
244bff34e3Sthurlow  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
254bff34e3Sthurlow  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
264bff34e3Sthurlow  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
274bff34e3Sthurlow  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
284bff34e3Sthurlow  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
294bff34e3Sthurlow  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
304bff34e3Sthurlow  * SUCH DAMAGE.
314bff34e3Sthurlow  *
324bff34e3Sthurlow  * $Id: smb_rap.h,v 1.1.1.1 2001/07/06 22:38:38 conrad Exp $
334bff34e3Sthurlow  */
344bff34e3Sthurlow 
354bff34e3Sthurlow #ifndef _NETSMB_SMB_RAP_H_
364bff34e3Sthurlow #define	_NETSMB_SMB_RAP_H_
374bff34e3Sthurlow 
384bff34e3Sthurlow struct smb_rap {
394bff34e3Sthurlow 	char		*r_sparam;
404bff34e3Sthurlow 	char		*r_nparam;
414bff34e3Sthurlow 	char		*r_sdata;
424bff34e3Sthurlow 	char		*r_ndata;
434bff34e3Sthurlow 	char		*r_pbuf;	/* rq parameters */
444bff34e3Sthurlow 	int		r_plen;		/* rq param len */
454bff34e3Sthurlow 	char		*r_npbuf;
464bff34e3Sthurlow 	char		*r_dbuf;	/* rq data */
474bff34e3Sthurlow 	int		r_dlen;		/* rq data len */
484bff34e3Sthurlow 	char		*r_ndbuf;
494bff34e3Sthurlow 	uint32_t	r_result;
504bff34e3Sthurlow 	char		*r_rcvbuf;
514bff34e3Sthurlow 	int		r_rcvbuflen;
524bff34e3Sthurlow 	int		r_entries;
534bff34e3Sthurlow };
544bff34e3Sthurlow 
554bff34e3Sthurlow #ifdef __cplusplus
564bff34e3Sthurlow extern "C" {
574bff34e3Sthurlow #endif
584bff34e3Sthurlow 
594bff34e3Sthurlow int  smb_rap_create(int, const char *, const char *, struct smb_rap **);
604bff34e3Sthurlow void smb_rap_done(struct smb_rap *);
614bff34e3Sthurlow int  smb_rap_request(struct smb_rap *, struct smb_ctx *);
624bff34e3Sthurlow int  smb_rap_setNparam(struct smb_rap *, int);
634bff34e3Sthurlow int  smb_rap_setPparam(struct smb_rap *, void *);
64*9c9af259SGordon Ross int  smb_rap_getNparam(struct smb_rap *, long *);
654bff34e3Sthurlow int  smb_rap_error(struct smb_rap *, int);
664bff34e3Sthurlow 
674bff34e3Sthurlow #ifdef __cplusplus
684bff34e3Sthurlow }
694bff34e3Sthurlow #endif
704bff34e3Sthurlow 
714bff34e3Sthurlow #endif /* _NETSMB_SMB_RAP_H_ */
72