Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.sbin / sup / source / supmsg.h
blob05fda8db73e5035a26b8f4a31e69d1945d367b7f
1 /* $NetBSD: supmsg.h,v 1.6 2001/01/16 02:50:32 cgd Exp $ */
3 /*
4 * Copyright (c) 1992 Carnegie Mellon University
5 * All Rights Reserved.
6 *
7 * Permission to use, copy, modify and distribute this software and its
8 * documentation is hereby granted, provided that both the copyright
9 * notice and this permission notice appear in all copies of the
10 * software, derivative works or modified versions, and any portions
11 * thereof, and that both notices appear in supporting documentation.
13 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
14 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
15 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
17 * Carnegie Mellon requests users of this software to return to
19 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
20 * School of Computer Science
21 * Carnegie Mellon University
22 * Pittsburgh PA 15213-3890
24 * any improvements or extensions that they make and grant Carnegie Mellon
25 * the rights to redistribute these changes.
28 * supmsg.h - global definitions/variables used in msg routines.
30 **********************************************************************
31 * HISTORY
33 * 7-July-93 Nate Williams at Montana State University
34 * Modified SUP to use gzip based compression when sending files
35 * across the network to save BandWidth
37 * Revision 1.7 92/08/11 12:08:20 mrt
38 * Added copyright.
39 * [92/08/10 mrt]
41 * Revision 1.6 89/08/23 14:56:42 gm0w
42 * Changed MSGF to MSG constants.
43 * [89/08/23 gm0w]
45 * 27-Dec-87 Glenn Marcy (gm0w) at Carnegie-Mellon University
46 * Added crosspatch support. Removed nameserver support.
48 * 29-Jun-87 Glenn Marcy (gm0w) at Carnegie-Mellon University
49 * Added "release" support.
51 * 27-May-87 Doug Philips (dwp) at Carnegie-Mellon University
52 * Added MSGFDONE and subvalues, added doneack and donereason.
54 * 20-May-87 Glenn Marcy (gm0w) at Carnegie-Mellon University
55 * Added changes to make lint happy.
57 * 04-Jan-86 Glenn Marcy (gm0w) at Carnegie-Mellon University
58 * Changed hostname to hostT to support multiple repositories per
59 * collection. Added FSETUPBUSY to tell clients that server is
60 * currently busy.
62 * 19-Dec-85 Glenn Marcy (gm0w) at Carnegie-Mellon University
63 * Created.
65 **********************************************************************
68 /* Special messages reserved for SCM */
69 #define MSGGOAWAY (-1) /* see scm.c */
71 /* Message types -- see supmsg.c */
72 #define MSGSIGNON (101)
73 #define MSGSIGNONACK (102)
74 #define MSGSETUP (103)
75 #define MSGSETUPACK (104)
76 #define MSGLOGIN (105)
77 #define MSGLOGACK (106)
78 #define MSGCRYPT (107)
79 #define MSGCRYPTOK (108)
80 #define MSGREFUSE (109)
81 #define MSGLIST (110)
82 #define MSGNEED (111)
83 #define MSGDENY (112)
84 #define MSGSEND (113)
85 #define MSGRECV (114)
86 #define MSGDONE (115)
87 #define MSGXPATCH (117)
88 #define MSGCOMPRESS (118)
90 /* MSGSETUPACK data codes - setupack */
91 #define FSETUPOK (999)
92 #define FSETUPHOST (998)
93 #define FSETUPSAME (997)
94 #define FSETUPOLD (996)
95 #define FSETUPBUSY (995)
96 #define FSETUPRELEASE (994)
98 /* MSGLOGACK data codes - loginack */
99 #define FLOGOK (989)
100 #define FLOGNG (988)
102 /* MSGDONE data codes - doneack */
103 #define FDONESUCCESS (979)
104 #define FDONEDONTLOG (978)
105 #define FDONESRVERROR (977)
106 #define FDONEUSRERROR (976)
107 #define FDONEGOAWAY (975)
109 #ifdef MSGSUBR
111 /* used in all msg routines */
112 extern int isserver; /* true if we are the server */
113 extern int protver; /* protocol version of partner */
115 #else /* MSGSUBR */
117 #ifdef MSGFILE
118 #define EXTERN
119 #else /* MSGFILE */
120 #define EXTERN extern
121 #endif /* MSGFILE */
123 /* used in all msg routines */
124 EXTERN int isserver; /* true if we are the server */
126 /* msggoaway */
127 EXTERN char *goawayreason; /* reason for goaway */
129 /* msgsignon */
130 EXTERN int pgmversion; /* version of this program */
131 EXTERN int protver; /* protocol version of partner */
132 EXTERN int pgmver; /* program version of partner */
133 EXTERN char *scmver; /* scm version of partner */
134 EXTERN int fspid; /* process id of fileserver */
136 /* msgsetup */
137 EXTERN int xpatch; /* setup crosspatch to a new client */
138 EXTERN char *xuser; /* user for crosspatch */
139 EXTERN char *collname; /* collection name */
140 EXTERN char *basedir; /* base directory */
141 EXTERN int basedev; /* base directory device */
142 EXTERN int baseino; /* base directory inode */
143 EXTERN time_t lasttime; /* time of last upgrade */
144 EXTERN int listonly; /* only listing files, no data xfer */
145 EXTERN int newonly; /* only send new files */
146 EXTERN char *release; /* release name */
147 EXTERN int setupack; /* ack return value for setup */
149 /* msgcrypt */
150 EXTERN char *crypttest; /* encryption test string */
152 /* msglogin */
153 EXTERN char *logcrypt; /* login encryption test */
154 EXTERN char *loguser; /* login username */
155 EXTERN char *logpswd; /* password for login */
156 EXTERN int logack; /* login ack status */
157 EXTERN char *logerror; /* error string from oklogin */
159 /* msgxpatch */
160 EXTERN int xargc; /* arg count for crosspatch */
161 EXTERN char **xargv; /* arg array for crosspatch */
163 /* msgrefuse */
164 EXTERN TREE *refuseT; /* tree of files to refuse */
166 /* msglist */
167 EXTERN TREE *listT; /* tree of files to list */
168 EXTERN time_t scantime; /* time that collection was scanned */
170 /* msgneed */
171 EXTERN TREE *needT; /* tree of files to need */
173 /* msgdeny */
174 EXTERN TREE *denyT; /* tree of files to deny */
176 /* msgrecv */
177 /* msgsend */
178 EXTERN TREE *upgradeT; /* pointer to file being upgraded */
180 /* msgdone */
181 EXTERN int doneack; /* done ack status */
182 EXTERN char *donereason; /* set if indicated by doneack */
184 #undef EXTERN
186 #endif /* MSGSUBR */