2 * Copyright (c) 1990,1993 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
7 #define AFPD_GLOBALS_H 1
10 #include <sys/cdefs.h>
14 #include <sys/types.h>
17 #include <netdb.h> /* this isn't header-protected under ultrix */
18 #include <netatalk/at.h>
19 #include <atalk/afp.h>
20 #include <atalk/compat.h>
30 #define OPTION_DEBUG (1 << 0)
31 #define OPTION_USERVOLFIRST (1 << 1)
32 #define OPTION_NOUSERVOL (1 << 2)
33 #define OPTION_PROXY (1 << 3)
34 #define OPTION_CUSTOMICON (1 << 4)
36 /* a couple of these options could get stuck in unions to save
39 int connections, port, transports, tickleval, flags;
40 unsigned char passwdbits, passwdminlen, loginmaxfail;
41 u_int32_t server_quantum;
42 char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *configfile;
43 struct at_addr ddpaddr;
44 char *uampath, *nlspath, *fqdn;
45 char *pidfile, *defaultvol, *systemvol;
46 char *guest, *loginmesg, *keyfile, *passwdfile;
53 #define AFPOBJ_TMPSIZ (MAXPATHLEN)
54 typedef struct AFPObj {
56 unsigned long servernum;
57 void *handle, *config;
58 struct afp_options options;
59 char *Obj, *Type, *Zone;
60 char username[MACFILELEN + 1];
61 void (*logout)(void), (*exit)(int);
62 int (*reply)(void *, int);
63 int (*attention)(void *, AFPUserBytes);
64 /* to prevent confusion, only use these in afp_* calls */
65 char oldtmp[AFPOBJ_TMPSIZ + 1], newtmp[AFPOBJ_TMPSIZ + 1];
66 void *uam_cookie; /* cookie for uams */
69 extern int afp_version;
70 extern unsigned char nologin;
71 extern struct vol *volumes;
72 extern struct dir *curdir;
73 extern char getwdbuf[];
75 extern void afp_options_init __P((struct afp_options *));
76 extern int afp_options_parse __P((int, char **, struct afp_options *));
77 extern int afp_options_parseline __P((char *, struct afp_options *));
78 extern void afp_options_free __P((struct afp_options *,
79 const struct afp_options *));
80 extern void setmessage __P((const char *));
81 extern void readmessage __P((void));
84 extern void initline __P((int, char *));
85 extern int parseline __P((int, char *));
88 extern void afp_over_asp __P((AFPObj *));
90 extern void afp_over_dsi __P((AFPObj *));
92 #endif /* globals.h */