nodes.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
typedef struct alert_node ALERT;
typedef struct cstat_node CSTATUS;
typedef struct fstat_node FSTATUS;
typedef struct pfstat_node PFSTATUS;
typedef struct pstat_node PSTATUS;
typedef struct pwstat_node PWSTATUS;
typedef struct rstat_node RSTATUS;
typedef struct waiting_node WAITING;
struct alert_node
{
short active; /* Non-zero if triggered */
char *msgfile;
};
struct cstat_node
{
short status;
char *rej_reason;
};
struct exec_node
{
int pid; /* process-id of exec */
int status; /* low order bits from wait */
long key; /* private key for security */
short Errno; /* copy of child's errno */
short type; /* type of exec, EX_... */
union ex
{
} ex;
};
struct waiting_node
{
};
struct susp_node
{
char *message;
};
/*
** Possible values for FLT.type
*/
struct fstat_node
{
short requests; /* Number of events thus far */
short requests_last; /* # when alert last sent */
short trigger; /* Trigger when this value */
short mounted; /* # times currently mounted */
char **users_allowed;
char **users_denied;
char *cpi;
char *lpi;
char *plen;
char *pwid;
};
struct pfstat_node
{
short isAvailable;
};
struct pstat_node
{
short status; /* Current Status of printer */
char *pwheel_name;
char *dis_reason;
char *rej_reason;
char **users_allowed;
char **users_denied;
char **forms_allowed;
char **forms_denied;
char *cpi;
char *lpi;
char *plen;
char *pwid;
short last_dial_rc; /* last exit from dial() */
short nretry; /* number of dial attempts */
char *remote_name;
short nrequests; /* TEMP ONLY! (used variously) */
char *fault_reason;
short numForms;
char **paper_allowed;
};
struct pwstat_node
{
short requests;
short requests_last; /* # when alert last sent */
short trigger;
short mounted;
};
#if defined(OLD_MSG_STUFF)
#define CLIENT_NEW 1
#define CLIENT_PROTOCOL 2
#define CLIENT_TALKING 3
struct mque_node
{
char *msgbuf;
unsigned int size;
};
struct client_node
{
char admin; /* Non-zero if client is admin */
char state; /* (CLIENT_... value) */
char *fifo; /* Name of client's fifo */
char *system; /* Name of client's system */
int fd; /* File-descriptor of open fifo */
char authcode[HEAD_AUTHCODE_LEN];
/* ``Password'' to verify client*/
};
#else
#endif
struct rstat_node
{
long status;
long rank;
char *req_file;
char *slow;
char *fast;
short copies; /* # copies interface is to make */
short reason; /* reason for failing _validate() */
char *pwheel_name;
char *printer_type;
char *output_type;
char *cpi;
char *lpi;
char *plen;
char *pwid;
short msgType; /* for getting status */
short trayNum; /* for mounting trays remotely */
char *formName; /* for mounting forms remotely */
};
# define RSS_MARK 0x00000001
# define RSS_RANK 0x00000002
struct form_node
{
int np;
char *chset;
short mandatory;
char *rcolor;
char *comment;
char *conttype;
char *name;
char *paper;
short isDefault;
};
# define LP_EXEC 0
# define LP_SCHED 1
# define LP_NET 2
# define LP_FILTER 3
# define LP_PRINTER 4
# define LP_ALERT 5
# define LP_NOTIFY 6
# define LP_SYSTEM 7
# define LP_PWHEEL 8
# define LP_FORM 9
# define LP_LATER 10
# define LP_ALARM 11
# define LP_ACTIVE 0x080
# define LP_ALERTING 0x100
# define MINUTES (60)
{ \
if (CONDITION) {
#define END_WALK_LOOP \
} \
} \
}