Searched refs:fdp (Results 1 - 25 of 92) sorted by relevance

1234

/freebsd-current/sbin/ipf/libipf/
H A Dprint_toif.c14 print_toif(int family, char *tag, char *base, frdest_t *fdp) argument
16 switch (fdp->fd_type)
19 PRINTF("%s %s%s", tag, base + fdp->fd_name,
20 (fdp->fd_ptr || (long)fdp->fd_ptr == -1) ? "" : "(!)");
23 if (IP6_NOTZERO(&fdp->fd_ip6)) {
26 inet_ntop(AF_INET6, &fdp->fd_ip6, ipv6addr,
27 sizeof(fdp->fd_ip6));
32 if (fdp->fd_ip.s_addr)
33 PRINTF(":%s", inet_ntoa(fdp
[all...]
/freebsd-current/lib/libcasper/libcasper/
H A Dlibcasper_impl.c49 fd_fix_environment(int *fdp) argument
53 if (*fdp > STDERR_FILENO)
60 while (*fdp <= STDERR_FILENO) {
61 nfd = dup(*fdp);
64 if (dup2(nullfd, *fdp) == -1)
66 *fdp = nfd;
H A Dlibcasper_impl.h45 void fd_fix_environment(int *fdp);
/freebsd-current/lib/libc/sys/
H A Dpdfork.c38 pdfork(int *fdp, int flags) argument
40 return (INTERPOS_SYS(pdfork, fdp, flags));
/freebsd-current/sys/kern/
H A Dsys_capability.c222 cap_rights(struct filedesc *fdp, int fd) argument
225 return (cap_rights_fde(&fdp->fd_ofiles[fd]));
231 struct filedesc *fdp; local
236 fdp = td->td_proc->p_fd;
237 FILEDESC_XLOCK(fdp);
238 fdep = fdeget_noref(fdp, fd);
240 FILEDESC_XUNLOCK(fdp);
244 error = _cap_check(cap_rights(fdp, fd), rights, CAPFAIL_INCREASE);
257 FILEDESC_XUNLOCK(fdp);
311 struct filedesc *fdp; local
356 cap_ioctl_check(struct filedesc *fdp, int fd, u_long cmd) argument
417 struct filedesc *fdp; local
486 struct filedesc *fdp; local
563 cap_fcntl_check(struct filedesc *fdp, int fd, int cmd) argument
575 struct filedesc *fdp; local
614 struct filedesc *fdp; local
[all...]
H A Dkern_descrip.c104 static int closefp(struct filedesc *fdp, int fd, struct file *fp,
108 struct filedesc *fdp, int flags);
109 static int fd_first_free(struct filedesc *fdp, int low, int size);
110 static void fdgrowtable(struct filedesc *fdp, int nfd);
111 static void fdgrowtable_exp(struct filedesc *fdp, int nfd);
112 static void fdunused(struct filedesc *fdp, int fd);
113 static void fdused(struct filedesc *fdp, int fd);
154 #define FILEDESC_FOREACH_FDE(fdp, _iterator, _fde) \
155 struct filedesc *_fdp = (fdp); \
160 #define FILEDESC_FOREACH_FP(fdp, _iterato
205 fd_first_free(struct filedesc *fdp, int low, int size) argument
234 fdlastfile_single(struct filedesc *fdp) argument
247 fdlastfile(struct filedesc *fdp) argument
255 fdisused(struct filedesc *fdp, int fd) argument
268 fdused_init(struct filedesc *fdp, int fd) argument
277 fdused(struct filedesc *fdp, int fd) argument
291 fdunused(struct filedesc *fdp, int fd) argument
318 fdfree(struct filedesc *fdp, int fd) argument
486 struct filedesc *fdp; local
933 struct filedesc *fdp; local
1290 closefp_impl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, bool audit) argument
1331 closefp_hl(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, bool holdleaders, bool audit) argument
1365 closefp(struct filedesc *fdp, int fd, struct file *fp, struct thread *td, bool holdleaders, bool audit) argument
1397 struct filedesc *fdp; local
1416 struct filedesc *fdp; local
1442 struct filedesc *fdp; local
1874 fdgrowtable_exp(struct filedesc *fdp, int nfd) argument
1890 fdgrowtable(struct filedesc *fdp, int nfd) argument
1992 struct filedesc *fdp = p->p_fd; local
2050 struct filedesc *fdp = p->p_fd; local
2152 _finstall(struct filedesc *fdp, struct file *fp, int fd, int flags, struct filecaps *fcaps) argument
2181 struct filedesc *fdp = td->td_proc->p_fd; local
2287 struct filedesc *fdp; local
2309 fddrop(struct filedesc *fdp) argument
2347 fdshare(struct filedesc *fdp) argument
2405 fdcopy(struct filedesc *fdp) argument
2465 struct filedesc *fdp; local
2542 fdescfree_fds(struct thread *td, struct filedesc *fdp) argument
2583 struct filedesc *fdp; local
2657 struct filedesc *fdp; local
2691 struct filedesc *fdp = td->td_proc->p_fd; local
2708 struct filedesc *fdp; local
2738 struct filedesc *fdp; local
2780 struct filedesc *fdp; local
2880 fget_cap_noref(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp) argument
2916 struct filedesc *fdp = td->td_proc->p_fd; local
2968 struct filedesc *fdp; local
3003 struct filedesc *fdp; local
3070 struct filedesc *fdp; local
3186 struct filedesc *fdp; local
3242 struct filedesc *fdp; local
3285 struct filedesc *fdp; local
3351 fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, struct file **fpp) argument
3381 fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, struct file **fpp) argument
3739 dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode, int openerror, int *indxp) argument
3847 chroot_refuse_vdir_fds(struct filedesc *fdp) argument
3992 struct filedesc *fdp; local
4091 struct filedesc *fdp; local
4274 descrip_check_write_mp(struct filedesc *fdp, struct mount *mp) argument
4297 filedesc_to_leader_alloc(struct filedesc_to_leader *old, struct filedesc *fdp, struct proc *leader) argument
4323 filedesc_to_leader_share(struct filedesc_to_leader *fdtol, struct filedesc *fdp) argument
4335 struct filedesc *fdp; local
4369 struct filedesc *fdp; local
4501 export_file_to_kinfo(struct file *fp, int fd, cap_rights_t *rightsp, struct kinfo_file *kif, struct filedesc *fdp, int flags) argument
4557 struct filedesc *fdp; member in struct:export_fd_buf
4624 struct filedesc *fdp; local
4821 struct filedesc *fdp; local
5055 struct filedesc *fdp; local
5107 struct filedesc *fdp; local
5240 badfo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) argument
[all...]
H A Dsys_generic.c728 struct filedesc *fdp; local
734 fdp = td->td_proc->p_fd;
739 FILEDESC_XLOCK(fdp);
744 FILEDESC_SLOCK(fdp);
753 if ((fp = fget_noref(fdp, fd)) == NULL) {
757 if ((error = cap_ioctl_check(fdp, fd, com)) != 0) {
767 FILEDESC_SUNLOCK(fdp);
784 fdp->fd_ofiles[fd].fde_flags &= ~UF_EXCLOSE;
787 fdp->fd_ofiles[fd].fde_flags |= UF_EXCLOSE;
809 FILEDESC_XUNLOCK(fdp);
1140 struct filedesc *fdp; local
1384 struct filedesc *fdp; local
1434 struct filedesc *fdp; local
1643 struct filedesc *fdp; local
1710 struct filedesc *fdp; local
[all...]
/freebsd-current/sys/sys/
H A Dfiledesc.h177 #define FILEDESC_LOCK_INIT(fdp) sx_init(&(fdp)->fd_sx, "filedesc structure")
178 #define FILEDESC_LOCK_DESTROY(fdp) sx_destroy(&(fdp)->fd_sx)
179 #define FILEDESC_LOCK(fdp) (&(fdp)->fd_sx)
180 #define FILEDESC_XLOCK(fdp) sx_xlock(&(fdp)->fd_sx)
181 #define FILEDESC_XUNLOCK(fdp) sx_xunlock(&(fdp)
301 fget_noref(struct filedesc *fdp, int fd) argument
313 fdeget_noref(struct filedesc *fdp, int fd) argument
331 fd_modified(struct filedesc *fdp, int fd, seqc_t seqc) argument
[all...]
/freebsd-current/tools/regression/sockets/zerosend/
H A Dzerosend.c75 setup_udp(const char *test, int *fdp, int port1, int port2) argument
108 fdp[0] = sock1;
109 fdp[1] = sock2;
113 setup_tcp(const char *test, int *fdp, int port) argument
179 fdp[0] = sock2;
180 fdp[1] = sock3;
184 setup_udsstream(const char *test, int *fdp) argument
187 if (socketpair(PF_LOCAL, SOCK_STREAM, 0, fdp) < 0)
192 setup_udsdgram(const char *test, int *fdp) argument
195 if (socketpair(PF_LOCAL, SOCK_DGRAM, 0, fdp) <
200 setup_pipe(const char *test, int *fdp) argument
208 setup_fifo(const char *test, int *fdp) argument
233 close_both(int *fdp) argument
[all...]
/freebsd-current/lib/libc/stdio/
H A Dfclose.c84 fdclose(FILE *fp, int *fdp) argument
88 if (fdp != NULL)
89 *fdp = -1;
110 if (fdp != NULL)
111 *fdp = fp->_file;
/freebsd-current/tools/regression/capsicum/syscalls/
H A Dmisc.c83 descriptor_recv(int sock, int *fdp) argument
85 unsigned char ctrl[CMSG_SPACE(sizeof(*fdp))];
92 assert(fdp != NULL);
122 bcopy(CMSG_DATA(cmsg), fdp, sizeof(*fdp)); local
H A Dmisc.h58 int descriptor_recv(int sock, int *fdp);
/freebsd-current/sys/fs/fdescfs/
H A Dfdesc_vfsops.c185 struct filedesc *fdp; local
201 fdp = td->td_proc->p_fd;
202 FILEDESC_SLOCK(fdp);
206 last = min(fdp->fd_nfiles, lim);
208 for (i = fdp->fd_freefile; i < last; i++)
209 if (fdp->fd_ofiles[i].fde_file == NULL)
216 if (fdp->fd_nfiles < lim)
217 freefd += (lim - fdp->fd_nfiles);
218 FILEDESC_SUNLOCK(fdp);
/freebsd-current/sys/compat/freebsd32/
H A Dfreebsd32_capability.c88 struct filedesc *fdp; local
102 fdp = td->td_proc->p_fd;
103 FILEDESC_SLOCK(fdp);
105 if (fget_noref(fdp, fd) == NULL) {
116 fdep = &fdp->fd_ofiles[fd];
133 FILEDESC_SUNLOCK(fdp);
/freebsd-current/contrib/openbsm/bin/auditdistd/
H A Dproto_common.c162 proto_descriptor_recv(int sock, int *fdp) argument
164 unsigned char ctrl[CMSG_SPACE(sizeof(*fdp))];
169 PJDLOG_ASSERT(fdp != NULL);
187 bcopy(CMSG_DATA(cmsg), fdp, sizeof(*fdp)); local
193 proto_common_recv(int sock, unsigned char *data, size_t size, int *fdp) argument
228 if (fdp == NULL)
230 return (proto_descriptor_recv(sock, fdp));
/freebsd-current/tests/sys/cddl/zfs/bin/
H A Dmmapwrite.c46 mapper(void *fdp) argument
49 int fd = *(int *)fdp;
/freebsd-current/sbin/hastd/
H A Dproto_common.c162 proto_descriptor_recv(int sock, int *fdp) argument
164 unsigned char ctrl[CMSG_SPACE(sizeof(*fdp))];
169 PJDLOG_ASSERT(fdp != NULL);
187 bcopy(CMSG_DATA(cmsg), fdp, sizeof(*fdp)); local
193 proto_common_recv(int sock, unsigned char *data, size_t size, int *fdp) argument
228 if (fdp == NULL)
230 return (proto_descriptor_recv(sock, fdp));
H A Dproto_impl.h77 int proto_common_recv(int sock, unsigned char *data, size_t size, int *fdp);
/freebsd-current/lib/libthr/thread/
H A Dthr_fork.c141 void *fdp; member in struct:thr_fork_args
160 return (__sys_pdfork(a->fdp, a->flags));
211 ret = syscall(SYS_pdfork, a->fdp, a->flags);
319 __thr_pdfork(int *fdp, int flags) argument
324 a.fdp = fdp;
/freebsd-current/tools/test/stress2/misc/
H A Dsendmsg2.sh119 int *fdp, *end;
121 fdp = (int *)CMSG_DATA(c);
123 for (i = 0; fdp+i < end; i++) {
124 printf("fd[%d]=%d\n", i, fdp[i]);
/freebsd-current/contrib/file/src/
H A Dcompress.c903 handledesc(void *v, int fd, int fdp[3][2]) argument
909 movedesc(v, STDIN_FILENO, fdp[STDIN_FILENO][0]);
910 if (fdp[STDIN_FILENO][1] > 2)
911 closedesc(v, fdp[STDIN_FILENO][1]);
916 ///FIXME: if one of the fdp[i][j] is 0 or 1, this can bomb spectacularly
917 movedesc(v, STDOUT_FILENO, fdp[STDOUT_FILENO][1]);
918 if (fdp[STDOUT_FILENO][0] > 2)
919 closedesc(v, fdp[STDOUT_FILENO][0]);
923 movedesc(v, STDERR_FILENO, fdp[STDERR_FILENO][1]);
924 if (fdp[STDERR_FILEN
1052 int fdp[3][2]; local
[all...]
/freebsd-current/lib/libgeom/
H A Dgeom_util.c273 g_device_path_open(const char *devpath, int *fdp, int dowrite) argument
279 if (fdp != NULL)
280 *fdp = -1;
315 if (fdp != NULL)
316 *fdp = fd;
/freebsd-current/tools/test/upsdl/
H A Dupsdl.c37 int prepareFile(const char* filename,int* fdp);
47 int prepareFile(const char* filename,int* fdp) argument
91 *fdp = fd;
/freebsd-current/crypto/openssh/
H A Dauthfd.h43 int ssh_get_authentication_socket(int *fdp);
44 int ssh_get_authentication_socket_path(const char *authsocket, int *fdp);
/freebsd-current/contrib/capsicum-test/
H A Dprocdesc.cc372 struct pollfd fdp; local
373 fdp.fd = pd_;
374 fdp.events = POLLIN | POLLERR | POLLHUP;
375 fdp.revents = 0;
376 EXPECT_EQ(0, poll(&fdp, 1, 0));
381 EXPECT_EQ(1, poll(&fdp, 1, 2000));
382 EXPECT_TRUE(fdp.revents & POLLHUP);
385 fdp.revents = 0;
386 EXPECT_EQ(1, poll(&fdp, 1, 0));
387 EXPECT_TRUE(fdp
424 struct pollfd fdp; local
[all...]

Completed in 368 milliseconds

1234