Home
last modified time | relevance | path

Searched refs:kif (Results 1 – 25 of 33) sorted by relevance

12

/freebsd/sys/netpfil/pf/
H A Dpf_if.c124 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 Dpf.c427 (s) = pf_find_state((pd->kif), (k), (pd->dir)); \
428 SDT_PROBE5(pf, ip, state, lookup, pd->kif, k, (pd->dir), pd, (s)); \
1401 if (si->kif == s->kif && in pf_state_key_attach()
1427 s->kif->pfik_name); in pf_state_key_attach()
1463 if (s->kif == V_pfi_all) in pf_state_key_attach()
1671 pf_state_insert(struct pfi_kkif *kif, struct pfi_kkif *orig_kif, in pf_state_insert() argument
1686 s->kif = kif; in pf_state_insert()
1758 pf_find_state(struct pfi_kkif *kif, const struct pf_state_key_cmp *key, in pf_find_state() argument
1783 if (s->kif == V_pfi_all || s->kif == kif || s->orig_kif == kif) { in pf_find_state()
2292 struct pfi_kkif *kif; in pf_kif_counter_u64_periodic() local
[all …]
H A Dpf_ioctl.c501 if (pa->kif) in pf_empty_kpool()
502 pfi_kkif_unref(pa->kif); in pf_empty_kpool()
550 if (rule->kif) in pf_free_eth_rule()
551 pfi_kkif_unref(rule->kif); in pf_free_eth_rule()
603 if (rule->kif) in pf_free_rule()
604 pfi_kkif_unref(rule->kif); in pf_free_rule()
850 if (cur->kif != prev->kif || cur->ifnot != prev->ifnot) in pf_eth_calc_skip_steps()
2074 struct pfi_kkif *kif = NULL, *rcv_kif = NULL; in pf_ioctl_addrule() local
2086 kif = pf_kkif_create(M_WAITOK); in pf_ioctl_addrule()
2145 rule->kif = pfi_kkif_attach(kif, rule->ifname); in pf_ioctl_addrule()
[all …]
H A Dpf_norm.c1082 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_ip()
1092 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_ip()
1236 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_ip6()
1246 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_ip6()
1308 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_tcp()
1317 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_tcp()
2112 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_sctp()
2121 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_sctp()
H A Dpf.h354 struct pfi_kif *kif; member
518 struct pfi_kif *kif; member
667 struct pfi_kif *kif; member
H A Dpf_lb.c160 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_match_translation()
169 src->neg, pd->kif, M_GETFIB(pd->m))) in pf_match_translation()
611 *nkif = rpool->cur->kif; in pf_map_addr()
H A Dif_pflog.c235 memcpy(hdr.ifname, pd->kif->pfik_name, sizeof(hdr.ifname)); in pflog_packet()
/freebsd/lib/libutil/
H A Dkinfo_getfile.c18 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 Dsys_socket.c372 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 Dkern_descrip.c107 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, (void *)arg, sizeof(*kif)); in kern_fcntl()
910 free(kif, M_TEMP); in kern_fcntl()
4514 pack_kinfo(struct kinfo_file *kif) in pack_kinfo() argument
[all …]
H A Dsys_eventfd.c334 eventfd_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in eventfd_fill_kinfo() argument
338 kif->kf_type = KF_TYPE_EVENTFD; in eventfd_fill_kinfo()
340 kif->kf_un.kf_eventfd.kf_eventfd_value = efd->efd_count; in eventfd_fill_kinfo()
341 kif->kf_un.kf_eventfd.kf_eventfd_flags = efd->efd_flags; in eventfd_fill_kinfo()
342 kif->kf_un.kf_eventfd.kf_eventfd_addr = (uintptr_t)efd; in eventfd_fill_kinfo()
H A Dtty_pts.c587 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 Dsys_timerfd.c349 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 Dvfs_vnops.c2754 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 Duipc_shm.c1915 shm_fill_kinfo_locked(struct shmfd *shmfd, struct kinfo_file *kif, bool list) in shm_fill_kinfo_locked() argument
1922 kif->kf_type = KF_TYPE_SHM; in shm_fill_kinfo_locked()
1923 kif->kf_un.kf_file.kf_file_mode = S_IFREG | shmfd->shm_mode; in shm_fill_kinfo_locked()
1924 kif->kf_un.kf_file.kf_file_size = shmfd->shm_size; in shm_fill_kinfo_locked()
1938 strlcpy(kif->kf_path, path, sizeof(kif->kf_path)); in shm_fill_kinfo_locked()
1944 shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, in shm_fill_kinfo() argument
1950 res = shm_fill_kinfo_locked(fp->f_data, kif, false); in shm_fill_kinfo()
2146 struct kinfo_file kif; in sysctl_posix_shm_list() local
2157 &kif, true); in sysctl_posix_shm_list()
2164 pack_kinfo(&kif); in sysctl_posix_shm_list()
[all …]
H A Dsys_procdesc.c547 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 Dsys_pipe.c1654 pipe_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in pipe_fill_kinfo() argument
1659 return (vn_fill_kinfo(fp, kif, fdp)); in pipe_fill_kinfo()
1660 kif->kf_type = KF_TYPE_PIPE; in pipe_fill_kinfo()
1662 kif->kf_un.kf_pipe.kf_pipe_addr = (uintptr_t)pi; in pipe_fill_kinfo()
1663 kif->kf_un.kf_pipe.kf_pipe_peer = (uintptr_t)pi->pipe_peer; in pipe_fill_kinfo()
1664 kif->kf_un.kf_pipe.kf_pipe_buffer_cnt = pi->pipe_buffer.cnt; in pipe_fill_kinfo()
1665 kif->kf_un.kf_pipe.kf_pipe_buffer_in = pi->pipe_buffer.in; in pipe_fill_kinfo()
1666 kif->kf_un.kf_pipe.kf_pipe_buffer_out = pi->pipe_buffer.out; in pipe_fill_kinfo()
1667 kif->kf_un.kf_pipe.kf_pipe_buffer_size = pi->pipe_buffer.size; in pipe_fill_kinfo()
H A Duipc_sem.c265 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 Dkern_event.c2330 kqueue_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in kqueue_fill_kinfo() argument
2334 kif->kf_type = KF_TYPE_KQUEUE; in kqueue_fill_kinfo()
2335 kif->kf_un.kf_kqueue.kf_kqueue_addr = (uintptr_t)kq; in kqueue_fill_kinfo()
2336 kif->kf_un.kf_kqueue.kf_kqueue_count = kq->kq_count; in kqueue_fill_kinfo()
2337 kif->kf_un.kf_kqueue.kf_kqueue_state = kq->kq_state; in kqueue_fill_kinfo()
/freebsd/lib/libprocstat/
H A Dlibprocstat.c796 struct kinfo_file *kif, *kp, *kf; in kinfo_getfile_core() local
821 kif = calloc(cnt, sizeof(*kif)); in kinfo_getfile_core()
822 if (kif == NULL) { in kinfo_getfile_core()
828 kp = kif; in kinfo_getfile_core()
844 return (kif); /* Caller must free() return value */ in kinfo_getfile_core()
851 struct kinfo_file *kif, *files; in procstat_getfiles_sysctl() local
887 kif = &files[i]; in procstat_getfiles_sysctl()
889 type = kinfo_type2fst(kif->kf_type); in procstat_getfiles_sysctl()
890 fd = kif->kf_fd >= 0 ? kif->kf_fd : -1; in procstat_getfiles_sysctl()
891 fflags = kinfo_fflags2fst(kif->kf_flags); in procstat_getfiles_sysctl()
[all …]
/freebsd/usr.bin/posixshmcontrol/
H A Dposixshmcontrol.c224 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 Dclosefrom_test.c115 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 Dkinfo3.sh134 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 Dfile.h122 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 Dvalidation.c622 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()

12