2 * $Id: globals.h,v 1.18.2.2.2.4 2004-06-09 02:07:15 bfernhomberg 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)
41 #define OPTION_ANNOUNCESSH (1 << 6)
44 /* set up a structure for this */
45 typedef struct uidgidset_t {
49 #endif /* FORCE_UIDGID */
51 /* a couple of these options could get stuck in unions to save
53 struct afp_volume_name {
61 int connections, port, transports, tickleval, timeout, server_notif, flags;
62 unsigned char passwdbits, passwdminlen, loginmaxfail;
63 u_int32_t server_quantum;
64 char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *configfile;
65 struct at_addr ddpaddr;
68 struct afp_volume_name defaultvol, systemvol, uservol;
70 char *guest, *loginmesg, *keyfile, *passwdfile;
74 char *k5service, *k5realm, *k5keytab;
75 char *unixcodepage,*maccodepage;
76 charset_t maccharset, unixcharset;
82 #endif /* ADMIN_GRP */
85 #define AFPOBJ_TMPSIZ (MAXPATHLEN)
86 typedef struct AFPObj {
88 unsigned long servernum;
89 void *handle, *config;
90 struct afp_options options;
91 char *Obj, *Type, *Zone;
92 char username[MACFILELEN + 1];
93 void (*logout)(void), (*exit)(int);
94 int (*reply)(void *, int);
95 int (*attention)(void *, AFPUserBytes);
97 /* to prevent confusion, only use these in afp_* calls */
98 char oldtmp[AFPOBJ_TMPSIZ + 1], newtmp[AFPOBJ_TMPSIZ + 1];
99 void *uam_cookie; /* cookie for uams */
107 extern int afp_version;
108 extern int afp_errno;
109 extern unsigned char nologin;
110 extern struct dir *curdir;
111 extern char getwdbuf[];
114 extern char Cnid_srv[MAXHOSTNAMELEN + 1];
115 extern int Cnid_port;
117 extern int get_afp_errno __P((const int param));
118 extern void afp_options_init __P((struct afp_options *));
119 extern int afp_options_parse __P((int, char **, struct afp_options *));
120 extern int afp_options_parseline __P((char *, struct afp_options *));
121 extern void afp_options_free __P((struct afp_options *,
122 const struct afp_options *));
123 extern void setmessage __P((const char *));
124 extern void readmessage __P((AFPObj *));
127 extern void initline __P((int, char *));
128 extern int parseline __P((int, char *));
131 const char *AfpNum2name __P((int ));
134 extern void afp_over_asp __P((AFPObj *));
136 extern void afp_over_dsi __P((AFPObj *));
138 #endif /* globals.h */