2 * $Id: globals.h,v 1.21 2005-04-28 20:49:43 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>
27 #include <atalk/uam.h>
36 #define OPTION_DEBUG (1 << 0)
37 #define OPTION_USERVOLFIRST (1 << 1)
38 #define OPTION_NOUSERVOL (1 << 2)
39 #define OPTION_PROXY (1 << 3)
40 #define OPTION_CUSTOMICON (1 << 4)
41 #define OPTION_NOSLP (1 << 5)
42 #define OPTION_ANNOUNCESSH (1 << 6)
45 /* set up a structure for this */
46 typedef struct uidgidset_t {
50 #endif /* FORCE_UIDGID */
52 /* a couple of these options could get stuck in unions to save
54 struct afp_volume_name {
62 int connections, port, transports, tickleval, timeout, server_notif, flags;
63 unsigned char passwdbits, passwdminlen, loginmaxfail;
64 u_int32_t server_quantum;
65 char hostname[MAXHOSTNAMELEN + 1], *server, *ipaddr, *configfile;
66 struct at_addr ddpaddr;
69 struct afp_volume_name defaultvol, systemvol, uservol;
72 char *guest, *loginmesg, *keyfile, *passwdfile;
76 char *k5service, *k5realm, *k5keytab;
77 char *unixcodepage,*maccodepage;
78 charset_t maccharset, unixcharset;
84 #endif /* ADMIN_GRP */
87 #define AFPOBJ_TMPSIZ (MAXPATHLEN)
88 typedef struct AFPObj {
90 unsigned long servernum;
91 void *handle, *config;
92 struct afp_options options;
93 char *Obj, *Type, *Zone;
94 char username[MACFILELEN + 1];
95 void (*logout)(void), (*exit)(int);
96 int (*reply)(void *, int);
97 int (*attention)(void *, AFPUserBytes);
99 /* to prevent confusion, only use these in afp_* calls */
100 char oldtmp[AFPOBJ_TMPSIZ + 1], newtmp[AFPOBJ_TMPSIZ + 1];
101 void *uam_cookie; /* cookie for uams */
102 struct session_info sinfo;
110 extern int afp_version;
111 extern int afp_errno;
112 extern unsigned char nologin;
113 extern struct dir *curdir;
114 extern char getwdbuf[];
117 extern char Cnid_srv[MAXHOSTNAMELEN + 1];
118 extern int Cnid_port;
120 extern int get_afp_errno __P((const int param));
121 extern void afp_options_init __P((struct afp_options *));
122 extern int afp_options_parse __P((int, char **, struct afp_options *));
123 extern int afp_options_parseline __P((char *, struct afp_options *));
124 extern void afp_options_free __P((struct afp_options *,
125 const struct afp_options *));
126 extern void setmessage __P((const char *));
127 extern void readmessage __P((AFPObj *));
130 extern void initline __P((int, char *));
131 extern int parseline __P((int, char *));
134 const char *AfpNum2name __P((int ));
137 extern void afp_over_asp __P((AFPObj *));
139 extern void afp_over_dsi __P((AFPObj *));
141 #endif /* globals.h */