/freebsd/sys/netpfil/pf/ |
H A D | pf_if.c | 124 struct pfi_kkif *kif; in pfi_initialize_vnet() local 141 kif = pf_kkif_create(M_WAITOK); in pfi_initialize_vnet() 142 LIST_INSERT_HEAD(&kifs, kif, pfik_list); in pfi_initialize_vnet() 147 kif = LIST_FIRST(&kifs); in pfi_initialize_vnet() 148 LIST_REMOVE(kif, pfik_list); in pfi_initialize_vnet() 149 V_pfi_all = pfi_kkif_attach(kif, IFG_ALL); in pfi_initialize_vnet() 151 kif = LIST_FIRST(&kifs); in pfi_initialize_vnet() 152 LIST_REMOVE(kif, pfik_list); in pfi_initialize_vnet() 153 pfi_attach_ifgroup(ifg, kif); in pfi_initialize_vnet() 156 kif = LIST_FIRST(&kifs); in pfi_initialize_vnet() [all …]
|
H A D | pf_ioctl.c | 512 if (pa->kif) in pf_empty_kpool() 513 pfi_kkif_unref(pa->kif); in pf_empty_kpool() 561 if (rule->kif) in pf_free_eth_rule() 562 pfi_kkif_unref(rule->kif); in pf_free_eth_rule() 614 if (rule->kif) in pf_free_rule() 615 pfi_kkif_unref(rule->kif); in pf_free_rule() 846 if (cur->kif != prev->kif || cur->ifnot != prev->ifnot) in pf_eth_calc_skip_steps() 2073 struct pfi_kkif *kif = NULL, *rcv_kif = NULL; in pf_ioctl_addrule() local 2085 kif = pf_kkif_create(M_WAITOK); in pf_ioctl_addrule() 2147 rule->kif = pfi_kkif_attach(kif, rule->ifname); in pf_ioctl_addrule() [all …]
|
H A D | pf.c | 442 (s) = pf_find_state((pd->kif), (k), (pd->dir)); \ 443 SDT_PROBE5(pf, ip, state, lookup, pd->kif, k, (pd->dir), pd, (s)); \ 453 struct pfi_kkif *k = pd->kif; in BOUND_IFACE() 1480 if (si->kif == s->kif && in pf_state_key_attach() 1511 s->kif->pfik_name); in pf_state_key_attach() 1549 if (s->kif == V_pfi_all) in pf_state_key_attach() 1798 pf_state_insert(struct pfi_kkif *kif, struct pfi_kkif *orig_kif, in pf_state_insert() argument 1813 s->kif = kif; in pf_state_insert() 1885 pf_find_state(struct pfi_kkif *kif, const struct pf_state_key_cmp *key, in pf_find_state() argument 1910 if (s->kif == V_pfi_all || s->kif == kif || s->orig_kif == kif) { in pf_find_state() [all …]
|
H A D | pf_norm.c | 1099 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_ip() 1109 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_ip() 1252 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_ip6() 1262 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_ip6() 1325 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_tcp() 1334 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_tcp() 2137 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_sctp() 2146 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_sctp()
|
H A D | pf.h | 361 struct pfi_kif *kif; member 525 struct pfi_kif *kif; member 682 struct pfi_kif *kif; member
|
H A D | pf_lb.c | 154 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_match_translation() 163 src->neg, pd->kif, M_GETFIB(pd->m))) in pf_match_translation() 678 *nkif = rpool->cur->kif; in pf_map_addr()
|
H A D | if_pflog.c | 269 memcpy(hdr.ifname, pd->kif->pfik_name, sizeof(hdr.ifname)); in pflog_packet()
|
/freebsd/lib/libutil/ |
H A D | kinfo_getfile.c | 18 struct kinfo_file *kif, *kp, *kf; in kinfo_getfile() local 51 kif = calloc(cnt, sizeof(*kif)); in kinfo_getfile() 52 if (kif == NULL) { in kinfo_getfile() 58 kp = kif; in kinfo_getfile() 74 return (kif); /* Caller must free() return value */ in kinfo_getfile()
|
/freebsd/sys/kern/ |
H A D | sys_socket.c | 372 soo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in soo_fill_kinfo() argument 379 kif->kf_type = KF_TYPE_SOCKET; in soo_fill_kinfo() 382 kif->kf_un.kf_sock.kf_sock_domain0 = in soo_fill_kinfo() 384 kif->kf_un.kf_sock.kf_sock_type0 = so->so_type; in soo_fill_kinfo() 385 kif->kf_un.kf_sock.kf_sock_protocol0 = so->so_proto->pr_protocol; in soo_fill_kinfo() 386 kif->kf_un.kf_sock.kf_sock_pcb = (uintptr_t)so->so_pcb; in soo_fill_kinfo() 387 switch (kif->kf_un.kf_sock.kf_sock_domain0) { in soo_fill_kinfo() 391 kif->kf_un.kf_sock.kf_sock_inpcb = (uintptr_t)so->so_pcb; in soo_fill_kinfo() 392 kif->kf_un.kf_sock.kf_sock_rcv_sb_state = in soo_fill_kinfo() 394 kif->kf_un.kf_sock.kf_sock_snd_sb_state = in soo_fill_kinfo() [all …]
|
H A D | kern_descrip.c | 107 cap_rights_t *rightsp, struct kinfo_file *kif, 493 struct kinfo_file *kif; in kern_fcntl() local 888 if (kif_sz != sizeof(*kif)) { in kern_fcntl() 892 kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK | M_ZERO); in kern_fcntl() 896 export_file_to_kinfo(fp, fd, NULL, kif, fdp, 0); in kern_fcntl() 899 if ((kif->kf_status & KF_ATTR_VALID) != 0) { in kern_fcntl() 900 kif->kf_structsize = sizeof(*kif); in kern_fcntl() 901 error = copyout(kif, (voi in kern_fcntl() 4515 pack_kinfo(struct kinfo_file * kif) pack_kinfo() argument 4525 export_file_to_kinfo(struct file * fp,int fd,cap_rights_t * rightsp,struct kinfo_file * kif,struct filedesc * fdp,int flags) export_file_to_kinfo() argument 4557 export_vnode_to_kinfo(struct vnode * vp,int fd,int fflags,struct kinfo_file * kif,int flags) export_vnode_to_kinfo() argument 4584 struct kinfo_file kif; global() member 4591 struct kinfo_file *kif; export_kinfo_to_sb() local 4793 kinfo_to_okinfo(struct kinfo_file * kif,struct kinfo_ofile * okif) kinfo_to_okinfo() argument 4822 export_vnode_for_osysctl(struct vnode * vp,int type,struct kinfo_file * kif,struct kinfo_ofile * okif,struct pwddesc * pdp,struct sysctl_req * req) export_vnode_for_osysctl() argument 4843 struct kinfo_file *kif; sysctl_kern_proc_ofiledesc() local 5263 badfo_fill_kinfo(struct file * fp,struct kinfo_file * kif,struct filedesc * fdp) badfo_fill_kinfo() argument [all...] |
H A D | sys_eventfd.c | 332 eventfd_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in eventfd_fill_kinfo() argument 336 kif->kf_type = KF_TYPE_EVENTFD; in eventfd_fill_kinfo() 338 kif->kf_un.kf_eventfd.kf_eventfd_value = efd->efd_count; in eventfd_fill_kinfo() 339 kif->kf_un.kf_eventfd.kf_eventfd_flags = efd->efd_flags; in eventfd_fill_kinfo() 340 kif->kf_un.kf_eventfd.kf_eventfd_addr = (uintptr_t)efd; in eventfd_fill_kinfo()
|
H A D | tty_pts.c | 587 ptsdev_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in ptsdev_fill_kinfo() argument 591 kif->kf_type = KF_TYPE_PTS; in ptsdev_fill_kinfo() 593 kif->kf_un.kf_pts.kf_pts_dev = tty_udev(tp); in ptsdev_fill_kinfo() 594 kif->kf_un.kf_pts.kf_pts_dev_freebsd11 = in ptsdev_fill_kinfo() 595 kif->kf_un.kf_pts.kf_pts_dev; /* truncate */ in ptsdev_fill_kinfo() 596 strlcpy(kif->kf_path, tty_devname(tp), sizeof(kif->kf_path)); in ptsdev_fill_kinfo()
|
H A D | sys_timerfd.c | 349 timerfd_fill_kinfo(struct file *fp, struct kinfo_file *kif, in timerfd_fill_kinfo() argument 354 kif->kf_type = KF_TYPE_TIMERFD; in timerfd_fill_kinfo() 355 kif->kf_un.kf_timerfd.kf_timerfd_clockid = tfd->tfd_clockid; in timerfd_fill_kinfo() 356 kif->kf_un.kf_timerfd.kf_timerfd_flags = tfd->tfd_flags; in timerfd_fill_kinfo() 357 kif->kf_un.kf_timerfd.kf_timerfd_addr = (uintptr_t)tfd; in timerfd_fill_kinfo()
|
H A D | vfs_vnops.c | 2754 vn_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in vn_fill_kinfo() argument 2760 kif->kf_type = KF_TYPE_FIFO; in vn_fill_kinfo() 2762 kif->kf_type = KF_TYPE_VNODE; in vn_fill_kinfo() 2766 error = vn_fill_kinfo_vnode(vp, kif); in vn_fill_kinfo() 2773 vn_fill_junk(struct kinfo_file *kif) in vn_fill_junk() argument 2781 len = (arc4random() % (sizeof(kif->kf_path) - 2)) + 1; in vn_fill_junk() 2782 olen = strlen(kif->kf_path); in vn_fill_junk() 2784 strcpy(&kif->kf_path[len - 1], "$"); in vn_fill_junk() 2787 strcpy(&kif->kf_path[olen], "A"); in vn_fill_junk() 2791 vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif) in vn_fill_kinfo_vnode() argument [all …]
|
H A D | uipc_shm.c | 1896 shm_fill_kinfo_locked(struct shmfd *shmfd, struct kinfo_file *kif, bool list) in shm_fill_kinfo_locked() argument 1903 kif->kf_type = KF_TYPE_SHM; in shm_fill_kinfo_locked() 1904 kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; in shm_fill_kinfo_locked() 1905 kif->kf_un.kf_file.kf_file_size = shmfd->shm_size; in shm_fill_kinfo_locked() 1919 strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); in shm_fill_kinfo_locked() 1925 shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, in shm_fill_kinfo() argument 1931 res = shm_fill_kinfo_locked(fp->f_data, kif, false); in shm_fill_kinfo() 2127 struct kinfo_file kif; in sysctl_posix_shm_list() local 2138 &kif, true); in sysctl_posix_shm_list() 2145 pack_kinfo(&kif); in sysctl_posix_shm_list() [all …]
|
H A D | sys_procdesc.c | 547 procdesc_fill_kinfo(struct file *fp, struct kinfo_file *kif, in procdesc_fill_kinfo() argument 552 kif->kf_type = KF_TYPE_PROCDESC; in procdesc_fill_kinfo() 554 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 | 1659 pipe_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in pipe_fill_kinfo() argument 1664 return (vn_fill_kinfo(fp, kif, fdp)); in pipe_fill_kinfo() 1665 kif->kf_type = KF_TYPE_PIPE; in pipe_fill_kinfo() 1667 kif->kf_un.kf_pipe.kf_pipe_addr = (uintptr_t)pi; in pipe_fill_kinfo() 1668 kif->kf_un.kf_pipe.kf_pipe_peer = (uintptr_t)pi->pipe_peer; in pipe_fill_kinfo() 1669 kif->kf_un.kf_pipe.kf_pipe_buffer_cnt = pi->pipe_buffer.cnt; in pipe_fill_kinfo() 1670 kif->kf_un.kf_pipe.kf_pipe_buffer_in = pi->pipe_buffer.in; in pipe_fill_kinfo() 1671 kif->kf_un.kf_pipe.kf_pipe_buffer_out = pi->pipe_buffer.out; in pipe_fill_kinfo() 1672 kif->kf_un.kf_pipe.kf_pipe_buffer_size = pi->pipe_buffer.size; in pipe_fill_kinfo()
|
/freebsd/lib/libprocstat/ |
H A D | libprocstat.c | 797 struct kinfo_file *kif, *kp, *kf; in kinfo_getfile_core() local 822 kif = calloc(cnt, sizeof(*kif)); in kinfo_getfile_core() 823 if (kif == NULL) { in kinfo_getfile_core() 829 kp = kif; in kinfo_getfile_core() 845 return (kif); /* Caller must free() return value */ in kinfo_getfile_core() 852 struct kinfo_file *kif, *files; in procstat_getfiles_sysctl() local 888 kif = &files[i]; in procstat_getfiles_sysctl() 890 type = kinfo_type2fst(kif->kf_type); in procstat_getfiles_sysctl() 891 fd = kif->kf_fd >= 0 ? kif->kf_fd : -1; in procstat_getfiles_sysctl() 892 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 | 115 struct kinfo_file *kif; in highest_fd() local 118 kif = kinfo_getfile(getpid(), &cnt); in highest_fd() 119 if (kif == NULL) in highest_fd() 123 if (kif[i].kf_fd > highest) in highest_fd() 124 highest = kif[i].kf_fd; in highest_fd() 125 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/sys/ |
H A D | file.h | 122 typedef int fo_fill_kinfo_t(struct file *fp, struct kinfo_file *kif, 284 int vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif); 437 fo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in fo_fill_kinfo() argument 440 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 | 622 struct pfi_kif kif; in ATF_TC_BODY() local 628 io.pfiio_buffer = &kif; in ATF_TC_BODY() 629 io.pfiio_esize = sizeof(kif); in ATF_TC_BODY()
|
/freebsd/sys/net/ |
H A D | pfvar.h | 648 struct pfi_kkif *kif; member 751 struct pfi_kkif *kif; member 811 struct pfi_kkif *kif; member 1122 struct pfi_kkif *kif; member 1631 struct pfi_kkif *kif; /* incomming interface */ member
|