2 * $Id: globals.h,v 1.18.2.2.2.3 2004-01-08 19:16:57 lenneis Exp $
4 * Copyright (c) 1990,1993 Regents of The University of Michigan.
5 * All Rights Reserved. See COPYRIGHT.
9 #define AFPD_GLOBALS_H 1
11 #include <sys/param.h>
12 #include <sys/cdefs.h>
16 #include <sys/types.h>
17 #endif /* ADMIN_GRP */
20 #include <netdb.h> /* this isn't header-protected under ultrix */
21 #endif /* HAVE_NETDB_H */
23 #include <netatalk/at.h>
24 #include <atalk/afp.h>
25 #include <atalk/compat.h>
26 #include <atalk/unicode.h>
35 #define OPTION_DEBUG (1 << 0)
36 #define OPTION_USERVOLFIRST (1 << 1)
37 #define OPTION_NOUSERVOL (1 << 2)
38 #define OPTION_PROXY (1 << 3)
39 #define OPTION_CUSTOMICON (1 << 4)
40 #define OPTION_NOSLP (1 << 5)
43 /* set up a structure for this */
44 typedef struct uidgidset_t {
48 #endif /* FORCE_UIDGID */
50 /* a couple of these options could get stuck in unions to save
52 struct afp_volume_name {
60 int connections, port, transports, tickleval, timeout, server_notif, flags;
61 unsigned char passwdbits, passwdminlen, loginmaxfail;
62 u_int32_t server_quantum;
63 char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *configfile;
64 struct at_addr ddpaddr;
67 struct afp_volume_name defaultvol, systemvol, uservol;
69 char *guest, *loginmesg, *keyfile, *passwdfile;
73 char *k5service, *k5realm, *k5keytab;
74 char *unixcodepage,*maccodepage;
75 charset_t maccharset, unixcharset;
81 #endif /* ADMIN_GRP */
84 #define AFPOBJ_TMPSIZ (MAXPATHLEN)
85 typedef struct AFPObj {
87 unsigned long servernum;
88 void *handle, *config;
89 struct afp_options options;
90 char *Obj, *Type, *Zone;
91 char username[MACFILELEN + 1];
92 void (*logout)(void), (*exit)(int);
93 int (*reply)(void *, int);
94 int (*attention)(void *, AFPUserBytes);
96 /* to prevent confusion, only use these in afp_* calls */
97 char oldtmp[AFPOBJ_TMPSIZ + 1], newtmp[AFPOBJ_TMPSIZ + 1];
98 void *uam_cookie; /* cookie for uams */
106 extern int afp_version;
107 extern int afp_errno;
108 extern unsigned char nologin;
109 extern struct dir *curdir;
110 extern char getwdbuf[];
113 extern char Cnid_srv[MAXHOSTNAMELEN + 1];
114 extern int Cnid_port;
116 extern int get_afp_errno __P((const int param));
117 extern void afp_options_init __P((struct afp_options *));
118 extern int afp_options_parse __P((int, char **, struct afp_options *));
119 extern int afp_options_parseline __P((char *, struct afp_options *));
120 extern void afp_options_free __P((struct afp_options *,
121 const struct afp_options *));
122 extern void setmessage __P((const char *));
123 extern void readmessage __P((AFPObj *));
126 extern void initline __P((int, char *));
127 extern int parseline __P((int, char *));
130 const char *AfpNum2name __P((int ));
133 extern void afp_over_asp __P((AFPObj *));
135 extern void afp_over_dsi __P((AFPObj *));
137 #endif /* globals.h */