/*
- * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#include <sys/lock.h>
#include <sys/file.h>
#include <sys/filedesc.h>
+#include <sys/guarded.h>
struct proc;
struct uio;
DTYPE_KQUEUE, /* kqueue */
DTYPE_PIPE, /* pipe */
DTYPE_FSEVENTS, /* fsevents */
- DTYPE_ATALK /* (obsolete) */
+ DTYPE_ATALK, /* (obsolete) */
+ DTYPE_NETPOLICY, /* networking policy */
} file_type_t;
/* defines for fg_lflags */
int (*fo_drain) (struct fileproc *fp, vfs_context_t ctx);
} *fg_ops;
off_t fg_offset;
- void *fg_data; /* vnode or socket or SHM or semaphore */
+ void *fg_data; /* vnode or socket or SHM or semaphore */
void *fg_vn_data; /* Per fd vnode data, used for directories */
lck_mtx_t fg_lock;
#if CONFIG_MACF
struct atalk;
int fp_getfatalk(struct proc *p, int fd, struct fileproc **resultfp, struct atalk **resultatalk);
struct vnode;
-int fp_getfvp(struct proc *p, int fd, struct fileproc **resultfp, struct vnode **resultvp);
int fp_getfvpandvid(struct proc *p, int fd, struct fileproc **resultfp, struct vnode **resultvp, uint32_t * vidp);
struct socket;
int fp_getfsock(struct proc *p, int fd, struct fileproc **resultfp, struct socket **results);
extern void guarded_fileproc_free(struct fileproc *fp);
extern void fg_vn_data_free(void *fgvndata);
extern int nameiat(struct nameidata *ndp, int dirfd);
+extern int falloc_guarded(struct proc *p, struct fileproc **fp, int *fd,
+ vfs_context_t ctx, const guardid_t *guard, u_int attrs);
__END_DECLS
#endif /* __APPLE_API_UNSTABLE */