xref: /onnv-gate/usr/src/lib/libresolv2/common/irs/irp_p.h (revision 11038:74b12212b8a2)
10Sstevel@tonic-gate /*
2*11038SRao.Shoaib@Sun.COM  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
30Sstevel@tonic-gate  * Copyright (c) 1996 by Internet Software Consortium.
40Sstevel@tonic-gate  *
50Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software for any
60Sstevel@tonic-gate  * purpose with or without fee is hereby granted, provided that the above
70Sstevel@tonic-gate  * copyright notice and this permission notice appear in all copies.
80Sstevel@tonic-gate  *
9*11038SRao.Shoaib@Sun.COM  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10*11038SRao.Shoaib@Sun.COM  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*11038SRao.Shoaib@Sun.COM  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
12*11038SRao.Shoaib@Sun.COM  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*11038SRao.Shoaib@Sun.COM  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*11038SRao.Shoaib@Sun.COM  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15*11038SRao.Shoaib@Sun.COM  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
160Sstevel@tonic-gate  */
170Sstevel@tonic-gate 
180Sstevel@tonic-gate /*
19*11038SRao.Shoaib@Sun.COM  * $Id: irp_p.h,v 1.5 2005/04/27 04:56:28 sra Exp $
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate 
220Sstevel@tonic-gate #ifndef _IRP_P_H_INCLUDED
230Sstevel@tonic-gate #define _IRP_P_H_INCLUDED
240Sstevel@tonic-gate 
250Sstevel@tonic-gate #include <stdio.h>
260Sstevel@tonic-gate 
270Sstevel@tonic-gate struct irp_p {
280Sstevel@tonic-gate 	char inbuffer[1024];
29*11038SRao.Shoaib@Sun.COM 	int inlast; /*%< index of one past the last char in buffer */
30*11038SRao.Shoaib@Sun.COM 	int incurr; /*%< index of the next char to be read from buffer */
310Sstevel@tonic-gate 	int fdCxn;
320Sstevel@tonic-gate };
330Sstevel@tonic-gate 
340Sstevel@tonic-gate /*
350Sstevel@tonic-gate  * Externs.
360Sstevel@tonic-gate  */
370Sstevel@tonic-gate 
380Sstevel@tonic-gate extern struct irs_acc *	irs_irp_acc __P((const char *));
390Sstevel@tonic-gate extern struct irs_gr *	irs_irp_gr __P((struct irs_acc *));
400Sstevel@tonic-gate extern struct irs_pw *	irs_irp_pw __P((struct irs_acc *));
410Sstevel@tonic-gate extern struct irs_sv *	irs_irp_sv __P((struct irs_acc *));
420Sstevel@tonic-gate extern struct irs_pr *	irs_irp_pr __P((struct irs_acc *));
430Sstevel@tonic-gate extern struct irs_ho *	irs_irp_ho __P((struct irs_acc *));
440Sstevel@tonic-gate extern struct irs_nw *	irs_irp_nw __P((struct irs_acc *));
450Sstevel@tonic-gate extern struct irs_ng *	irs_irp_ng __P((struct irs_acc *));
460Sstevel@tonic-gate 
470Sstevel@tonic-gate int irs_irp_connect(struct irp_p *pvt);
480Sstevel@tonic-gate int irs_irp_is_connected(struct irp_p *pvt);
490Sstevel@tonic-gate void irs_irp_disconnect(struct irp_p *pvt);
500Sstevel@tonic-gate int irs_irp_read_response(struct irp_p *pvt, char *text, size_t textlen);
510Sstevel@tonic-gate char *irs_irp_read_body(struct irp_p *pvt, size_t *size);
520Sstevel@tonic-gate int irs_irp_get_full_response(struct irp_p *pvt, int *code,
530Sstevel@tonic-gate 			      char *text, size_t textlen,
540Sstevel@tonic-gate 			      char **body, size_t *bodylen);
550Sstevel@tonic-gate 
560Sstevel@tonic-gate extern int irp_log_errors;
570Sstevel@tonic-gate 
580Sstevel@tonic-gate #endif
59*11038SRao.Shoaib@Sun.COM 
60*11038SRao.Shoaib@Sun.COM /*! \file */
61