/*
- * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2008 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#ifdef KERNEL
#include <sys/queue.h>
#include <sys/kernel_types.h>
+#include <sys/uio.h>
#endif
-#pragma pack(4)
+#ifndef _KAUTH_CRED_T
+#define _KAUTH_CRED_T
+struct ucred;
+typedef struct ucred *kauth_cred_t;
+struct posix_cred;
+typedef struct posix_cred *posix_cred_t;
+#endif /* !_KAUTH_CRED_T */
-/* for the compat sake; */
-struct extern_file {
- LIST_ENTRY(extern_file) f_list; /* list of active files */
- short f_flag; /* see fcntl.h */
- short f_type; /* descriptor type */
- short f_count; /* reference count */
- short f_msgcount; /* references from message queue */
- struct ucred *f_cred; /* credentials associated with descriptor */
- void * f_ops;
- off_t f_offset;
- caddr_t f_data; /* vnode or socket or SHM or semaphore */
-};
-
-#pragma pack()
-
-#ifdef KERNEL
__BEGIN_DECLS
+#ifdef KERNEL
int file_socket(int, socket_t *);
int file_vnode(int, vnode_t *);
+int file_vnode_withvid(int, vnode_t *, uint32_t *);
int file_flags(int, int *);
int file_drop(int);
-__END_DECLS
-
#endif /* KERNEL */
+#ifdef KERNEL_PRIVATE
+int fd_rdwr(int fd, enum uio_rw, uint64_t base, int64_t len, enum uio_seg,
+ off_t offset, int io_flg, int64_t *aresid);
+struct fileproc;
+struct vnode;
+int fp_getfvp(struct proc *p, int fd, struct fileproc **resultfp, struct vnode **resultvp);
+#endif /* KERNEL_PRIVATE */
+__END_DECLS
#endif /* !_SYS_FILE_H_ */