2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #ifndef __AFS_SYSINCLUDESH__
11 #define __AFS_SYSINCLUDESH__ 1
14 #if !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_USR_FBSD_ENV) /* must be included after KERNEL undef'd */
23 #if !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_USR_FBSD_ENV) /* must be included after KERNEL undef'd */
26 #include <sys/types.h>
31 #ifdef AFS_USR_SUN5_ENV
33 #include <sys/param.h>
34 #include <sys/socket.h>
36 #include <sys/sockio.h>
39 #include <sys/fcntl.h>
40 #include <netinet/in.h>
42 #include <arpa/inet.h>
43 #endif /* AFS_USR_SUN5_ENV */
46 #ifdef AFS_USR_AIX_ENV
47 #include <sys/param.h>
48 #include <sys/socket.h>
51 #include <netinet/in.h>
52 #include <sys/stropts.h>
54 #include <sys/timers.h>
55 #include <arpa/inet.h>
56 #endif /* AFS_USR_AIX_ENV */
58 #ifdef AFS_USR_SGI_ENV
59 #include <sys/param.h>
60 #include <sys/socket.h>
62 #include <sys/sockio.h>
65 #include <sys/fcntl.h>
66 #include <netinet/in.h>
68 #include <arpa/inet.h>
69 #endif /* AFS_USR_SGI_ENV */
71 #ifdef AFS_USR_HPUX_ENV
72 #include <sys/param.h>
73 #include <sys/socket.h>
77 #include <sys/fcntl.h>
78 #include <netinet/in.h>
80 #include <arpa/inet.h>
81 #endif /* AFS_USR_HPUX_ENV */
83 #ifdef AFS_USR_OSF_ENV
86 #define AFS_USR_UNDEF_KERNEL_ENV 1
88 #include <sys/param.h>
89 #include <sys/socket.h>
92 #include <sys/ioctl.h>
94 #include <sys/fcntl.h>
95 #include <netinet/in.h>
97 #include <arpa/inet.h>
98 #endif /* AFS_USR_OSF_ENV */
100 #ifdef AFS_USR_LINUX22_ENV
101 #include <sys/ioctl.h> /* _IOW() */
102 #include <sys/uio.h> /* struct iovec */
103 #include <sys/time.h> /* struct timeval */
104 #include <sys/param.h>
105 #include <sys/types.h>
106 #include <sys/socket.h>
108 #include <sys/file.h>
109 #include <sys/stat.h>
110 #include <sys/fcntl.h>
111 #include <netinet/in.h>
113 #include <arpa/inet.h>
115 #endif /* AFS_USR_LINUX22_ENV */
117 #if defined(AFS_USR_DARWIN_ENV) || defined(AFS_USR_FBSD_ENV)
120 #define AFS_USR_UNDEF_KERNEL_ENV 1
124 #include <sys/param.h>
125 #include <sys/types.h>
126 #include <sys/socket.h>
128 #include <sys/file.h>
129 #include <sys/ioctl.h>
130 #include <sys/stat.h>
131 #include <sys/fcntl.h>
133 #include <netinet/in.h>
135 #include <arpa/inet.h>
140 #define O_SYNC O_FSYNC
142 #endif /* AFS_USR_DARWIN_ENV || AFS_USR_FBSD_ENV */
144 #ifdef HAVE_SYS_BITYPES_H
145 #include <sys/bitypes.h>
147 #ifdef HAVE_SYS_STATFS_H
148 #include <sys/statfs.h>
150 #ifdef HAVE_SYS_STATVFS_H
151 #include <sys/statvfs.h>
154 #ifndef HAVE_FSBLKCNT_T
155 typedef unsigned int fsblkcnt_t;
158 #include <arpa/nameser.h>
159 #ifdef HAVE_ARPA_NAMESER_COMPAT_H
160 #include <arpa/nameser_compat.h>
164 /* glibc 2.2 has pthread_attr_setstacksize */
165 #if (defined(AFS_LINUX22_ENV) && !defined(AFS_USR_LINUX22_ENV)) || (defined(AFS_USR_LINUX22_ENV) && (__GLIBC_MINOR__ < 2))
166 #define pthread_attr_setstacksize(a,b) 0
169 #include <sys/stat.h> /* afs_usrops.h uses struct stat in prototypes */
171 #ifdef NETSCAPE_NSAPI
175 #else /* NETSCAPE_NSAPI */
179 #endif /* NETSCAPE_NSAPI */
181 #ifdef AFS_USR_UNDEF_KERNEL_ENV
182 #undef AFS_USR_UNDEF_KERNEL_ENV
187 * User space versions of kernel data structures.
191 #define MAXNAMLEN 512
195 * This file contains data types and definitions for running
196 * the AFS client in user space. Kernel data structures
197 * are renamed from XXXX to usr_XXXX.
202 #ifdef AFS_USR_SGI_ENV
204 #endif /* AFS_USR_SGI_ENV */
206 #if defined(AFS_USR_DARWIN_ENV) || defined(AFS_USR_FBSD_ENV)
211 #define mount usr_mount
214 #define fileops usr_fileops
215 #define vnodeops usr_vnodeops
216 #define vnode usr_vnode
217 #define inode usr_inode
218 #define whymountroot_t usr_whymountroot_t
219 #define vfsops usr_vfsops
221 #define vattr usr_vattr
223 #define statfs usr_statfs
224 /* #define ucred usr_ucred */
225 #define user usr_user
226 /* #define proc usr_proc */
227 #define file usr_file
228 #define dirent usr_dirent
229 #define flock usr_flock
231 #define sysent usr_sysent
232 #define in_ifaddr usr_in_ifaddr
233 #define ifaddr usr_ifaddr
234 #define ifnet usr_ifnet
235 #define socket usr_socket
236 #define crget usr_crget
237 #define crcopy usr_crcopy
238 #define crhold usr_crhold
239 #define crfree usr_crfree
240 #define vtype_t usr_vtype_t
241 #define vcexcl usr_vcexcl
242 #define m_free usr_m_free
243 #define m_freem usr_m_freem
244 #define m_adj usr_m_adj
245 #define m_pullup usr_m_pullup
246 #define uiomove usr_uiomove
247 #define EXCL usr_EXCL
248 #define NONEXCL usr_NONEXCL
249 #define uio_rw usr_uio_rw
253 #define ino_t usr_ino_t
254 #define offset_t usr_offset_t
255 #define getpid() usr_getpid()
256 #define setpag(A,B,C,D) usr_setpag((A),(B),(C),(D))
257 #define osi_getpid() afs_pointer_to_int(usr_thread_self())
263 enum usr_vcexcl { usr_NONEXCL, usr_EXCL };
264 typedef long offset_t;
265 #ifdef AFS_USR_OSF_ENV
266 typedef int usr_ino_t;
267 #else /* AFS_USR_OSF_ENV */
268 typedef long usr_ino_t;
269 #endif /* AFS_USR_OSF_ENV */
271 #if defined(AFS_USR_AIX_ENV) || defined(AFS_USR_SGI_ENV)
272 #define SYS_setgroups 101
275 #define ioctl() usr_ioctl()
277 #define label_t jmp_buf
283 #define VFSTOM(VP) ((struct usr_mount *)(VP)->vfs_mount)
313 #define VINACT 0x0001
315 #define VNOMAP 0x0004
317 #define VSHARE 0x0010
320 #define VWASMAP 0x0080
321 #define VXLOCK 0x0100
365 typedef int usr_vtype_t;
371 #define VOP_RDWR afs_osi_VOP_RDWR
387 #define DTYPE_VNODE 1
436 #define INOACC 0x0010
437 #define IMODTIME 0x0020
440 #define IFASTSYMLNK 0x0100
441 #define IMODACC 0x0200
442 #define IATTCHG 0x0400
443 #define IBDWRITE 0x0800
476 #define IFIFO 0010000
477 #define IFCHR 0020000
478 #define IFDIR 0040000
479 #define IFBLK 0060000
480 #define IFREG 0100000
481 #define IFLNK 0120000
482 #define IFSHAD 0130000
483 #define IFSOCK 0140000
544 #define I_FREE 0x00000001
545 #define I_DIR 0x00000002
546 #define I_IBLK 0x00000004
547 #define I_CHEAP 0x00000008
548 #define I_SHAD 0x00000010
549 #define I_QUOTA 0x00000020
558 #define VTOI(VP) ((struct usr_inode *)(VP)->v_data)
559 #define ITOV(IP) ((struct usr_vnode *)&(IP)->i_vnode)
577 #ifdef ROOT_FRONTMOUNT
578 #undef ROOT_FRONTMOUNT
580 #ifdef ROOT_BACKMOUNT
581 #undef ROOT_BACKMOUNT
584 #define ROOT_INIT 0x0001
585 #define ROOT_REMOUNT 0X0002
586 #define ROOT_UNMOUNT 0x0003
587 #define ROOT_FRONTMOUNT 0x0004
588 #define ROOT_BACKMOUNT 0x0005
630 #define VFS_STATFS(vfsp, sp) ((sp)->f_bsize=4096, 0)
651 #define FAPPEND 0x0100
652 #define IO_APPEND FAPPEND
654 #define IO_SYNC FSYNC
655 #define FTRUNC 0x0400
656 #define FWRITE 0x0800
677 #define F_GETLK 0x0001
678 #define F_RDLCK 0x0002
679 #define F_SETLK 0x0003
680 #define F_SETLKW 0x0004
681 #define F_UNLCK 0x0005
682 #define F_WRLCK 0x0006
697 #define LOCK_SH F_RDLCK
698 #define LOCK_UN F_UNLCK
699 #define LOCK_EX F_WRLCK
700 #define LOCK_NB 0x0007
709 #define FEXLOCK F_WRLCK
710 #define FSHLOCK F_RDLCK
718 enum usr_uio_rw { USR_UIO_READ, USR_UIO_WRITE };
727 #define UIO_READ 0x0000
728 #define UIO_WRITE 0x0001
737 #define UIO_USERSPACE 0x0000
738 #define UIO_SYSSPACE 0x0001
781 #define B_ASYNC 0x0002
782 #define B_DELWRI 0x0004
783 #define B_DIRTY 0x0008
784 #define B_DONE 0x0010
785 #define B_ERROR 0x0020
786 #define B_FREE 0x0040
787 #define B_NOCACHE 0x0080
788 #define B_PFSTORE 0x0100
789 #define B_READ 0x0200
791 #define B_WANTED 0x0800
792 #define B_WRITE 0x1000
820 #define MMAXOFF 16384
826 #define IA_SIN(IA) (&(IA)->ia_addr)
838 #define mtod(m,t) ((t)((m)->m_data))
845 #define panic(S) do{fprintf(stderr, "%s", S);assert(0);}while(0)
846 #define abort() assert(0)
847 #define usr_assert(A) assert(A)
849 #ifdef NETSCAPE_NSAPI
852 * All CONDVARs created with the same CRITICAL end up being the
853 * same CONDVAR, not a new one. If we want to use more than
854 * one usr_cond_t with the same usr_mutex_t, then we need a CRITICAL
855 * for each CONDVAR, otherwise we cannot know which thread we are
856 * waking when we do the signal.
864 #define usr_mutex_t CRITICAL
865 #define usr_thread_t SYS_THREAD
866 #define usr_key_t int
868 #define usr_mutex_init(A) (*(A)=crit_init(), 0)
869 #define usr_mutex_destroy(A) (crit_terminate(*(A)), 0)
870 #define usr_mutex_lock(A) crit_enter(*(A))
871 #define usr_mutex_trylock(A) (crit_enter(*(A)),1)
872 #define usr_mutex_unlock(A) crit_exit(*(A))
874 #define usr_cond_init(A) \
876 (A)->lock = crit_init(), \
877 (A)->cond = condvar_init((A)->lock), 0)
879 #define usr_cond_destroy(A) \
880 (condvar_terminate((A)->cond), \
881 crit_terminate((A)->lock), 0)
883 #define usr_cond_signal(A) \
885 crit_enter((A)->lock); \
886 if ((A)->waiters != 0) { \
887 condvar_notify((A)->cond);\
890 crit_exit((A)->lock); \
893 #define usr_cond_broadcast(A) \
895 crit_enter((A)->lock); \
896 while ((A)->waiters != 0) { \
897 condvar_notify((A)->cond); \
900 crit_exit((A)->lock); \
903 #define usr_cond_wait(A,B) \
904 (crit_enter((A)->lock), \
907 condvar_wait((A)->cond), \
908 crit_exit((A)->lock), \
911 #define usr_thread_create(A,B,C) \
912 ((*(A)=systhread_start(SYSTHREAD_DEFAULT_PRIORITY, \
913 0,B,C))==SYS_THREAD_ERROR)
914 #define usr_thread_detach(A) 0
915 #define usr_keycreate(A,B) (*(A)=systhread_newkey(),0)
916 #define usr_setspecific(A,B) (systhread_setdata(A,B),0)
917 #define usr_getspecific(A,B) (*(B)=systhread_getdata(A),0)
918 #define usr_thread_self() systhread_current()
919 #ifdef AFS_USR_SUN5_ENV
920 #define usr_thread_sleep(A) \
921 poll(0, 0, (A)->tv_sec*1000+(A)->tv_nsec/1000000)
922 #else /* AFS_USR_SUN5_ENV */
923 #define usr_thread_sleep(A) \
924 systhread_sleep((A)->tv_sec*1000+(A)->tv_nsec/1000000)
925 #endif /* AFS_USR_SUN5_ENV */
927 #define uprintf printf
929 #define usr_getpid() (int)(usr_thread_self())
931 #define ISAFS_GLOCK() (usr_thread_self() == afs_global_owner)
933 #else /* NETSCAPE_NSAPI */
936 * Mutex and condition variable used to implement sleep
938 extern pthread_mutex_t usr_sleep_mutex;
939 extern pthread_cond_t usr_sleep_cond;
941 #define usr_cond_t pthread_cond_t
942 #define usr_mutex_t pthread_mutex_t
943 #define usr_thread_t pthread_t
944 #define usr_key_t pthread_key_t
946 #define usr_mutex_init(A) assert(pthread_mutex_init(A,NULL) == 0)
947 #define usr_mutex_destroy(A) assert(pthread_mutex_destroy(A) == 0)
948 #define usr_mutex_lock(A) assert(pthread_mutex_lock(A) == 0)
949 #define usr_mutex_trylock(A) ((pthread_mutex_trylock(A)==0)?1:0)
950 #define usr_mutex_unlock(A) assert(pthread_mutex_unlock(A) == 0)
951 #define usr_cond_init(A) assert(pthread_cond_init(A,NULL) == 0)
952 #define usr_cond_destroy(A) assert(pthread_cond_destroy(A) == 0)
953 #define usr_cond_signal(A) assert(pthread_cond_signal(A) == 0)
954 #define usr_cond_broadcast(A) assert(pthread_cond_broadcast(A) == 0)
955 #define usr_cond_wait(A,B) pthread_cond_wait(A,B)
956 #define usr_cond_timedwait(A,B,C) pthread_cond_timedwait(A,B,C)
958 #define usr_thread_create(A,B,C) \
960 pthread_attr_t attr; \
961 assert(pthread_attr_init(&attr) == 0); \
962 assert(pthread_attr_setstacksize(&attr, 124288) == 0); \
963 assert(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0); \
964 assert(pthread_create((A), &attr, (B), (void *)(C)) == 0); \
965 assert(pthread_attr_destroy(&attr) == 0); \
967 #define usr_thread_detach(A) pthread_detach(A)
968 #define usr_keycreate(A,B) assert(pthread_key_create(A,B) == 0)
969 #define usr_setspecific(A,B) pthread_setspecific(A,B)
970 #define usr_getspecific(A,B) (*(B)=pthread_getspecific(A),0)
971 #define usr_thread_self() pthread_self()
972 #define usr_thread_sleep(A) \
974 struct timespec _sleep_ts; \
975 struct timeval _sleep_tv; \
976 gettimeofday(&_sleep_tv, NULL); \
978 _sleep_ts.tv_sec += _sleep_tv.tv_sec; \
979 _sleep_ts.tv_nsec += _sleep_tv.tv_usec * 1000; \
980 if (_sleep_ts.tv_nsec >= 1000000000) { \
981 _sleep_ts.tv_sec += 1; \
982 _sleep_ts.tv_nsec -= 1000000000; \
984 assert(pthread_mutex_lock(&usr_sleep_mutex) == 0); \
985 pthread_cond_timedwait(&usr_sleep_cond, &usr_sleep_mutex, &_sleep_ts); \
986 assert(pthread_mutex_unlock(&usr_sleep_mutex) == 0); \
989 #define uprintf printf
991 #define usr_getpid() (int)(usr_thread_self())
995 #define ISAFS_GLOCK() (usr_thread_self() == afs_global_owner)
997 #endif /* NETSCAPE_NSAPI */
999 #define copyin(A,B,C) (memcpy((void *)B,(void *)A,C), 0)
1000 #define copyout(A,B,C) (memcpy((void *)B,(void *)A,C), 0)
1001 #define copyinstr(A,B,C,D) (strncpy(B,A,C),(*D)=strlen(B), 0)
1002 #define copyoutstr(A,B,C,D) (strncpy(B,A,C),(*D)=strlen(B), 0)
1004 #define vattr_null(A) usr_vattr_null(A)
1006 #define VN_HOLD(vp) \
1011 #define VN_RELE(vp) \
1013 AFS_ASSERT_GLOCK(); \
1014 usr_assert((vp)->v_count > 0); \
1015 if (--((vp)->v_count) == 0) \
1016 afs_inactive(VTOAFS(vp), u.u_cred); \
1020 unsigned long f_type;
1021 unsigned long f_bsize;
1022 unsigned long f_frsize;
1023 unsigned long f_ffree;
1024 unsigned long f_favail;
1026 unsigned long val[2];
1028 char f_basetype[FSTYPSZ];
1029 unsigned long f_flag;
1030 unsigned long f_namemax;
1031 unsigned long f_blocks;
1032 unsigned long f_bfree;
1033 unsigned long f_bavail;
1034 unsigned long f_files;
1037 #define ATTR_MODE (1 << 0)
1038 #define ATTR_UID (1 << 1)
1039 #define ATTR_GID (1 << 2)
1040 #define ATTR_MTIME (1 << 3)
1041 #define ATTR_SIZE (1 << 4)
1044 int va_mask; /* bitmask of ATTR_* values above */
1045 usr_vtype_t va_type;
1053 struct timeval va_atime;
1054 struct timeval va_mtime;
1055 struct timeval va_ctime;
1057 unsigned long va_blocksize;
1058 fsblkcnt_t va_blocks;
1059 unsigned long va_vcode;
1085 #define VWRITE 00200
1090 unsigned short v_flag;
1091 unsigned long v_count;
1092 struct usr_vnodeops *v_op;
1093 struct usr_vfs *v_vfsp;
1095 unsigned long v_rdev;
1100 daddr_t i_db[NDADDR];
1101 struct usr_vnode *i_devvp;
1102 unsigned long i_dev;
1104 struct usr_inode *i_freef;
1105 struct usr_inode **i_freeb;
1107 daddr_t i_ib[NIADDR];
1108 unsigned short i_mode;
1110 unsigned long i_number;
1113 struct usr_vnode i_vnode;
1115 unsigned long ic_spare[4];
1119 struct usr_fileops {
1120 int (*vno_rw) (void);
1121 int (*vno_ioctl) (void);
1122 int (*vno_select) (void);
1123 int (*vno_closex) (void);
1127 unsigned short f_flag;
1129 struct usr_ucred *f_cred;
1130 struct usr_fileops *f_ops;
1135 extern struct usr_file *getf(int);
1145 unsigned short fid_len;
1146 unsigned short fid_reserved;
1147 char fid_data[MAXFIDSZ];
1159 extern struct usr_ucred *usr_crget(void);
1160 extern struct usr_ucred *usr_crcopy(struct usr_ucred *);
1161 extern int usr_crhold(struct usr_ucred *);
1162 extern int usr_crfree(struct usr_ucred *);
1163 extern struct usr_ucred *afs_global_ucredp;
1166 unsigned long p_flag;
1169 struct usr_ucred *p_ucred;
1189 struct iovec *uio_iov;
1210 struct usr_fs *b_fs;
1213 unsigned int b_resid;
1214 struct usr_vnode *b_vp;
1222 #define NDIRSIZ_LEN(len) \
1223 ((sizeof (struct usr_dirent)+4 - (MAXNAMLEN+1)) + (((len)+1 + 3) &~ 3))
1226 #define afs_ucred_t struct usr_ucred
1227 #define AFS_FLOCK flock
1230 struct usr_vnodeops {
1231 int (*vn_open) (struct vcache **, afs_int32, afs_ucred_t *);
1232 int (*vn_close) (struct vcache *, afs_int32, afs_ucred_t *);
1233 int (*vn_rdwr) (struct usr_vnode *avc, struct usr_uio *uio,
1234 int rw, int io, struct usr_ucred *cred);
1235 int (*vn_ioctl) (void);
1236 int (*vn_select) (void);
1237 int (*vn_getattr) (struct vcache *avc, struct vattr *, afs_ucred_t *);
1238 int (*vn_setattr) (struct vcache *avc, struct vattr *, afs_ucred_t *);
1239 int (*vn_access) (struct vcache *avc, afs_int32, afs_ucred_t *);
1240 int (*vn_lookup) (struct vcache *adp, char *, struct vcache **,
1241 afs_ucred_t *, int);
1242 int (*vn_create) (struct vcache *adp, char *, struct vattr *,
1243 enum vcexcl, int, struct vcache **, afs_ucred_t *);
1244 int (*vn_remove) (struct vcache *adp, char *, afs_ucred_t *);
1245 int (*vn_link) (struct vcache *avc, struct vcache *adp, char *,
1247 int (*vn_rename) (struct vcache *aodp, char *, struct vcache *, char *,
1249 int (*vn_mkdir) (struct vcache *adp, char *, struct vattr *,
1250 struct vcache **, afs_ucred_t *);
1251 int (*vn_rmdir) (struct vcache *adp, char *, afs_ucred_t *);
1252 int (*vn_readdir) (struct vcache *avc, struct uio *, afs_ucred_t *);
1253 int (*vn_symlink) (struct vcache *adp, char *, struct vattr *, char *,
1255 int (*vn_readlink) (struct vcache *avc, struct uio *, afs_ucred_t *);
1256 int (*vn_fsync) (struct vcache *avc, afs_ucred_t *);
1257 int (*vn_inactive) (struct vcache *avc, afs_ucred_t *acred);
1258 int (*vn_bmap) (void);
1259 int (*vn_strategy) (void);
1260 int (*vn_bread) (void);
1261 int (*vn_brelse) (void);
1262 int (*vn_lockctl) (struct vcache *, struct AFS_FLOCK *, int,
1264 int (*vn_fid) (struct vcache *avc, struct fid **);
1273 unsigned long m_dev;
1274 struct usr_inode *m_inodp;
1275 struct usr_buf *m_bufp;
1276 struct usr_vnode *m_mount;
1278 extern struct usr_mount *getmp(unsigned long);
1280 typedef long usr_whymountroot_t;
1283 int (*vfs_mount) (struct vfs *, char *, void *);
1284 int (*vfs_unmount) (struct vfs *);
1285 int (*vfs_root) (struct vfs *, struct vnode **);
1286 int (*vfs_statfs) (struct vfs *, struct statfs *);
1287 int (*vfs_mountroot) (struct vfs *);
1288 int (*vfs_swapvp) (void);
1292 struct usr_vnode *vfs_vnodecovered;
1294 unsigned long val[2];
1297 unsigned long vfs_bsize;
1298 struct usr_mount *vfs_mount;
1299 struct usr_vfsops *vfs_op;
1304 int (*sy_call) (void);
1306 extern struct usr_sysent usr_sysent[];
1309 struct usr_ifnet *if_next;
1313 struct usr_ifaddr *if_addrlist;
1315 extern struct usr_ifnet *usr_ifnet;
1318 struct usr_ifaddr *ifa_next;
1319 struct usr_ifnet *ifa_ifp;
1320 struct sockaddr ifa_addr;
1330 struct usr_in_ifaddr {
1331 struct usr_in_ifaddr *ia_next;
1332 struct usr_ifnet *ia_ifp;
1333 struct sockaddr_in ia_addr;
1334 unsigned long ia_net;
1335 unsigned long ia_netmask;
1336 unsigned long ia_subnet;
1337 unsigned long ia_subnetmask;
1338 struct in_addr ia_netbroadcast;
1340 extern struct usr_in_ifaddr *usr_in_ifaddr;
1342 extern usr_key_t afs_global_u_key; /* for per thread authentication */
1344 #if defined(AFS_USR_OSF_ENV)
1350 #endif /* UKERNEL */
1353 #if defined(AFS_USR_OSF_ENV)
1354 unsigned int d_fileno;
1355 #else /* AFS_OFS_ENV || AFS_USR_OSF_ENV */
1356 unsigned long d_fileno;
1357 #endif /* AFS_OFS_ENV || AFS_USR_OSF_ENV */
1358 unsigned short d_reclen;
1359 unsigned short d_namlen;
1363 #define NGROUPS NGROUPS_MAX
1366 #define NOGROUP (-1)
1373 unsigned long cr_ref;
1381 gid_t cr_groups[NGROUPS];
1394 unsigned long u_expiration;
1395 struct usr_proc *u_procp;
1396 struct usr_ucred *u_cred;
1401 #define u_rval1 u_r.r_val1
1402 #define u (*(get_user_struct()))
1404 extern struct usr_user *get_user_struct(void);
1406 #define USR_DIRSIZE 2048
1409 unsigned long d_ino;
1410 unsigned long d_off;
1411 unsigned short d_reclen;
1412 char d_name[MAXNAMLEN + 1];
1423 extern unsigned short usr_rx_port;
1425 #define AFS_LOOKUP_NOEVAL 1
1427 #endif /* __AFS_SYSINCLUDESH__ so idempotent */