1 /* $NetBSD: supmsg.h,v 1.6 2001/01/16 02:50:32 cgd Exp $ */
4 * Copyright (c) 1992 Carnegie Mellon University
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 **********************************************************************
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
41 * Revision 1.6 89/08/23 14:56:42 gm0w
42 * Changed MSGF to MSG constants.
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
62 * 19-Dec-85 Glenn Marcy (gm0w) at Carnegie-Mellon University
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)
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 */
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)
111 /* used in all msg routines */
112 extern int isserver
; /* true if we are the server */
113 extern int protver
; /* protocol version of partner */
120 #define EXTERN extern
123 /* used in all msg routines */
124 EXTERN
int isserver
; /* true if we are the server */
127 EXTERN
char *goawayreason
; /* reason for goaway */
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 */
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 */
150 EXTERN
char *crypttest
; /* encryption test string */
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 */
160 EXTERN
int xargc
; /* arg count for crosspatch */
161 EXTERN
char **xargv
; /* arg array for crosspatch */
164 EXTERN TREE
*refuseT
; /* tree of files to refuse */
167 EXTERN TREE
*listT
; /* tree of files to list */
168 EXTERN
time_t scantime
; /* time that collection was scanned */
171 EXTERN TREE
*needT
; /* tree of files to need */
174 EXTERN TREE
*denyT
; /* tree of files to deny */
178 EXTERN TREE
*upgradeT
; /* pointer to file being upgraded */
181 EXTERN
int doneack
; /* done ack status */
182 EXTERN
char *donereason
; /* set if indicated by doneack */