| /freebsd/sys/netpfil/pf/ |
| H A D | pf_if.c | 126 struct pfi_kkif *kif; in pfi_initialize_vnet() local 143 kif = pf_kkif_create(M_WAITOK); in pfi_initialize_vnet() 144 LIST_INSERT_HEAD(&kifs, kif, pfik_list); in pfi_initialize_vnet() 149 kif = LIST_FIRST(&kifs); in pfi_initialize_vnet() 150 LIST_REMOVE(kif, pfik_list); in pfi_initialize_vnet() 151 V_pfi_all = pfi_kkif_attach(kif, IFG_ALL); in pfi_initialize_vnet() 153 kif = LIST_FIRST(&kifs); in pfi_initialize_vnet() 154 LIST_REMOVE(kif, pfik_list); in pfi_initialize_vnet() 155 pfi_attach_ifgroup(ifg, kif); in pfi_initialize_vnet() 158 kif = LIST_FIRST(&kifs); in pfi_initialize_vnet() [all …]
|
| H A D | pf_ioctl.c | 521 if (pa->kif) in pf_empty_kpool() 522 pfi_kkif_unref(pa->kif); in pf_empty_kpool() 570 if (rule->kif) in pf_free_eth_rule() 571 pfi_kkif_unref(rule->kif); in pf_free_eth_rule() 623 if (rule->kif) in pf_free_rule() 624 pfi_kkif_unref(rule->kif); in pf_free_rule() 920 if (cur->kif != prev->kif || cur->ifnot != prev->ifnot) in pf_eth_calc_skip_steps() 3033 struct pfi_kkif *kif = NULL, *rcv_kif = NULL; in pf_ioctl_addrule() local 3054 kif = pf_kkif_create(M_WAITOK); in pf_ioctl_addrule() 3116 rule->kif = pfi_kkif_attach(kif, rule->ifname); in pf_ioctl_addrule() [all …]
|
| H A D | pf.c | 715 struct pfi_kkif *k = pd->kif; in BOUND_IFACE() 1708 /* Key exists. Check for same kif, if none, add to key. */ in pf_state_key_attach() 1713 if (si->kif == s->kif && in pf_state_key_attach() 1733 s->kif->pfik_name); in pf_state_key_attach() 1802 if (s->kif == V_pfi_all) in pf_state_key_attach() 2056 pf_state_insert(struct pfi_kkif *kif, struct pfi_kkif *orig_kif, in pf_state_insert() argument 2071 s->kif = kif; in pf_state_insert() 2171 if (s->kif in pf_find_state() 2789 struct pfi_kkif *kif; pf_kif_counter_u64_periodic() local 5031 struct pfi_kkif *kif; pf_match_rcvif() local 5621 pf_test_eth_rule(int dir,struct pfi_kkif * kif,struct mbuf ** m0) pf_test_eth_rule() argument 8179 pf_sctp_multihome_delayed(struct pf_pdesc * pd,struct pfi_kkif * kif,struct pf_kstate * s,int action) pf_sctp_multihome_delayed() argument 9677 pf_routable(struct pf_addr * addr,sa_family_t af,struct pfi_kkif * kif,int rtableid) pf_routable() argument 10582 struct pfi_kkif *kif; pf_test_eth() local 11092 pf_setup_pdesc(sa_family_t af,int dir,struct pf_pdesc * pd,struct mbuf ** m0,u_short * action,u_short * reason,struct pfi_kkif * kif,struct pf_rule_actions * default_actions) pf_setup_pdesc() argument 11586 struct pfi_kkif *kif; pf_test() local [all...] |
| H A D | pf_norm.c | 1182 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_ip() 1192 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_ip() 1336 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_ip6() 1346 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_ip6() 1409 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_tcp() 1418 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_tcp() 2164 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_sctp() 2173 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_sctp()
|
| H A D | pf.h | 369 struct pfi_kif *kif; member 543 struct pfi_kif *kif; member 702 struct pfi_kif *kif; member
|
| /freebsd/lib/libutil/ |
| H A D | kinfo_getfile.c | 18 struct kinfo_file *kif, *kp, *kf; in kinfo_getfile() local 55 kif = calloc(cnt, sizeof(*kif)); in kinfo_getfile() 56 if (kif == NULL) { in kinfo_getfile() 62 kp = kif; in kinfo_getfile() 78 return (kif); /* Caller must free() return value */ in kinfo_getfile()
|
| /freebsd/sys/kern/ |
| H A D | sys_socket.c | 392 soo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in soo_fill_kinfo() argument 399 kif->kf_type = KF_TYPE_SOCKET; in soo_fill_kinfo() 402 kif->kf_un.kf_sock.kf_sock_domain0 = in soo_fill_kinfo() 404 kif->kf_un.kf_sock.kf_sock_type0 = so->so_type; in soo_fill_kinfo() 405 kif->kf_un.kf_sock.kf_sock_protocol0 = so->so_proto->pr_protocol; in soo_fill_kinfo() 406 kif->kf_un.kf_sock.kf_sock_pcb = (uintptr_t)so->so_pcb; in soo_fill_kinfo() 407 switch (kif->kf_un.kf_sock.kf_sock_domain0) { in soo_fill_kinfo() 411 kif->kf_un.kf_sock.kf_sock_inpcb = (uintptr_t)so->so_pcb; in soo_fill_kinfo() 412 kif->kf_un.kf_sock.kf_sock_rcv_sb_state = in soo_fill_kinfo() 414 kif->kf_un.kf_sock.kf_sock_snd_sb_state = in soo_fill_kinfo() [all …]
|
| H A D | kern_descrip.c | 106 cap_rights_t *rightsp, struct kinfo_file *kif, 578 struct kinfo_file *kif; in kern_fcntl() local 990 if (kif_sz != sizeof(*kif)) { in kern_fcntl() 994 kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK | M_ZERO); in kern_fcntl() 998 export_file_to_kinfo(fp, fd, NULL, kif, fdp, 0); in kern_fcntl() 1001 if ((kif->kf_status & KF_ATTR_VALID) != 0) { in kern_fcntl() 1002 kif->kf_structsize = sizeof(*kif); in kern_fcntl() 1003 error = copyout(kif, (void *)arg, sizeof(*kif)); in kern_fcntl() 1012 free(kif, M_TEMP); in kern_fcntl() 4783 pack_kinfo(struct kinfo_file *kif) in pack_kinfo() argument [all …]
|
| H A D | sys_eventfd.c | 380 eventfd_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in eventfd_fill_kinfo() argument 384 kif->kf_type = KF_TYPE_EVENTFD; in eventfd_fill_kinfo() 386 kif->kf_un.kf_eventfd.kf_eventfd_value = efd->efd_count; in eventfd_fill_kinfo() 387 kif->kf_un.kf_eventfd.kf_eventfd_flags = efd->efd_flags; in eventfd_fill_kinfo() 388 kif->kf_un.kf_eventfd.kf_eventfd_addr = (uintptr_t)efd; in eventfd_fill_kinfo()
|
| H A D | tty_pts.c | 588 ptsdev_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in ptsdev_fill_kinfo() argument 592 kif->kf_type = KF_TYPE_PTS; in ptsdev_fill_kinfo() 594 kif->kf_un.kf_pts.kf_pts_dev = tty_udev(tp); in ptsdev_fill_kinfo() 595 kif->kf_un.kf_pts.kf_pts_dev_freebsd11 = in ptsdev_fill_kinfo() 596 kif->kf_un.kf_pts.kf_pts_dev; /* truncate */ in ptsdev_fill_kinfo() 597 strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path)); in ptsdev_fill_kinfo()
|
| H A D | sys_timerfd.c | 358 timerfd_fill_kinfo(struct file *fp, struct kinfo_file *kif, in timerfd_fill_kinfo() argument 363 kif->kf_type = KF_TYPE_TIMERFD; in timerfd_fill_kinfo() 364 kif->kf_un.kf_timerfd.kf_timerfd_clockid = tfd->tfd_clockid; in timerfd_fill_kinfo() 365 kif->kf_un.kf_timerfd.kf_timerfd_flags = tfd->tfd_flags; in timerfd_fill_kinfo() 366 kif->kf_un.kf_timerfd.kf_timerfd_addr = (uintptr_t)tfd; in timerfd_fill_kinfo()
|
| H A D | kern_jaildesc.c | 416 jaildesc_fill_kinfo(struct file *fp, struct kinfo_file *kif, in jaildesc_fill_kinfo() argument 422 kif->kf_type = KF_TYPE_JAILDESC; in jaildesc_fill_kinfo() 423 kif->kf_un.kf_jail.kf_jid = jd->jd_prison ? jd->jd_prison->pr_id : 0; in jaildesc_fill_kinfo()
|
| H A D | vfs_vnops.c | 2963 vn_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in vn_fill_kinfo() argument 2969 kif->kf_type = KF_TYPE_FIFO; in vn_fill_kinfo() 2971 kif->kf_type = KF_TYPE_VNODE; in vn_fill_kinfo() 2975 error = vn_fill_kinfo_vnode(vp, kif); in vn_fill_kinfo() 2982 vn_fill_junk(struct kinfo_file *kif) in vn_fill_junk() argument 2990 len = (arc4random() % (sizeof(kif->kf_path) - 2)) + 1; in vn_fill_junk() 2991 olen = strlen(kif->kf_path); in vn_fill_junk() 2993 strcpy(&kif->kf_path[len - 1], "$"); in vn_fill_junk() 2996 strcpy(&kif->kf_path[olen], "A"); in vn_fill_junk() 3000 vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif) in vn_fill_kinfo_vnode() argument [all …]
|
| H A D | uipc_shm.c | 1929 shm_fill_kinfo_locked(struct shmfd *shmfd, struct kinfo_file *kif, bool list) in shm_fill_kinfo_locked() argument 1936 kif->kf_type = KF_TYPE_SHM; in shm_fill_kinfo_locked() 1937 kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; in shm_fill_kinfo_locked() 1938 kif->kf_un.kf_file.kf_file_size = shmfd->shm_size; in shm_fill_kinfo_locked() 1952 strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); in shm_fill_kinfo_locked() 1958 shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, in shm_fill_kinfo() argument 1964 res = shm_fill_kinfo_locked(fp->f_data, kif, false); in shm_fill_kinfo() 2160 struct kinfo_file kif = {}; in sysctl_posix_shm_list() local 2171 &kif, true); in sysctl_posix_shm_list() 2178 pack_kinfo(&kif); in sysctl_posix_shm_list() [all …]
|
| H A D | sys_procdesc.c | 553 procdesc_fill_kinfo(struct file *fp, struct kinfo_file *kif, in procdesc_fill_kinfo() argument 558 kif->kf_type = KF_TYPE_PROCDESC; in procdesc_fill_kinfo() 560 kif->kf_un.kf_proc.kf_pid = pdp->pd_pid; in procdesc_fill_kinfo()
|
| H A D | uipc_sem.c | 265 ksem_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in ksem_fill_kinfo() argument 271 kif->kf_type = KF_TYPE_SEM; in ksem_fill_kinfo() 274 kif->kf_un.kf_sem.kf_sem_value = ks->ks_value; in ksem_fill_kinfo() 275 kif->kf_un.kf_sem.kf_sem_mode = S_IFREG | ks->ks_mode; /* XXX */ in ksem_fill_kinfo() 289 strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); in ksem_fill_kinfo()
|
| H A D | sys_pipe.c | 1664 pipe_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in pipe_fill_kinfo() argument 1669 return (vn_fill_kinfo(fp, kif, fdp)); in pipe_fill_kinfo() 1670 kif->kf_type = KF_TYPE_PIPE; in pipe_fill_kinfo() 1672 kif->kf_un.kf_pipe.kf_pipe_addr = (uintptr_t)pi; in pipe_fill_kinfo() 1673 kif->kf_un.kf_pipe.kf_pipe_peer = (uintptr_t)pi->pipe_peer; in pipe_fill_kinfo() 1674 kif->kf_un.kf_pipe.kf_pipe_buffer_cnt = pi->pipe_buffer.cnt; in pipe_fill_kinfo() 1675 kif->kf_un.kf_pipe.kf_pipe_buffer_in = pi->pipe_buffer.in; in pipe_fill_kinfo() 1676 kif->kf_un.kf_pipe.kf_pipe_buffer_out = pi->pipe_buffer.out; in pipe_fill_kinfo() 1677 kif->kf_un.kf_pipe.kf_pipe_buffer_size = pi->pipe_buffer.size; in pipe_fill_kinfo()
|
| H A D | vfs_inotify.c | 474 inotify_fill_kinfo(struct file *fp, struct kinfo_file *kif, in inotify_fill_kinfo() argument 481 kif->kf_type = KF_TYPE_INOTIFY; in inotify_fill_kinfo() 482 kif->kf_un.kf_inotify.kf_inotify_npending = sc->npending; in inotify_fill_kinfo() 483 kif->kf_un.kf_inotify.kf_inotify_nbpending = sc->nbpending; in inotify_fill_kinfo()
|
| /freebsd/lib/libprocstat/ |
| H A D | libprocstat.c | 802 struct kinfo_file *kif, *kp, *kf; in kinfo_getfile_core() local 827 kif = calloc(cnt, sizeof(*kif)); in kinfo_getfile_core() 828 if (kif == NULL) { in kinfo_getfile_core() 834 kp = kif; in kinfo_getfile_core() 850 return (kif); /* Caller must free() return value */ in kinfo_getfile_core() 857 struct kinfo_file *kif, *files; in procstat_getfiles_sysctl() local 893 kif = &files[i]; in procstat_getfiles_sysctl() 895 type = kinfo_type2fst(kif->kf_type); in procstat_getfiles_sysctl() 896 fd = kif->kf_fd >= 0 ? kif->kf_fd : -1; in procstat_getfiles_sysctl() 897 fflags = kinfo_fflags2fst(kif->kf_flags); in procstat_getfiles_sysctl() [all …]
|
| /freebsd/usr.bin/posixshmcontrol/ |
| H A D | posixshmcontrol.c | 224 const struct kinfo_file *kif; in list_shm() local 300 for (bp = buf; bp < buf + len; bp += kif->kf_structsize) { in list_shm() 301 kif = (const struct kinfo_file *)(void *)bp; in list_shm() 302 if (kif->kf_structsize == 0) in list_shm() 304 if (jailed && strncmp(kif->kf_path, jailpath, jailpathlen + 1)) in list_shm() 306 fd = shm_open(kif->kf_path, O_RDONLY, 0); in list_shm() 309 warn("open %s", kif->kf_path); in list_shm() 317 warn("stat %s", kif->kf_path); in list_shm() 321 shm_decode_mode(kif->kf_un.kf_file.kf_file_mode, str); in list_shm() 331 kif->kf_un.kf_file.kf_file_size, "", HN_AUTOSCALE, in list_shm() [all …]
|
| /freebsd/tests/sys/file/ |
| H A D | closefrom_test.c | 105 struct kinfo_file *kif; in highest_fd() local 108 kif = kinfo_getfile(getpid(), &cnt); in highest_fd() 109 ATF_REQUIRE_MSG(kif != NULL, "kinfo_getfile: %s", strerror(errno)); in highest_fd() 112 if (kif[i].kf_fd > highest) in highest_fd() 113 highest = kif[i].kf_fd; in highest_fd() 114 free(kif); in highest_fd()
|
| /freebsd/tools/test/stress2/misc/ |
| H A D | kinfo3.sh | 134 struct kinfo_file *freep, *kif __unused; 162 kif = &freep[j]; 163 // printf("%d : %s\n", kif->kf_fd, kif->kf_path);
|
| /freebsd/sys/dev/ntsync/ |
| H A D | ntsync.c | 486 ntsync_sem_fill_kinfo(struct file *fp, struct kinfo_file *kif, in ntsync_sem_fill_kinfo() 497 kif->kf_type = KF_TYPE_NTSYNC; in ntsync_sem_fill_kinfo() 498 kif->kf_un.kf_ntsync.kf_ntsync_type = KF_NTSYNC_TYPE_SEM; in ntsync_sem_fill_kinfo() 499 kif->kf_un.kf_ntsync.kf_ntsync_dev = (uintptr_t)obj->owner; in ntsync_sem_fill_kinfo() 500 kif->kf_un.kf_ntsync.kf_ntsync_un.kf_ntsync_sem.count = sem->a.count; in ntsync_sem_fill_kinfo() 501 kif->kf_un.kf_ntsync.kf_ntsync_un.kf_ntsync_sem.max = sem->a.max; in ntsync_sem_fill_kinfo() 792 ntsync_mutex_fill_kinfo(struct file *fp, struct kinfo_file *kif, in ntsync_mutex_fill_kinfo() 803 kif->kf_type = KF_TYPE_NTSYNC; in ntsync_mutex_fill_kinfo() 804 kif->kf_un.kf_ntsync.kf_ntsync_type = KF_NTSYNC_TYPE_MUTEX; in ntsync_mutex_fill_kinfo() 805 kif in ntsync_mutex_fill_kinfo() 485 ntsync_sem_fill_kinfo(struct file * fp,struct kinfo_file * kif,struct filedesc * fdp) ntsync_sem_fill_kinfo() argument 791 ntsync_mutex_fill_kinfo(struct file * fp,struct kinfo_file * kif,struct filedesc * fdp) ntsync_mutex_fill_kinfo() argument 1080 ntsync_event_fill_kinfo(struct file * fp,struct kinfo_file * kif,struct filedesc * fdp) ntsync_event_fill_kinfo() argument [all...] |
| /freebsd/sys/sys/ |
| H A D | file.h | 130 typedef int fo_fill_kinfo_t(struct file *fp, struct kinfo_file *kif, 302 int vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif); 455 fo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in fo_fill_kinfo() argument 458 return ((*fp->f_ops->fo_fill_kinfo)(fp, kif, fdp)); in fo_fill_kinfo()
|
| /freebsd/tests/sys/netpfil/pf/ioctl/ |
| H A D | validation.c | 668 struct pfi_kif kif; in ATF_TC_BODY() local 674 io.pfiio_buffer = &kif; in ATF_TC_BODY() 675 io.pfiio_esize = sizeof(kif); in ATF_TC_BODY()
|