/freebsd/sys/kern/ |
H A D | sys_procdesc.c | 124 struct procdesc *pd; in procdesc_find() local 135 pd = fp->f_data; in procdesc_find() 137 if (pd->pd_proc != NULL) { in procdesc_find() 138 *p = pd->pd_proc; in procdesc_find() 155 struct procdesc *pd; in procdesc_pid() local 160 pd = fp_procdesc->f_data; in procdesc_pid() 161 return (pd->pd_pid); in procdesc_pid() 211 struct procdesc *pd; in procdesc_new() local 213 pd = malloc(sizeof(*pd), M_PROCDESC, M_WAITOK | M_ZERO); in procdesc_new() 214 pd->pd_proc = p; in procdesc_new() [all …]
|
H A D | subr_devmap.c | 65 const struct devmap_entry *pd; in devmap_dump_table() local 73 for (pd = devmap_table; pd->pd_size != 0; ++pd) { in devmap_dump_table() 75 (uintmax_t)pd->pd_pa, in devmap_dump_table() 76 (uintmax_t)(pd->pd_pa + pd->pd_size - 1), in devmap_dump_table() 77 (uintmax_t)pd->pd_va); in devmap_dump_table() 98 const struct devmap_entry *pd; in devmap_lastaddr() local 105 for (pd = devmap_table; pd != NULL && pd->pd_size != 0; ++pd) { in devmap_lastaddr() 106 if (lowaddr > pd->pd_va) in devmap_lastaddr() 107 lowaddr = pd->pd_va; in devmap_lastaddr() 172 const struct devmap_entry *pd; in devmap_bootstrap() local [all …]
|
/freebsd/sys/contrib/openzfs/module/icp/include/sys/crypto/ |
H A D | impl.h | 89 #define KCF_IS_PROV_USABLE(pd) ((pd)->pd_state == KCF_PROV_READY) argument 90 #define KCF_IS_PROV_REMOVED(pd) ((pd)->pd_state >= KCF_PROV_REMOVED) argument 229 #define KCF_TO_PROV_MECH_INDX(pd, mech_type) \ argument 230 ((pd)->pd_mech_indx[KCF_MECH2CLASS(mech_type)] \ 233 #define KCF_TO_PROV_MECHINFO(pd, mech_type) \ argument 234 ((pd)->pd_mechanisms[KCF_TO_PROV_MECH_INDX(pd, mech_type)]) 236 #define KCF_TO_PROV_MECHNUM(pd, mech_type) \ argument 237 (KCF_TO_PROV_MECHINFO(pd, mech_type).cm_mech_number) 255 #define KCF_PROV_CIPHER_OPS(pd) ((pd)->pd_ops_vector->co_cipher_ops) argument 256 #define KCF_PROV_MAC_OPS(pd) ((pd)->pd_ops_vector->co_mac_ops) argument [all …]
|
/freebsd/crypto/openssl/crypto/ |
H A D | param_build.c | 55 OSSL_PARAM_BLD_DEF *pd = OPENSSL_zalloc(sizeof(*pd)); in param_push() local 57 if (pd == NULL) { in param_push() 61 pd->key = key; in param_push() 62 pd->type = type; in param_push() 63 pd->size = size; in param_push() 64 pd->alloc_blocks = ossl_param_bytes_to_blocks(alloc); in param_push() 65 if ((pd->secure = secure) != 0) in param_push() 66 bld->secure_blocks += pd->alloc_blocks; in param_push() 68 bld->total_blocks += pd->alloc_blocks; in param_push() 69 if (sk_OSSL_PARAM_BLD_DEF_push(bld->params, pd) <= 0) { in param_push() [all …]
|
/freebsd/sys/netpfil/pf/ |
H A D | pf.c | 415 if ((pd->dir) == PF_OUT) \ 422 #define PACKET_LOOPED(pd) ((pd)->pf_mtag && \ argument 423 (pd)->pf_mtag->flags & PF_MTAG_FLAG_PACKET_LOOPED) 425 #define STATE_LOOKUP(k, s, pd) \ argument 427 (s) = pf_find_state((pd->kif), (k), (pd->dir)); \ 428 SDT_PROBE5(pf, ip, state, lookup, pd->kif, k, (pd->dir), pd, (s)); \ 431 if (PACKET_LOOPED(pd)) \ 599 pf_packet_rework_nat(struct mbuf *m, struct pf_pdesc *pd, int off, in pf_packet_rework_nat() argument 603 switch (pd->proto) { in pf_packet_rework_nat() 605 struct tcphdr *th = &pd->hdr.tcp; in pf_packet_rework_nat() [all …]
|
H A D | pf_syncookies.c | 263 pf_synflood_check(struct pf_pdesc *pd) in pf_synflood_check() argument 265 MPASS(pd->proto == IPPROTO_TCP); in pf_synflood_check() 268 if (pd->pf_mtag && (pd->pf_mtag->flags & PF_MTAG_FLAG_SYNCOOKIE_RECREATED)) in pf_synflood_check() 292 pf_syncookie_send(struct pf_pdesc *pd) in pf_syncookie_send() argument 297 mss = max(V_tcp_mssdflt, pf_get_mss(pd)); in pf_syncookie_send() 298 iss = pf_syncookie_generate(pd, mss); in pf_syncookie_send() 299 pf_send_tcp(NULL, pd->af, pd->dst, pd->src, *pd->dport, *pd->sport, in pf_syncookie_send() 300 iss, ntohl(pd->hdr.tcp.th_seq) + 1, TH_SYN|TH_ACK, 0, mss, in pf_syncookie_send() 301 0, M_SKIP_FIREWALL | (pd->m->m_flags & M_LOOP), 0, 0, in pf_syncookie_send() 302 pd->act.rtableid); in pf_syncookie_send() [all …]
|
H A D | pf_norm.c | 966 struct pf_pdesc pd; in pf_refragment6() local 1030 memset(&pd, 0, sizeof(pd)); in pf_refragment6() 1031 pd.pf_mtag = pf_find_mtag(m); in pf_refragment6() 1051 struct pf_pdesc *pd) in pf_normalize_ip() argument 1066 MPASS(pd->m == *m0); in pf_normalize_ip() 1082 if (pfi_kkif_match(r->kif, pd->kif) == r->ifnot) in pf_normalize_ip() 1084 else if (r->direction && r->direction != pd->dir) in pf_normalize_ip() 1092 r->src.neg, pd->kif, M_GETFIB(pd->m))) in pf_normalize_ip() 1096 r->dst.neg, NULL, M_GETFIB(pd->m))) in pf_normalize_ip() 1098 else if (r->match_tag && !pf_match_tag(pd->m, r, &tag, in pf_normalize_ip() [all …]
|
/freebsd/contrib/libpcap/ |
H A D | pcap-dpdk.c | 254 static int dpdk_init_timer(struct pcap_dpdk *pd){ in dpdk_init_timer() argument 255 gettimeofday(&(pd->ts_helper.start_time),NULL); in dpdk_init_timer() 256 pd->ts_helper.start_cycles = rte_get_timer_cycles(); in dpdk_init_timer() 257 pd->ts_helper.hz = rte_get_timer_hz(); in dpdk_init_timer() 258 if (pd->ts_helper.hz == 0){ in dpdk_init_timer() 287 struct pcap_dpdk *pd = (struct pcap_dpdk*)(p->priv); in dpdk_read_with_timeout() local 291 if (pd->nonblock){ in dpdk_read_with_timeout() 293 nb_rx = (int)rte_eth_rx_burst(pd->portid, 0, pkts_burst, burst_cnt); in dpdk_read_with_timeout() 298 nb_rx = (int)rte_eth_rx_burst(pd->portid, 0, pkts_burst, burst_cnt); in dpdk_read_with_timeout() 317 struct pcap_dpdk *pd = (struct pcap_dpdk*)(p->priv); in pcap_dpdk_dispatch() local [all …]
|
H A D | pcap-dag.c | 239 struct pcap_dag *pd = p->priv; in dag_platform_cleanup() local 241 if(dag_stop_stream(p->fd, pd->dag_stream) < 0) in dag_platform_cleanup() 244 if(dag_detach_stream(p->fd, pd->dag_stream) < 0) in dag_platform_cleanup() 247 if(pd->dag_ref != NULL) { in dag_platform_cleanup() 248 dag_config_dispose(pd->dag_ref); in dag_platform_cleanup() 257 pd->dag_ref = NULL; in dag_platform_cleanup() 339 struct pcap_dag *pd = p->priv; in dag_read() local 341 unsigned int nonblocking = pd->dag_flags & DAGF_NONBLOCK; in dag_read() 346 while (pd->dag_mem_top - pd->dag_mem_bottom < dag_record_size) { in dag_read() 372 …if ( NULL == (pd->dag_mem_top = dag_advance_stream(p->fd, pd->dag_stream, &(pd->dag_mem_bottom))) … in dag_read() [all …]
|
/freebsd/stand/efi/libefi/ |
H A D | efipart.c | 137 pdinfo_t *pd = NULL; in efiblk_get_pdinfo() local 141 return (pd); in efiblk_get_pdinfo() 143 STAILQ_FOREACH(pd, pdi, pd_link) { in efiblk_get_pdinfo() 144 if (pd->pd_unit == dev->d_unit) in efiblk_get_pdinfo() 145 return (pd); in efiblk_get_pdinfo() 147 return (pd); in efiblk_get_pdinfo() 164 same_handle(pdinfo_t *pd, EFI_HANDLE h) in same_handle() argument 167 return (pd->pd_handle == h || pd->pd_alias == h); in same_handle() 204 pdinfo_t *pd; in efiblk_pdinfo_count() local 207 STAILQ_FOREACH(pd, pdi, pd_link) { in efiblk_pdinfo_count() [all …]
|
/freebsd/sys/contrib/openzfs/module/icp/api/ |
H A D | kcf_mac.c | 89 kcf_provider_desc_t *pd; in crypto_mac() local 96 if ((pd = kcf_get_mech_provider(mech->cm_type, &me, &error, in crypto_mac() 107 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech); in crypto_mac() 108 error = KCF_PROV_MAC_ATOMIC(pd, &lmech, key, data, in crypto_mac() 113 if (kcf_insert_triedlist(&list, pd, KM_SLEEP) != NULL) in crypto_mac() 120 KCF_PROV_REFRELE(pd); in crypto_mac() 156 crypto_mac_init_prov(kcf_provider_desc_t *pd, in crypto_mac_init_prov() argument 162 kcf_provider_desc_t *real_provider = pd; in crypto_mac_init_prov() 164 ASSERT(KCF_PROV_REFHELD(pd)); in crypto_mac_init_prov() 195 kcf_provider_desc_t *pd; in crypto_mac_init() local [all …]
|
H A D | kcf_cipher.c | 73 kcf_provider_desc_t *pd; in crypto_encrypt() local 80 if ((pd = kcf_get_mech_provider(mech->cm_type, &me, &error, in crypto_encrypt() 91 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech); in crypto_encrypt() 92 error = KCF_PROV_ENCRYPT_ATOMIC(pd, &lmech, key, in crypto_encrypt() 97 if (kcf_insert_triedlist(&list, pd, KM_SLEEP) != NULL) in crypto_encrypt() 104 KCF_PROV_REFRELE(pd); in crypto_encrypt() 144 kcf_provider_desc_t *pd; in crypto_decrypt() local 151 if ((pd = kcf_get_mech_provider(mech->cm_type, &me, &error, in crypto_decrypt() 162 KCF_SET_PROVIDER_MECHNUM(mech->cm_type, pd, &lmech); in crypto_decrypt() 164 error = KCF_PROV_DECRYPT_ATOMIC(pd, &lmech, key, in crypto_decrypt() [all …]
|
/freebsd/sys/dev/mthca/ |
H A D | mthca_pd.c | 39 int mthca_pd_alloc(struct mthca_dev *dev, int privileged, struct mthca_pd *pd) in mthca_pd_alloc() argument 43 pd->privileged = privileged; in mthca_pd_alloc() 45 atomic_set(&pd->sqp_count, 0); in mthca_pd_alloc() 46 pd->pd_num = mthca_alloc(&dev->pd_table.alloc); in mthca_pd_alloc() 47 if (pd->pd_num == -1) in mthca_pd_alloc() 51 err = mthca_mr_alloc_notrans(dev, pd->pd_num, in mthca_pd_alloc() 54 &pd->ntmr); in mthca_pd_alloc() 56 mthca_free(&dev->pd_table.alloc, pd->pd_num); in mthca_pd_alloc() 62 void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd) in mthca_pd_free() argument 64 if (pd->privileged) in mthca_pd_free() [all …]
|
/freebsd/sys/dev/vnic/ |
H A D | thunder_mdio.c | 367 struct phy_desc *pd = NULL; in get_phy_desc() local 370 TAILQ_FOREACH(pd, &sc->phy_desc_head, phy_desc_list) { in get_phy_desc() 371 if (pd->lmacid == lmacid) in get_phy_desc() 375 return (pd); in get_phy_desc() 383 struct phy_desc *pd; in thunder_mdio_media_status() local 388 pd = get_phy_desc(sc, lmacid); in thunder_mdio_media_status() 389 if (pd == NULL) { in thunder_mdio_media_status() 396 mii_sc = device_get_softc(pd->miibus); in thunder_mdio_media_status() 443 struct phy_desc *pd; in thunder_mdio_phy_connect() local 449 pd = get_phy_desc(sc, lmacid); in thunder_mdio_phy_connect() [all …]
|
/freebsd/contrib/libpcap/testprogs/ |
H A D | nonblocktest.c | 45 static pcap_t *pd; variable 100 pcap_breakloop(pd); in breakme() 134 pd = pcap_create(device, ebuf); in main() 135 if (pd == NULL) in main() 140 if (pcap_setnonblock(pd, 1, ebuf) < 0) in main() 143 ret = pcap_getnonblock(pd, ebuf); in main() 146 if ((status = pcap_activate(pd)) < 0) in main() 148 ret = pcap_getnonblock(pd, ebuf); in main() 154 if (pcap_setnonblock(pd, 1, ebuf) < 0) in main() 156 ret = pcap_getnonblock(pd, ebuf); in main() [all …]
|
H A D | writecaptest.c | 62 static pcap_t *pd; variable 68 pcap_breakloop(pd); in stop_capture() 75 pcap_breakloop(pd); in stop_capture() 322 pd = pcap_create(device, ebuf); in main() 323 if (pd == NULL) in main() 325 status = pcap_activate(pd); in main() 331 pcap_statustostr(status), pcap_geterr(pd)); in main() 333 ndlts = pcap_list_datalinks(pd, &dlts); in main() 339 pcap_statustostr(status), pcap_geterr(pd)); in main() 350 pcap_close(pd); in main() [all …]
|
H A D | capturetest.c | 63 static pcap_t *pd; variable 73 pcap_breakloop(pd); in sigint_handler() 211 pd = pcap_create(device, ebuf); in main() 212 if (pd == NULL) in main() 214 status = pcap_set_snaplen(pd, 65535); in main() 219 status = pcap_set_immediate_mode(pd, 1); in main() 224 status = pcap_set_timeout(pd, timeout); in main() 228 status = pcap_activate(pd); in main() 234 pcap_statustostr(status), pcap_geterr(pd)); in main() 241 pcap_statustostr(status), pcap_geterr(pd)); in main() [all …]
|
H A D | opentest.c | 65 pcap_t *pd; in main() local 140 pd = pcap_create(device, ebuf); in main() 141 if (pd == NULL) in main() 143 status = pcap_set_snaplen(pd, snaplen); in main() 148 status = pcap_set_promisc(pd, 1); in main() 154 status = pcap_set_rfmon(pd, 1); in main() 159 status = pcap_set_timeout(pd, 1000); in main() 164 status = pcap_set_buffer_size(pd, bufsize); in main() 169 status = pcap_activate(pd); in main() 175 pcap_statustostr(status), pcap_geterr(pd)); in main() [all …]
|
/freebsd/sys/contrib/openzfs/module/icp/core/ |
H A D | kcf_callprov.c | 43 kcf_insert_triedlist(kcf_prov_tried_t **list, kcf_provider_desc_t *pd, in kcf_insert_triedlist() argument 52 l->pt_pd = pd; in kcf_insert_triedlist() 60 is_in_triedlist(kcf_provider_desc_t *pd, kcf_prov_tried_t *triedl) in is_in_triedlist() argument 63 if (triedl->pt_pd == pd) in is_in_triedlist() 86 kcf_provider_desc_t *pd = NULL; in kcf_get_mech_provider() local 111 if (pd == NULL && (mdesc = me->me_sw_prov) != NULL) { in kcf_get_mech_provider() 112 pd = mdesc->pm_prov_desc; in kcf_get_mech_provider() 114 !KCF_IS_PROV_USABLE(pd) || in kcf_get_mech_provider() 115 IS_PROVIDER_TRIED(pd, triedl)) in kcf_get_mech_provider() 116 pd = NULL; in kcf_get_mech_provider() [all …]
|
H A D | kcf_sched.c | 45 kcf_new_ctx(kcf_provider_desc_t *pd) in kcf_new_ctx() argument 56 KCF_PROV_REFHOLD(pd); in kcf_new_ctx() 57 kcf_ctx->kc_prov_desc = pd; in kcf_new_ctx() 80 kcf_provider_desc_t *pd = kcf_ctx->kc_prov_desc; in kcf_free_context() local 84 mutex_enter(&pd->pd_lock); in kcf_free_context() 85 if (!KCF_IS_PROV_REMOVED(pd)) { in kcf_free_context() 91 KCF_PROV_IREFHOLD(pd); in kcf_free_context() 92 mutex_exit(&pd->pd_lock); in kcf_free_context() 93 (void) KCF_PROV_FREE_CONTEXT(pd, gctx); in kcf_free_context() 94 KCF_PROV_IREFRELE(pd); in kcf_free_context() [all …]
|
/freebsd/sys/geom/raid/ |
H A D | md_jmicron.c | 358 struct g_raid_md_jmicron_perdisk *pd; in g_raid_md_jmicron_get_disk() local 361 pd = (struct g_raid_md_jmicron_perdisk *)disk->d_md_data; in g_raid_md_jmicron_get_disk() 362 if (pd->pd_disk_pos == id) in g_raid_md_jmicron_get_disk() 427 struct g_raid_md_jmicron_perdisk *pd, *oldpd; in g_raid_md_jmicron_start_disk() local 435 pd = (struct g_raid_md_jmicron_perdisk *)disk->d_md_data; in g_raid_md_jmicron_start_disk() 439 if (pd->pd_meta != NULL) in g_raid_md_jmicron_start_disk() 440 disk_pos = jmicron_meta_find_disk(meta, pd->pd_disk_id); in g_raid_md_jmicron_start_disk() 459 pd->pd_disk_size) { in g_raid_md_jmicron_start_disk() 462 pd->pd_disk_size, in g_raid_md_jmicron_start_disk() 477 if (disk_pos == -3 || pd->pd_disk_pos == -3) { in g_raid_md_jmicron_start_disk() [all …]
|
H A D | md_sii.c | 415 struct g_raid_md_sii_perdisk *pd; in g_raid_md_sii_get_disk() local 418 pd = (struct g_raid_md_sii_perdisk *)disk->d_md_data; in g_raid_md_sii_get_disk() 419 if (pd->pd_disk_pos == id) in g_raid_md_sii_get_disk() 482 struct g_raid_md_sii_perdisk *pd, *oldpd; in g_raid_md_sii_start_disk() local 490 pd = (struct g_raid_md_sii_perdisk *)disk->d_md_data; in g_raid_md_sii_start_disk() 494 if (pd->pd_meta != NULL) in g_raid_md_sii_start_disk() 495 disk_pos = sii_meta_disk_pos(meta, pd->pd_meta); in g_raid_md_sii_start_disk() 514 pd->pd_disk_size) { in g_raid_md_sii_start_disk() 517 pd->pd_disk_size, in g_raid_md_sii_start_disk() 532 if (disk_pos == -3 || pd->pd_disk_pos == -3) { in g_raid_md_sii_start_disk() [all …]
|
H A D | md_promise.c | 579 struct g_raid_md_promise_perdisk *pd; in g_raid_md_promise_purge_disks() local 586 pd = (struct g_raid_md_promise_perdisk *)disk->d_md_data; in g_raid_md_promise_purge_disks() 589 for (i = 0; i < pd->pd_subdisks; ) { in g_raid_md_promise_purge_disks() 591 pd->pd_meta[i]->volume_id); in g_raid_md_promise_purge_disks() 596 free(pd->pd_meta[i], M_MD_PROMISE); in g_raid_md_promise_purge_disks() 597 for (j = i; j < pd->pd_subdisks - 1; j++) in g_raid_md_promise_purge_disks() 598 pd->pd_meta[j] = pd->pd_meta[j + 1]; in g_raid_md_promise_purge_disks() 599 pd->pd_meta[pd->pd_subdisks - 1] = NULL; in g_raid_md_promise_purge_disks() 600 pd->pd_subdisks--; in g_raid_md_promise_purge_disks() 601 pd->pd_updated = 1; in g_raid_md_promise_purge_disks() [all …]
|
/freebsd/contrib/capsicum-test/ |
H A D | procdesc.cc | 33 static pid_t pdwait4_(int pd, int *status, int options, struct rusage *ru) { in pdwait4_() argument 35 return pdwait4(pd, status, options, ru); in pdwait4_() 39 int rc = pdgetpid(pd, &pid); in pdwait4_() 110 int pd = -1; in TEST() local 114 int pid = pdfork(&pd, 0); in TEST() 118 EXPECT_EQ(-1, pd); in TEST() 132 EXPECT_NE(-1, pd); in TEST() 135 EXPECT_OK(pdgetpid(pd, &pid_got)); in TEST() 149 int waitrc = pdwait4_(pd, &status, 0, &ru); in TEST() 152 fprintf(stderr, "For pd %d pid %d:\n", pd, pid); in TEST() [all …]
|
/freebsd/sys/ofed/drivers/infiniband/core/ |
H A D | ib_verbs.c | 267 struct ib_pd *pd; in __ib_alloc_pd() local 271 pd = rdma_zalloc_drv_obj(device, ib_pd); in __ib_alloc_pd() 272 if (!pd) in __ib_alloc_pd() 275 pd->device = device; in __ib_alloc_pd() 276 pd->uobject = NULL; in __ib_alloc_pd() 277 pd->__internal_mr = NULL; in __ib_alloc_pd() 278 atomic_set(&pd->usecnt, 0); in __ib_alloc_pd() 279 pd->flags = flags; in __ib_alloc_pd() 281 ret = device->alloc_pd(pd, NULL); in __ib_alloc_pd() 283 kfree(pd); in __ib_alloc_pd() [all …]
|