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