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>
11 #include <netdb.h> /* this isn't header-protected under ultrix */
12 #include <netatalk/at.h>
13 #include <atalk/afp.h>
14 #include <atalk/compat.h>
24 #define OPTION_DEBUG (1 << 0)
25 #define OPTION_USERVOLFIRST (1 << 1)
26 #define OPTION_NOUSERVOL (1 << 2)
27 #define OPTION_PROXY (1 << 3)
28 #define OPTION_CUSTOMICON (1 << 4)
30 /* a couple of these options could get stuck in unions to save
33 int connections, port, transports, tickleval, flags;
34 unsigned char passwdbits, passwdminlen, loginmaxfail;
35 u_int32_t server_quantum;
36 char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *configfile;
37 struct at_addr ddpaddr;
38 char *uampath, *nlspath, *fqdn;
39 char *pidfile, *defaultvol, *systemvol;
40 char *guest, *loginmesg, *keyfile, *passwdfile;
44 #define AFPOBJ_TMPSIZ (MAXPATHLEN)
45 typedef struct AFPObj {
47 unsigned long servernum;
48 void *handle, *config;
49 struct afp_options options;
50 char *Obj, *Type, *Zone;
51 char username[MACFILELEN + 1];
52 void (*logout)(void), (*exit)(int);
53 int (*reply)(void *, int);
54 int (*attention)(void *, AFPUserBytes);
55 /* to prevent confusion, only use these in afp_* calls */
56 char oldtmp[AFPOBJ_TMPSIZ + 1], newtmp[AFPOBJ_TMPSIZ + 1];
57 void *uam_cookie; /* cookie for uams */
60 extern int afp_version;
61 extern unsigned char nologin;
62 extern struct vol *volumes;
63 extern struct dir *curdir;
64 extern char getwdbuf[];
66 extern void afp_options_init __P((struct afp_options *));
67 extern int afp_options_parse __P((int, char **, struct afp_options *));
68 extern int afp_options_parseline __P((char *, struct afp_options *));
69 extern void afp_options_free __P((struct afp_options *,
70 const struct afp_options *));
71 extern void setmessage __P((const char *));
72 extern void readmessage __P((void));
75 extern void initline __P((int, char *));
76 extern int parseline __P((int, char *));
79 extern void afp_over_asp __P((AFPObj *));
81 extern void afp_over_dsi __P((AFPObj *));
83 #endif /* globals.h */