xref: /illumos-gate/usr/src/head/rje.h (revision 03270635d68df6a0392fb8f4b7c04acad764648b)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1988 AT&T	*/
23 /*	  All Rights Reserved	*/
24 
25 
26 #ifndef _RJE_H
27 #define	_RJE_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 #define	MAXDEVS 7		/* Maximum number of devices (readers, etc.) */
34 #define	LINEFIL "/usr/rje/lines"
35 
36 #define	RJECU	"/dev/dn2"	/* Dial-up RJE device */
37 #define	RJELOGIN "rje"		/* rje login name */
38 #define	RJEUID	68		/* User-Id for "rje" */
39 #define	SHQUID	69		/* User-Id for "shqer" */
40 #define	RJEGID	8		/* Group-Id for "rje" and "shqer" */
41 #define	QUEDIR	"/usr/rje/sque"	/* shqer directory */
42 #define	QUELOG	"log"		/* shqer log file name */
43 #define	QUELEN	50		/* Length of a shqer log entry */
44 #define	QDELAY	180		/* Delay time for shqer */
45 #define	QNICE	0
46 #define	BOOTDLY	60		/* Reboot delay time (seconds) */
47 #define	RESPMAX 70000		/* Max resp file size */
48 
49 #define	DEVFD	0	/* KMC device file descriptor */
50 #define	XMTRD	1	/* xmit read file descriptor */
51 #define	ERRFD	2	/* errors file descriptor */
52 #define	XMTWR	3	/* xmit write file descriptor */
53 #define	DSPRD	4	/* disp read file descriptor */
54 #define	DSPWR	5	/* disp write file descriptor */
55 #define	JBLOG	6	/* joblog file descriptor */
56 
57 #define	NAMESZ	8
58 
59 struct joblog {
60 	char j_file[NAMESZ];	/* Name of file to be sent */
61 	unsigned j_uid;		/* User ID of owner */
62 	int j_lvl;		/* Message level */
63 	long j_cnt;		/* Number of "cards" */
64 };
65 
66 	/* joblog header info */
67 
68 struct loghdr {
69 	int h_pgrp;		/* Process group Id */
70 };
71 #define	LBUFMAX 100
72 #define	MAXLNS	6
73 struct lines {
74 	char *l_host;		/* RJE host machine */
75 	char *l_sys;		/* This system */
76 	char *l_dir;		/* home directory */
77 	char *l_prefix;		/* rje prefix */
78 	char *l_dev;		/* device for transfer */
79 	char *l_peri;		/* Peripherals field */
80 	char *l_parm;		/* Parameters field */
81 	char l_buf[LBUFMAX];	/* buffer for fields */
82 };
83 
84 struct dsplog {
85 	int d_type;		/* Type of record */
86 	union {
87 		struct {	/* record from xmit */
88 			char d_file[NAMESZ];	/* file sent */
89 			long d_cnt;		/* no. of cards sent */
90 			unsigned d_uid;		/* who sent the file */
91 			int d_lvl;		/* message level */
92 			int d_rdr;		/* reader sent from (0-6) */
93 		} x;
94 		struct {	/* record from recv */
95 			char d_file[NAMESZ];	/* file received */
96 			long d_cnt;		/* no. of records */
97 			int d_trunc;		/* file truncation flag */
98 		} r;
99 	} d_un;
100 };
101 
102 struct sque {
103 	char sq_exfil[140];	/* Executable file */
104 	char sq_infil[48];	/* Input file */
105 	char sq_jobnm[9];	/* Remote job name */
106 	char sq_pgrmr[25];	/* Programmer name */
107 	char sq_jobno[9];	/* Remote job number */
108 	char sq_login[9];	/* Login name from usr= */
109 	char sq_homed[48];	/* Login directory */
110 	long sq_min;		/* Minimum file system space */
111 };
112 
113 #ifdef	__cplusplus
114 }
115 #endif
116 
117 #endif	/* _RJE_H */
118