17c478bd9Sstevel@tonic-gate /*
2*9525b14bSRao Shoaib  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
37c478bd9Sstevel@tonic-gate  * Copyright (c) 1996 by Internet Software Consortium.
47c478bd9Sstevel@tonic-gate  *
57c478bd9Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software for any
67c478bd9Sstevel@tonic-gate  * purpose with or without fee is hereby granted, provided that the above
77c478bd9Sstevel@tonic-gate  * copyright notice and this permission notice appear in all copies.
87c478bd9Sstevel@tonic-gate  *
9*9525b14bSRao Shoaib  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10*9525b14bSRao Shoaib  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*9525b14bSRao Shoaib  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
12*9525b14bSRao Shoaib  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*9525b14bSRao Shoaib  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*9525b14bSRao Shoaib  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15*9525b14bSRao Shoaib  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
167c478bd9Sstevel@tonic-gate  */
177c478bd9Sstevel@tonic-gate 
187c478bd9Sstevel@tonic-gate /*
19*9525b14bSRao Shoaib  * $Id: irp_p.h,v 1.5 2005/04/27 04:56:28 sra Exp $
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate 
227c478bd9Sstevel@tonic-gate #ifndef _IRP_P_H_INCLUDED
237c478bd9Sstevel@tonic-gate #define _IRP_P_H_INCLUDED
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate #include <stdio.h>
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate struct irp_p {
287c478bd9Sstevel@tonic-gate 	char inbuffer[1024];
29*9525b14bSRao Shoaib 	int inlast; /*%< index of one past the last char in buffer */
30*9525b14bSRao Shoaib 	int incurr; /*%< index of the next char to be read from buffer */
317c478bd9Sstevel@tonic-gate 	int fdCxn;
327c478bd9Sstevel@tonic-gate };
337c478bd9Sstevel@tonic-gate 
347c478bd9Sstevel@tonic-gate /*
357c478bd9Sstevel@tonic-gate  * Externs.
367c478bd9Sstevel@tonic-gate  */
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate extern struct irs_acc *	irs_irp_acc __P((const char *));
397c478bd9Sstevel@tonic-gate extern struct irs_gr *	irs_irp_gr __P((struct irs_acc *));
407c478bd9Sstevel@tonic-gate extern struct irs_pw *	irs_irp_pw __P((struct irs_acc *));
417c478bd9Sstevel@tonic-gate extern struct irs_sv *	irs_irp_sv __P((struct irs_acc *));
427c478bd9Sstevel@tonic-gate extern struct irs_pr *	irs_irp_pr __P((struct irs_acc *));
437c478bd9Sstevel@tonic-gate extern struct irs_ho *	irs_irp_ho __P((struct irs_acc *));
447c478bd9Sstevel@tonic-gate extern struct irs_nw *	irs_irp_nw __P((struct irs_acc *));
457c478bd9Sstevel@tonic-gate extern struct irs_ng *	irs_irp_ng __P((struct irs_acc *));
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate int irs_irp_connect(struct irp_p *pvt);
487c478bd9Sstevel@tonic-gate int irs_irp_is_connected(struct irp_p *pvt);
497c478bd9Sstevel@tonic-gate void irs_irp_disconnect(struct irp_p *pvt);
507c478bd9Sstevel@tonic-gate int irs_irp_read_response(struct irp_p *pvt, char *text, size_t textlen);
517c478bd9Sstevel@tonic-gate char *irs_irp_read_body(struct irp_p *pvt, size_t *size);
527c478bd9Sstevel@tonic-gate int irs_irp_get_full_response(struct irp_p *pvt, int *code,
537c478bd9Sstevel@tonic-gate 			      char *text, size_t textlen,
547c478bd9Sstevel@tonic-gate 			      char **body, size_t *bodylen);
557c478bd9Sstevel@tonic-gate 
567c478bd9Sstevel@tonic-gate extern int irp_log_errors;
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate #endif
59*9525b14bSRao Shoaib 
60*9525b14bSRao Shoaib /*! \file */
61