1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
3*0Sstevel@tonic-gate  * Use is subject to license terms.
4*0Sstevel@tonic-gate  */
5*0Sstevel@tonic-gate 
6*0Sstevel@tonic-gate /*
7*0Sstevel@tonic-gate  * Copyright (c) 1996 by Internet Software Consortium.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software for any
10*0Sstevel@tonic-gate  * purpose with or without fee is hereby granted, provided that the above
11*0Sstevel@tonic-gate  * copyright notice and this permission notice appear in all copies.
12*0Sstevel@tonic-gate  *
13*0Sstevel@tonic-gate  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
14*0Sstevel@tonic-gate  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
15*0Sstevel@tonic-gate  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
16*0Sstevel@tonic-gate  * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
17*0Sstevel@tonic-gate  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
18*0Sstevel@tonic-gate  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
19*0Sstevel@tonic-gate  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20*0Sstevel@tonic-gate  * SOFTWARE.
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate 
23*0Sstevel@tonic-gate /*
24*0Sstevel@tonic-gate  * $Id: irp_p.h,v 8.3 2003/04/29 01:26:06 marka Exp $
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate #ifndef _IRP_P_H_INCLUDED
28*0Sstevel@tonic-gate #define _IRP_P_H_INCLUDED
29*0Sstevel@tonic-gate 
30*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*0Sstevel@tonic-gate 
32*0Sstevel@tonic-gate #include <stdio.h>
33*0Sstevel@tonic-gate 
34*0Sstevel@tonic-gate struct irp_p {
35*0Sstevel@tonic-gate 	char inbuffer[1024];
36*0Sstevel@tonic-gate 	int inlast; /* index of one past the last char in buffer */
37*0Sstevel@tonic-gate 	int incurr; /* index of the next char to be read from buffer */
38*0Sstevel@tonic-gate 
39*0Sstevel@tonic-gate 	int fdCxn;
40*0Sstevel@tonic-gate };
41*0Sstevel@tonic-gate 
42*0Sstevel@tonic-gate /*
43*0Sstevel@tonic-gate  * Externs.
44*0Sstevel@tonic-gate  */
45*0Sstevel@tonic-gate 
46*0Sstevel@tonic-gate extern struct irs_acc *	irs_irp_acc __P((const char *));
47*0Sstevel@tonic-gate extern struct irs_gr *	irs_irp_gr __P((struct irs_acc *));
48*0Sstevel@tonic-gate extern struct irs_pw *	irs_irp_pw __P((struct irs_acc *));
49*0Sstevel@tonic-gate extern struct irs_sv *	irs_irp_sv __P((struct irs_acc *));
50*0Sstevel@tonic-gate extern struct irs_pr *	irs_irp_pr __P((struct irs_acc *));
51*0Sstevel@tonic-gate extern struct irs_ho *	irs_irp_ho __P((struct irs_acc *));
52*0Sstevel@tonic-gate extern struct irs_nw *	irs_irp_nw __P((struct irs_acc *));
53*0Sstevel@tonic-gate extern struct irs_ng *	irs_irp_ng __P((struct irs_acc *));
54*0Sstevel@tonic-gate 
55*0Sstevel@tonic-gate int irs_irp_connect(struct irp_p *pvt);
56*0Sstevel@tonic-gate int irs_irp_is_connected(struct irp_p *pvt);
57*0Sstevel@tonic-gate void irs_irp_disconnect(struct irp_p *pvt);
58*0Sstevel@tonic-gate int irs_irp_read_response(struct irp_p *pvt, char *text, size_t textlen);
59*0Sstevel@tonic-gate char *irs_irp_read_body(struct irp_p *pvt, size_t *size);
60*0Sstevel@tonic-gate int irs_irp_get_full_response(struct irp_p *pvt, int *code,
61*0Sstevel@tonic-gate 			      char *text, size_t textlen,
62*0Sstevel@tonic-gate 			      char **body, size_t *bodylen);
63*0Sstevel@tonic-gate 
64*0Sstevel@tonic-gate extern int irp_log_errors;
65*0Sstevel@tonic-gate 
66*0Sstevel@tonic-gate #endif
67