2 * $Id: globals.h,v 1.18.2.2.2.5 2004-06-15 00:35:06 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;
71 char *guest, *loginmesg, *keyfile, *passwdfile;
75 char *k5service, *k5realm, *k5keytab;
76 char *unixcodepage,*maccodepage;
77 charset_t maccharset, unixcharset;
83 #endif /* ADMIN_GRP */
86 #define AFPOBJ_TMPSIZ (MAXPATHLEN)
87 typedef struct AFPObj {
89 unsigned long servernum;
90 void *handle, *config;
91 struct afp_options options;
92 char *Obj, *Type, *Zone;
93 char username[MACFILELEN + 1];
94 void (*logout)(void), (*exit)(int);
95 int (*reply)(void *, int);
96 int (*attention)(void *, AFPUserBytes);
98 /* to prevent confusion, only use these in afp_* calls */
99 char oldtmp[AFPOBJ_TMPSIZ + 1], newtmp[AFPOBJ_TMPSIZ + 1];
100 void *uam_cookie; /* cookie for uams */
101 struct session_info sinfo;
109 extern int afp_version;
110 extern int afp_errno;
111 extern unsigned char nologin;
112 extern struct dir *curdir;
113 extern char getwdbuf[];
116 extern char Cnid_srv[MAXHOSTNAMELEN + 1];
117 extern int Cnid_port;
119 extern int get_afp_errno __P((const int param));
120 extern void afp_options_init __P((struct afp_options *));
121 extern int afp_options_parse __P((int, char **, struct afp_options *));
122 extern int afp_options_parseline __P((char *, struct afp_options *));
123 extern void afp_options_free __P((struct afp_options *,
124 const struct afp_options *));
125 extern void setmessage __P((const char *));
126 extern void readmessage __P((AFPObj *));
129 extern void initline __P((int, char *));
130 extern int parseline __P((int, char *));
133 const char *AfpNum2name __P((int ));
136 extern void afp_over_asp __P((AFPObj *));
138 extern void afp_over_dsi __P((AFPObj *));
140 #endif /* globals.h */