X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3e170ce000f1506b7b5d2c5c7faec85ceabb573d..eee3565979933af707c711411001ba11fe406a3c:/bsd/sys/file_internal.h diff --git a/bsd/sys/file_internal.h b/bsd/sys/file_internal.h index 172aa3d04..60a47afa5 100644 --- a/bsd/sys/file_internal.h +++ b/bsd/sys/file_internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2014 Apple Inc. All rights reserved. + * Copyright (c) 2000-2016 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -75,6 +75,7 @@ #include #include #include +#include struct proc; struct uio; @@ -144,7 +145,8 @@ typedef enum { 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 */ @@ -185,7 +187,7 @@ struct fileglob { 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 @@ -229,7 +231,6 @@ int fp_getfpipe(struct proc *p, int fd, struct fileproc **resultfp, struct pipe 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); @@ -261,6 +262,8 @@ extern void fileproc_free(struct fileproc *fp); 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 */