2N/A/*
2N/A * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A/*
2N/A * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
2N/A * Copyright (c) 1999 by Internet Software Consortium.
2N/A *
2N/A * Permission to use, copy, modify, and distribute this software for any
2N/A * purpose with or without fee is hereby granted, provided that the above
2N/A * copyright notice and this permission notice appear in all copies.
2N/A *
2N/A * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
2N/A * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2N/A * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
2N/A * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2N/A * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
2N/A * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2N/A */
2N/A
2N/A/*
2N/A * $Id: irp.h,v 1.4 2005/04/27 04:56:15 sra Exp $
2N/A */
2N/A
2N/A#ifndef _IRP_H_INCLUDED
2N/A#define _IRP_H_INCLUDED
2N/A
2N/A#include <paths.h>
2N/A
2N/A/*! \file */
2N/A
2N/A#define IRPD_TIMEOUT 30 /*%< seconds */
2N/A#define IRPD_MAXSESS 50 /*%< number of simultaneous sessions. */
2N/A#define IRPD_PORT 6660 /*%< 10 times the number of the beast. */
2N/A#define IRPD_PATH _PATH_SYSVOL "/irpd" /*%< af_unix socket path */
2N/A
2N/A/* If sets the environment variable IRPDSERVER to an IP address
2N/A (e.g. "192.5.5.1"), then that's the host the client expects irpd to be
2N/A running on. */
2N/A#define IRPD_HOST_ENV "IRPDSERVER"
2N/A
2N/A/* Protocol response codes. */
2N/A#define IRPD_WELCOME_CODE 200
2N/A#define IRPD_NOT_WELCOME_CODE 500
2N/A
2N/A#define IRPD_GETHOST_ERROR 510
2N/A#define IRPD_GETHOST_NONE 210
2N/A#define IRPD_GETHOST_OK 211
2N/A#define IRPD_GETHOST_SETOK 212
2N/A
2N/A#define IRPD_GETNET_ERROR 520
2N/A#define IRPD_GETNET_NONE 220
2N/A#define IRPD_GETNET_OK 221
2N/A#define IRPD_GETNET_SETOK 222
2N/A
2N/A#define IRPD_GETUSER_ERROR 530
2N/A#define IRPD_GETUSER_NONE 230
2N/A#define IRPD_GETUSER_OK 231
2N/A#define IRPD_GETUSER_SETOK 232
2N/A
2N/A#define IRPD_GETGROUP_ERROR 540
2N/A#define IRPD_GETGROUP_NONE 240
2N/A#define IRPD_GETGROUP_OK 241
2N/A#define IRPD_GETGROUP_SETOK 242
2N/A
2N/A#define IRPD_GETSERVICE_ERROR 550
2N/A#define IRPD_GETSERVICE_NONE 250
2N/A#define IRPD_GETSERVICE_OK 251
2N/A#define IRPD_GETSERVICE_SETOK 252
2N/A
2N/A#define IRPD_GETPROTO_ERROR 560
2N/A#define IRPD_GETPROTO_NONE 260
2N/A#define IRPD_GETPROTO_OK 261
2N/A#define IRPD_GETPROTO_SETOK 262
2N/A
2N/A#define IRPD_GETNETGR_ERROR 570
2N/A#define IRPD_GETNETGR_NONE 270
2N/A#define IRPD_GETNETGR_OK 271
2N/A#define IRPD_GETNETGR_NOMORE 272
2N/A#define IRPD_GETNETGR_MATCHES 273
2N/A#define IRPD_GETNETGR_NOMATCH 274
2N/A#define IRPD_GETNETGR_SETOK 275
2N/A#define IRPD_GETNETGR_SETERR 276
2N/A
2N/A#define irs_irp_read_body __irs_irp_read_body
2N/A#define irs_irp_read_response __irs_irp_read_response
2N/A#define irs_irp_disconnect __irs_irp_disconnect
2N/A#define irs_irp_connect __irs_irp_connect
2N/A#define irs_irp_connection_setup __irs_irp_connection_setup
2N/A#define irs_irp_send_command __irs_irp_send_command
2N/A
2N/Astruct irp_p;
2N/A
2N/Achar *irs_irp_read_body(struct irp_p *, size_t *);
2N/Aint irs_irp_read_response(struct irp_p *, char *, size_t);
2N/Avoid irs_irp_disconnect(struct irp_p *);
2N/Aint irs_irp_connect(struct irp_p *);
2N/Aint irs_irp_is_connected(struct irp_p *);
2N/Aint irs_irp_connection_setup(struct irp_p *, int *);
2N/A#ifdef __GNUC__
2N/Aint irs_irp_send_command(struct irp_p *, const char *, ...)
2N/A __attribute__((__format__(__printf__, 2, 3)));
2N/A#else
2N/Aint irs_irp_send_command(struct irp_p *, const char *, ...);
2N/A#endif
2N/Aint irs_irp_get_full_response(struct irp_p *, int *, char *, size_t,
2N/A char **, size_t *);
2N/Aint irs_irp_read_line(struct irp_p *, char *, int);
2N/A
2N/A#endif
2N/A
2N/A/*! \file */