/freebsd/sys/fs/pseudofs/ |
H A D | pseudofs.c | 71 struct pfs_node *pn; in pfs_alloc_node_flags() local 82 pn = malloc(sizeof(*pn) + len + 1, M_PFSNODES, malloc_flags); in pfs_alloc_node_flags() 83 if (pn == NULL) in pfs_alloc_node_flags() 85 mtx_init(&pn->pn_mutex, "pfs_node", NULL, MTX_DEF | MTX_DUPOK); in pfs_alloc_node_flags() 86 memcpy(pn->pn_name, name, len); in pfs_alloc_node_flags() 87 pn->pn_type = type; in pfs_alloc_node_flags() 88 pn->pn_info = pi; in pfs_alloc_node_flags() 89 return (pn); in pfs_alloc_node_flags() 102 pfs_add_node(struct pfs_node *parent, struct pfs_node *pn) in pfs_add_node() argument 110 KASSERT(pn->pn_parent == NULL, in pfs_add_node() [all …]
|
H A D | pseudofs_fileno.c | 75 pfs_fileno_alloc(struct pfs_node *pn) in pfs_fileno_alloc() argument 78 if (pn->pn_parent) in pfs_fileno_alloc() 79 PFS_TRACE(("%s/%s", pn->pn_parent->pn_name, pn->pn_name)); in pfs_fileno_alloc() 81 PFS_TRACE(("%s", pn->pn_name)); in pfs_fileno_alloc() 82 pfs_assert_not_owned(pn); in pfs_fileno_alloc() 84 switch (pn->pn_type) { in pfs_fileno_alloc() 87 pn->pn_fileno = 2; in pfs_fileno_alloc() 93 pn->pn_fileno = alloc_unr(pn->pn_info->pi_unrhdr); in pfs_fileno_alloc() 96 KASSERT(pn->pn_parent != NULL, in pfs_fileno_alloc() 98 pn->pn_fileno = pn->pn_parent->pn_fileno; in pfs_fileno_alloc() [all …]
|
H A D | pseudofs_internal.h | 99 pfs_lock(struct pfs_node *pn) in pfs_lock() argument 102 mtx_lock(&pn->pn_mutex); in pfs_lock() 106 pfs_unlock(struct pfs_node *pn) in pfs_unlock() argument 109 mtx_unlock(&pn->pn_mutex); in pfs_unlock() 113 pfs_assert_owned(struct pfs_node *pn) in pfs_assert_owned() argument 116 mtx_assert(&pn->pn_mutex, MA_OWNED); in pfs_assert_owned() 120 pfs_assert_not_owned(struct pfs_node *pn) in pfs_assert_not_owned() argument 123 mtx_assert(&pn->pn_mutex, MA_NOTOWNED); in pfs_assert_not_owned() 130 PFS_TRACE(("%s", pn->pn_name)); in pn_fill() 131 KASSERT(pn->pn_fill != NULL, ("%s(): no callback", __func__)); in pn_fill() [all …]
|
H A D | pseudofs_vnops.c | 55 #define KASSERT_PN_IS_DIR(pn) \ argument 56 KASSERT((pn)->pn_type == pfstype_root || \ 57 (pn)->pn_type == pfstype_dir || \ 58 (pn)->pn_type == pfstype_procdir, \ 61 #define KASSERT_PN_IS_FILE(pn) \ argument 62 KASSERT((pn)->pn_type == pfstype_file, \ 65 #define KASSERT_PN_IS_LINK(pn) \ argument 66 KASSERT((pn)->pn_type == pfstype_symlink, \ 75 pn_fileno(struct pfs_node *pn, pid_t pid) in pn_fileno() argument 78 KASSERT(pn->pn_fileno > 0, in pn_fileno() [all …]
|
H A D | pseudofs.h | 103 struct thread *td, struct proc *p, struct pfs_node *pn, \ 106 td, p, pn, sb, uio 117 struct thread *td, struct proc *p, struct pfs_node *pn, \ 120 td, p, pn, vap 130 struct thread *td, struct proc *p, struct pfs_node *pn 132 td, p, pn 142 struct thread *td, struct proc *p, struct pfs_node *pn, \ 145 td, p, pn, cmd, data 155 struct thread *td, struct proc *p, struct pfs_node *pn, \ 159 td, p, pn, attrnamespace, name, uio, size, cred [all …]
|
H A D | pseudofs_vncache.c | 117 struct pfs_node *pn, pid_t pid) in pfs_vncache_alloc() argument 134 if (pvd->pvd_pn == pn && pvd->pvd_pid == pid && in pfs_vncache_alloc() 166 pvd->pvd_pn = pn; in pfs_vncache_alloc() 169 switch (pn->pn_type) { in pfs_vncache_alloc() 191 panic("%s has unexpected type: %d", pn->pn_name, pn->pn_type); in pfs_vncache_alloc() 197 if ((pn->pn_flags & PFS_PROCDEP) != 0) in pfs_vncache_alloc() 217 if (pvd2->pvd_pn == pn && pvd2->pvd_pid == pid && in pfs_vncache_alloc() 300 pfs_purge(struct pfs_node *pn) in pfs_purge() argument 312 if (pn != NULL && pvd->pvd_pn != pn) in pfs_purge()
|
/freebsd/usr.bin/finger/ |
H A D | util.c | 98 enter_lastlog(PERSON *pn) in enter_lastlog() argument 105 ut = getutxuser(pn->name); in enter_lastlog() 106 if ((w = pn->whead) == NULL) in enter_lastlog() 119 for (w = pn->whead; doit && w != NULL; w = w->next) in enter_lastlog() 125 w = walloc(pn); in enter_lastlog() 135 enter_where(struct utmpx *ut, PERSON *pn) in enter_where() argument 139 w = walloc(pn); in enter_where() 151 PERSON *pn; in enter_person() local 162 memmove(&pn, data.data, sizeof pn); in enter_person() 163 return (pn); in enter_person() [all …]
|
H A D | lprint.c | 63 PERSON *pn; in lflag_print() local 75 pn = tmp; in lflag_print() 78 lprint(pn); in lflag_print() 80 (void)show_text(pn->dir, in lflag_print() 82 (void)show_text(pn->dir, _PATH_PROJECT, "Project"); in lflag_print() 83 if (!show_text(pn->dir, _PATH_PLAN, "Plan")) in lflag_print() 85 (void)show_text(pn->dir, in lflag_print() 92 lprint(PERSON *pn) in lprint() argument 113 pn->name, pn->realname, pn->dir); in lprint() 114 (void)printf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL); in lprint() [all …]
|
H A D | sprint.c | 53 PERSON *pn; in sflag_print() local 92 pn = tmp; in sflag_print() 94 for (w = pn->whead; w != NULL; w = w->next) { in sflag_print() 99 pn->name, MAXREALNAME, namelen, in sflag_print() 100 pn->realname ? pn->realname : ""); in sflag_print() 140 if (pn->office) in sflag_print() 141 (void)printf(" %-7.7s", pn->office); in sflag_print() 142 else if (pn->officephone) in sflag_print() 144 if (pn->officephone) in sflag_print() 146 prphone(pn->officephone)); in sflag_print()
|
/freebsd/sbin/ipf/libipf/ |
H A D | load_poolnode.c | 21 ip_pool_node_t pn; in load_poolnode() local 32 op.iplo_struct = &pn; in load_poolnode() 33 op.iplo_size = sizeof(pn); in load_poolnode() 36 bzero((char *)&pn, sizeof(pn)); in load_poolnode() 37 bcopy((char *)&node->ipn_addr, (char *)&pn.ipn_addr, in load_poolnode() 38 sizeof(pn.ipn_addr)); in load_poolnode() 39 bcopy((char *)&node->ipn_mask, (char *)&pn.ipn_mask, in load_poolnode() 40 sizeof(pn.ipn_mask)); in load_poolnode() 41 pn.ipn_info = node->ipn_info; in load_poolnode() 42 pn.ipn_die = ttl; in load_poolnode() [all …]
|
H A D | remove_poolnode.c | 21 ip_pool_node_t pn; in remove_poolnode() local 31 op.iplo_struct = &pn; in remove_poolnode() 32 op.iplo_size = sizeof(pn); in remove_poolnode() 34 bzero((char *)&pn, sizeof(pn)); in remove_poolnode() 35 bcopy((char *)&node->ipn_addr, (char *)&pn.ipn_addr, in remove_poolnode() 36 sizeof(pn.ipn_addr)); in remove_poolnode() 37 bcopy((char *)&node->ipn_mask, (char *)&pn.ipn_mask, in remove_poolnode() 38 sizeof(pn.ipn_mask)); in remove_poolnode() 39 pn.ipn_info = node->ipn_info; in remove_poolnode() 40 strncpy(pn.ipn_name, node->ipn_name, sizeof(pn.ipn_name)); in remove_poolnode()
|
/freebsd/contrib/netbsd-tests/fs/puffs/h_dtfs/ |
H A D | dtfs_vfsops.c | 46 struct puffs_node *pn = puffs_getroot(pu); in rtstr() local 47 struct vattr *va = &pn->pn_va; in rtstr() 48 struct dtfs_file *df = DTFS_PTOF(pn); in rtstr() 68 struct puffs_node *pn = puffs_getroot(pu); in rtdev() local 69 struct vattr *va = &pn->pn_va; in rtdev() 92 struct puffs_node *pn = puffs_getroot(pu); in rtnorm() local 93 struct vattr *va = &pn->pn_va; in rtnorm() 126 struct puffs_node *pn; in dtfs_domount() local 142 pn = puffs_pn_new(pu, dff); in dtfs_domount() 143 if (!pn) in dtfs_domount() [all …]
|
H A D | dtfs_vnops.c | 102 struct puffs_node *pn = opc; in dtfs_node_access() local 104 return puffs_access(pn->pn_va.va_type, pn->pn_va.va_mode, in dtfs_node_access() 105 pn->pn_va.va_uid, pn->pn_va.va_gid, acc_mode, pcr); in dtfs_node_access() 112 struct puffs_node *pn = opc; in dtfs_node_setattr() local 120 rv = puffs_access_chown(pn->pn_va.va_uid, pn->pn_va.va_gid, in dtfs_node_setattr() 127 rv = puffs_access_chmod(pn->pn_va.va_uid, pn->pn_va.va_gid, in dtfs_node_setattr() 128 pn->pn_va.va_type, va->va_mode, pcr); in dtfs_node_setattr() 137 rv = puffs_access_times(pn->pn_va.va_uid, pn->pn_va.va_gid, in dtfs_node_setattr() 138 pn->pn_va.va_mode, va->va_vaflags & VA_UTIMES_NULL, pcr); in dtfs_node_setattr() 144 switch (pn->pn_va.va_type) { in dtfs_node_setattr() [all …]
|
H A D | dtfs_subr.c | 200 dtfs_freenode(struct puffs_node *pn) in dtfs_freenode() argument 202 struct dtfs_file *df = DTFS_PTOF(pn); in dtfs_freenode() 206 assert(pn->pn_va.va_nlink == 0); in dtfs_freenode() 207 dtm = puffs_pn_getmntspecific(pn); in dtfs_freenode() 209 switch (pn->pn_va.va_type) { in dtfs_freenode() 211 assert(dtm->dtm_fsizes >= pn->pn_va.va_size); in dtfs_freenode() 212 dtm->dtm_fsizes -= pn->pn_va.va_size; in dtfs_freenode() 233 puffs_pn_put(pn); in dtfs_freenode() 237 dtfs_setsize(struct puffs_node *pn, off_t newsize) in dtfs_setsize() argument 239 struct dtfs_file *df = DTFS_PTOF(pn); in dtfs_setsize() [all …]
|
/freebsd/sys/dev/usb/serial/ |
H A D | umcs.c | 440 uint16_t pn = ucom->sc_portno; in umcs7840_cfg_open() local 457 if (umcs7840_get_reg_sync(sc, umcs7840_port_registers[pn].reg_sp, &data)) in umcs7840_cfg_open() 460 if (umcs7840_set_reg_sync(sc, umcs7840_port_registers[pn].reg_sp, data)) in umcs7840_cfg_open() 463 if (umcs7840_set_reg_sync(sc, umcs7840_port_registers[pn].reg_sp, data)) in umcs7840_cfg_open() 467 if (umcs7840_set_UART_reg_sync(sc, pn, MCS7840_UART_REG_SCRATCHPAD, MCS7840_UART_SCRATCHPAD_RS232)) in umcs7840_cfg_open() 471 if (umcs7840_get_reg_sync(sc, umcs7840_port_registers[pn].reg_control, &data)) in umcs7840_cfg_open() 474 if (umcs7840_set_reg_sync(sc, umcs7840_port_registers[pn].reg_control, data)) in umcs7840_cfg_open() 478 if (umcs7840_set_UART_reg_sync(sc, pn, MCS7840_UART_REG_IER, 0)) in umcs7840_cfg_open() 482 if (umcs7840_set_UART_reg_sync(sc, pn, MCS7840_UART_REG_FCR, 0)) in umcs7840_cfg_open() 484 if (umcs7840_set_UART_reg_sync(sc, pn, MCS7840_UART_REG_FCR, in umcs7840_cfg_open() [all …]
|
/freebsd/contrib/libpcap/ |
H A D | pcap-netmap.c | 65 struct pcap_netmap *pn = p->priv; in pcap_netmap_stats() local 67 ps->ps_recv = (u_int)pn->rx_pkts; in pcap_netmap_stats() 78 struct pcap_netmap *pn = p->priv; in pcap_netmap_filter() local 81 ++pn->rx_pkts; in pcap_netmap_filter() 83 pn->cb(pn->cb_arg, h, buf); in pcap_netmap_filter() 91 struct pcap_netmap *pn = p->priv; in pcap_netmap_dispatch() local 92 struct nm_desc *d = pn->d; in pcap_netmap_dispatch() 95 pn->cb = cb; in pcap_netmap_dispatch() 96 pn->cb_arg = user; in pcap_netmap_dispatch() 119 struct pcap_netmap *pn = p->priv; in pcap_netmap_inject() local [all …]
|
/freebsd/sys/netinet/ |
H A D | siftr.c | 670 siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp, in siftr_siftdata() argument 673 pn->ipver = ipver; in siftr_siftdata() 674 pn->lport = inp->inp_lport; in siftr_siftdata() 675 pn->fport = inp->inp_fport; in siftr_siftdata() 676 pn->laddr = inp->inp_inc.inc_ie.ie_dependladdr; in siftr_siftdata() 677 pn->faddr = inp->inp_inc.inc_ie.ie_dependfaddr; in siftr_siftdata() 678 pn->snd_cwnd = tp->snd_cwnd; in siftr_siftdata() 679 pn->snd_wnd = tp->snd_wnd; in siftr_siftdata() 680 pn->rcv_wnd = tp->rcv_wnd; in siftr_siftdata() 681 pn->t_flags2 = tp->t_flags2; in siftr_siftdata() [all …]
|
/freebsd/sys/compat/linsysfs/ |
H A D | linsysfs_net.c | 58 struct pfs_node *pn; member 93 ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); in linsysfs_if_addr() 122 ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); in linsysfs_if_flags() 141 ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); in linsysfs_if_ifindex() 160 ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); in linsysfs_if_mtu() 189 ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); in linsysfs_if_type() 210 ifp = ifname_linux_to_ifp(td, pn->pn_name); in linsysfs_if_visible() 266 nq->pn = nic; in linsysfs_net_addif() 277 struct pfs_node *pn; in linsysfs_net_delif() local 279 pn = NULL; in linsysfs_net_delif() [all …]
|
H A D | linsysfs.c | 75 if (strncmp(pn->pn_parent->pn_name, "host", 4) == 0) { in linsysfs_scsiname() 76 index = atoi(&pn->pn_parent->pn_name[4]); in linsysfs_scsiname() 100 if (strncmp(pn->pn_parent->pn_name, "host", 4) == 0) { in linsysfs_link_scsi_host() 101 index = atoi(&pn->pn_parent->pn_name[4]); in linsysfs_link_scsi_host() 119 sbuf_printf(sb, "%s", (char *)pn->pn_data); in linsysfs_fill_data() 126 sbuf_printf(sb, "0x%04x\n", pci_get_vendor((device_t)pn->pn_data)); in linsysfs_fill_vendor() 133 sbuf_printf(sb, "0x%04x\n", pci_get_device((device_t)pn->pn_data)); in linsysfs_fill_device() 140 sbuf_printf(sb, "0x%04x\n", pci_get_subvendor((device_t)pn->pn_data)); in linsysfs_fill_subvendor() 147 sbuf_printf(sb, "0x%04x\n", pci_get_subdevice((device_t)pn->pn_data)); in linsysfs_fill_subdevice() 154 sbuf_printf(sb, "0x%x\n", pci_get_revid((device_t)pn->pn_data)); in linsysfs_fill_revid() [all …]
|
/freebsd/sys/libkern/ |
H A D | qsort.c | 114 char *pa, *pb, *pc, *pd, *pl, *pm, *pn; variable 133 pn = (char *)a + (n - 1) * es; 139 pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); 141 pm = med3(pl, pm, pn, cmp, thunk); 180 pn = (char *)a + n * es; 183 d1 = MIN(pd - pc, pn - pd - es); 184 vecswap(pb, pn - d1, d1); 200 a = pn - d2; 208 qsort_r(pn - d2, d2 / es, es, cmp, thunk); 210 qsort(pn - d2, d2 / es, es, cmp);
|
/freebsd/crypto/heimdal/lib/roken/ |
H A D | qsort.c | 119 char *pa, *pb, *pc, *pd, *pl, *pm, *pn; in rk_qsort_r() local 137 pn = (char *)a + (n - 1) * es; in rk_qsort_r() 142 pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); in rk_qsort_r() 144 pm = med3(pl, pm, pn, cmp, thunk); in rk_qsort_r() 183 pn = (char *)a + n * es; in rk_qsort_r() 186 r = min(pd - pc, pn - pd - es); in rk_qsort_r() 187 vecswap(pb, pn - r, r); in rk_qsort_r() 196 a = pn - r; in rk_qsort_r()
|
/freebsd/lib/libc/stdlib/ |
H A D | qsort.c | 106 char *pa, *pb, *pc, *pd, *pl, *pm, *pn; in local_qsort() local 127 pn = (char *)a + (n - 1) * es; in local_qsort() 133 pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); in local_qsort() 135 pm = med3(pl, pm, pn, cmp, thunk); in local_qsort() 174 pn = (char *)a + n * es; in local_qsort() 182 d1 = MIN(pd - pc, pn - pd - (ssize_t)es); in local_qsort() 183 vecswap(pb, pn - d1, d1); in local_qsort() 195 a = pn - d2; in local_qsort() 202 local_qsort(pn - d2, d2 / es, es, cmp, thunk); in local_qsort()
|
/freebsd/contrib/diff/lib/ |
H A D | xmalloc.c | 176 x2nrealloc_inline (void *p, size_t *pn, size_t s) in x2nrealloc_inline() argument 178 size_t n = *pn; in x2nrealloc_inline() 201 *pn = n; in x2nrealloc_inline() 206 x2nrealloc (void *p, size_t *pn, size_t s) in x2nrealloc() argument 208 return x2nrealloc_inline (p, pn, s); in x2nrealloc() 218 x2realloc (void *p, size_t *pn) in x2realloc() argument 220 return x2nrealloc_inline (p, pn, 1); in x2realloc()
|
/freebsd/sys/net80211/ |
H A D | ieee80211_crypto_ccmp.c | 90 static int ccmp_decrypt(struct ieee80211_key *, u_int64_t pn, 240 uint64_t pn; in ccmp_decap() local 263 pn = READ_6(ivp[0], ivp[1], ivp[4], ivp[5], ivp[6], ivp[7]); in ccmp_decap() 264 if (pn <= k->wk_keyrsc[tid] && in ccmp_decap() 269 ieee80211_notify_replay_failure(vap, wh, k, pn, tid); in ccmp_decap() 282 !ccmp_decrypt(k, pn, m, hdrlen)) in ccmp_decap() 305 k->wk_keyrsc[tid] = pn; in ccmp_decap() 344 u_int64_t pn, size_t dlen, in ccmp_init_blocks() argument 358 b0[8] = pn >> 40; in ccmp_init_blocks() 359 b0[9] = pn >> 32; in ccmp_init_blocks() [all …]
|
/freebsd/sys/contrib/dev/iwlwifi/mvm/ |
H A D | d3.c | 90 const u8 *ret = seq->ccmp.pn; in iwl_mvm_find_max_pn() 98 const u8 *tmp = ptk_pn->q[i].pn[tid]; in iwl_mvm_find_max_pn() 281 aes_tx_sc->pn = cpu_to_le64(pn64); in iwl_mvm_wowlan_get_rsc_tsc_data() 294 const u8 *pn; in iwl_mvm_wowlan_get_rsc_tsc_data() local 305 pn = iwl_mvm_find_max_pn(key, ptk_pn, &seq, i, in iwl_mvm_wowlan_get_rsc_tsc_data() 307 aes_sc[i].pn = cpu_to_le64((u64)pn[5] | in iwl_mvm_wowlan_get_rsc_tsc_data() 308 ((u64)pn[4] << 8) | in iwl_mvm_wowlan_get_rsc_tsc_data() 309 ((u64)pn[3] << 16) | in iwl_mvm_wowlan_get_rsc_tsc_data() 310 ((u64)pn[ in iwl_mvm_wowlan_get_rsc_tsc_data() 318 u8 *pn = seq.ccmp.pn; iwl_mvm_wowlan_get_rsc_tsc_data() local 415 const u8 *pn; iwl_mvm_wowlan_get_rsc_v5_data() local 439 u8 *pn = seq.ccmp.pn; iwl_mvm_wowlan_get_rsc_v5_data() local 1582 u64 pn = le64_to_cpu(le_pn); iwl_mvm_le64_to_aes_seq() local 1600 u64 pn = le64_to_cpu(le_pn); iwl_mvm_le64_to_tkip_seq() local [all...] |