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