| /src/sys/dev/hid/ |
| H A D | hidmap.c | 52 #define DPRINTFN(hm, n, fmt, ...) do { \ argument 53 if ((hm)->debug_var != NULL && *(hm)->debug_var >= (n)) { \ 54 device_printf((hm)->dev, "%s: " fmt, \ 58 #define DPRINTF(hm, ...) DPRINTFN(hm, 1, __VA_ARGS__) argument 67 #define HIDMAP_WANT_MERGE_KEYS(hm) ((hm)->key_rel != NULL) argument 69 #define HIDMAP_FOREACH_ITEM(hm, mi, uoff) \ argument 72 (hm), &_map, &_item, &_uoff_priv, &(uoff))) != NULL;) 90 hidmap_get_next_map_item(struct hidmap *hm, u_int *map, u_int *item, in hidmap_get_next_map_item() argument 96 hm->map[*map], hm->nmap_items[*map], item, uoff)) { in hidmap_get_next_map_item() 100 if (*map >= hm->nmaps) in hidmap_get_next_map_item() [all …]
|
| H A D | hidmap.h | 59 struct hidmap *hm, struct hidmap_hid_item *hi, union hidmap_cb_ctx ctx 64 ((hm == NULL) ? HIDMAP_CB_IS_PROBING : hm->cb_state) 66 (hm == NULL ? NULL : hm->dev) 68 (hm == NULL ? NULL : device_get_softc(hm->dev)) 70 (hm == NULL ? NULL : hm->evdev) 76 hid_get_data(hm->intr_buf, hm->intr_len, (loc)) 78 hid_get_udata(hm->intr_buf, hm->intr_len, (loc)) 233 hidmap_set_dev(struct hidmap *hm, device_t dev) in hidmap_set_dev() argument 235 hm->dev = dev; in hidmap_set_dev() 244 void _hidmap_set_debug_var(struct hidmap *hm, int *debug_var); [all …]
|
| H A D | hms.c | 116 struct hidmap hm; member 133 struct hidmap *hm = context; in hms_intr() local 134 struct hms_softc *sc = device_get_softc(hm->dev); in hms_intr() 185 hidbus_set_intr(sc->hm.dev, hms_intr, &sc->hm); in hms_final_cb() 223 hidmap_set_dev(&sc->hm, dev); in hms_probe() 226 error = HIDMAP_ADD_MAP(&sc->hm, hms_map, sc->caps); in hms_probe() 271 HIDMAP_ADD_MAP(&sc->hm, hms_map_wheel_rev, cap_wheel); in hms_attach() 273 HIDMAP_ADD_MAP(&sc->hm, hms_map_wheel, cap_wheel); in hms_attach() 276 HIDMAP_ADD_MAP(&sc->hm, hms_map_kensington_slimblade, NULL); in hms_attach() 293 error = hidmap_attach(&sc->hm); in hms_attach() [all …]
|
| H A D | hpen.c | 174 struct hidmap *hm = device_get_softc(dev); in hpen_probe() local 186 hidmap_set_dev(hm, dev); in hpen_probe() 189 error = HIDMAP_ADD_MAP(hm, hpen_map_pen, NULL); in hpen_probe() 198 HIDMAP_ADD_MAP(hm, hpen_map_finger, NULL); in hpen_probe() 201 HIDMAP_ADD_MAP(hm, hpen_map_stylus, NULL); in hpen_probe() 216 struct hidmap *hm = device_get_softc(dev); in hpen_attach() local 234 return (hidmap_attach(hm)); in hpen_attach()
|
| H A D | ps4dshock.c | 661 struct hidmap hm; member 676 struct hidmap hm; member 685 struct hidmap hm; member 982 if (hid_test_quirk(hid_get_device_info(sc->hm.dev), in ps4dsmtp_final_cb() 1059 return (hid_write(sc->hm.dev, buf, osize)); in ps4dshock_write() 1134 hidmap_set_debug_var(&sc->hm, &HID_DEBUG_VAR); in ps4dshock_probe() 1136 HIDMAP_PROBE(&sc->hm, dev, ps4dshock_devs, ps4dshock_map, NULL) in ps4dshock_probe() 1145 hidmap_set_debug_var(&sc->hm, &HID_DEBUG_VAR); in ps4dsacc_probe() 1147 HIDMAP_PROBE(&sc->hm, dev, ps4dsacc_devs, ps4dsacc_map, "Sensors") in ps4dsacc_probe() 1154 struct hidmap *hm = device_get_softc(dev); in ps4dshead_probe() local [all …]
|
| H A D | xb360gp.c | 124 hidmap_set_dev(&sc->hm, dev); in xb360gp_probe() 126 error = HIDMAP_ADD_MAP(&sc->hm, xb360gp_map, NULL); in xb360gp_probe() 152 return (hidmap_attach(&sc->hm)); in xb360gp_attach() 160 return (hidmap_detach(&sc->hm)); in xb360gp_detach()
|
| H A D | hgame.c | 195 error = HIDMAP_PROBE(&sc->hm, dev, hgame_devs, hgame_map, NULL); in hgame_probe() 212 return (hidmap_attach(&sc->hm)); in hgame_attach() 220 return (hidmap_detach(&sc->hm)); in hgame_detach()
|
| /src/crypto/libecc/src/examples/hash/ |
| H A D | hash.c | 14 …ash_alg_type gen_hash_type, hash_alg_type *hash_type, const hash_mapping **hm, u8 *hlen, u8 *block… in get_libecc_hash() argument 19 MUST_HAVE((hash_type != NULL) && (hm != NULL), ret, err); in get_libecc_hash() 150 ret = get_hash_by_type(htype, hm); EG(ret, err); in get_libecc_hash() 160 if(ret && (hm != NULL)){ in get_libecc_hash() 161 (*hm) = NULL; in get_libecc_hash() 222 const hash_mapping *hm; in gen_hash_get_hash_sizes() local 224 … ret = get_libecc_hash(gen_hash_type, &hash_type, &hm, hlen, block_size); EG(ret, err); in gen_hash_get_hash_sizes() 276 const hash_mapping *hm; in gen_hash_hfunc_scattered() local 279 ret = get_libecc_hash(gen_hash_type, &hash_type, &hm, &hlen, &block_size); EG(ret, err); in gen_hash_hfunc_scattered() 280 MUST_HAVE((hm != NULL), ret, err); in gen_hash_hfunc_scattered() [all …]
|
| /src/crypto/libecc/src/sig/ |
| H A D | bip0340.c | 47 const hash_mapping *hm, hash_context *h_ctx) in _bip0340_hash() argument 54 ret = hash_mapping_callbacks_sanity_check(hm); EG(ret, err); in _bip0340_hash() 56 ret = hm->hfunc_init(h_ctx); EG(ret, err); in _bip0340_hash() 57 ret = hm->hfunc_update(h_ctx, tag, tag_len); EG(ret, err); in _bip0340_hash() 58 ret = hm->hfunc_finalize(h_ctx, hash); EG(ret, err); in _bip0340_hash() 61 ret = hm->hfunc_init(h_ctx); EG(ret, err); in _bip0340_hash() 62 ret = hm->hfunc_update(h_ctx, hash, hm->digest_size); EG(ret, err); in _bip0340_hash() 63 ret = hm->hfunc_update(h_ctx, hash, hm->digest_size); EG(ret, err); in _bip0340_hash() 64 ret = hm->hfunc_update(h_ctx, m, m_len); EG(ret, err); in _bip0340_hash() 177 const hash_mapping *hm; in _bip0340_sign() local [all …]
|
| H A D | sig_algs.c | 301 const hash_mapping *hm; in _ec_sign_init() local 311 for (i = 0, hm = &hash_maps[i]; in _ec_sign_init() 312 hm->type != UNKNOWN_HASH_ALG; hm = &hash_maps[++i]) { in _ec_sign_init() 313 if (hm->type == hash_type) { in _ec_sign_init() 356 ret = hash_mapping_sanity_check(hm); EG(ret, err); in _ec_sign_init() 363 ctx->h = hm; in _ec_sign_init() 517 const hash_mapping *hm; in ec_verify_init() local 527 for (i = 0, hm = &hash_maps[i]; in ec_verify_init() 528 hm->type != UNKNOWN_HASH_ALG; hm = &hash_maps[++i]) { in ec_verify_init() 529 if (hm->type == hash_type) { in ec_verify_init() [all …]
|
| H A D | sm2.c | 141 const hash_mapping *hm; in sm2_compute_Z() local 154 ret = get_hash_by_type(hash_type, &hm); EG(ret, err); in sm2_compute_Z() 155 MUST_HAVE((hm != NULL), ret, err); in sm2_compute_Z() 158 hsize = hm->digest_size; in sm2_compute_Z() 171 ret = hash_mapping_callbacks_sanity_check(hm); EG(ret, err); in sm2_compute_Z() 172 ret = hm->hfunc_init(&hctx); EG(ret, err); in sm2_compute_Z() 177 ret = hm->hfunc_update(&hctx, buf, 2); EG(ret, err); in sm2_compute_Z() 180 ret = hm->hfunc_update(&hctx, id, id_len); EG(ret, err); in sm2_compute_Z() 184 ret = hm->hfunc_update(&hctx, buf, p_len); EG(ret, err); in sm2_compute_Z() 188 ret = hm->hfunc_update(&hctx, buf, p_len); EG(ret, err); in sm2_compute_Z() [all …]
|
| H A D | ecfsdsa.c | 671 const hash_mapping *hm; in _ecfsdsa_verify_batch_no_memory() local 697 ret = get_hash_by_type(hash_type, &hm); EG(ret, err); in _ecfsdsa_verify_batch_no_memory() 698 hsize = hm->digest_size; in _ecfsdsa_verify_batch_no_memory() 699 MUST_HAVE((hm != NULL), ret, err); in _ecfsdsa_verify_batch_no_memory() 773 ret = hm->hfunc_init(&h_ctx); EG(ret, err); in _ecfsdsa_verify_batch_no_memory() 774 ret = hm->hfunc_update(&h_ctx, &sig[0], (u32)(2 * p_len)); EG(ret, err); in _ecfsdsa_verify_batch_no_memory() 775 ret = hm->hfunc_update(&h_ctx, m[i], m_len[i]); EG(ret, err); in _ecfsdsa_verify_batch_no_memory() 776 ret = hm->hfunc_finalize(&h_ctx, hash); EG(ret, err); in _ecfsdsa_verify_batch_no_memory() 854 const hash_mapping *hm; in _ecfsdsa_verify_batch() local 917 ret = get_hash_by_type(hash_type, &hm); EG(ret, err); in _ecfsdsa_verify_batch() [all …]
|
| H A D | eddsa.c | 2305 const hash_mapping *hm; local 2332 ret = get_hash_by_type(hash_type, &hm); EG(ret, err); 2333 hsize = hm->digest_size; 2334 MUST_HAVE((hm != NULL), ret, err); 2408 ret = hash_mapping_callbacks_sanity_check(hm); EG(ret, err); 2409 ret = hm->hfunc_init(&h_ctx); EG(ret, err); 2410 ret = hm->hfunc_init(&h_ctx_pre_hash); EG(ret, err); 2415 ret = dom2(0, adata[i], adata_len[i], hm, &h_ctx); EG(ret, err); 2418 ret = dom2(1, adata[i], adata_len[i], hm, &h_ctx); EG(ret, err); 2423 ret = dom4(0, adata[i], adata_len[i], hm, &h_ctx); EG(ret, err); [all …]
|
| /src/crypto/openssl/crypto/slh_dsa/ |
| H A D | slh_xmss.c | 93 uint32_t h, hm = key->params->hm; in ossl_slh_xmss_sign() local 109 for (h = 0; h < hm; ++h) { in ossl_slh_xmss_sign() 152 uint32_t hm = key->params->hm; in ossl_slh_xmss_pk_from_sig() local 164 for (k = 0; k < hm; ++k) { in ossl_slh_xmss_pk_from_sig()
|
| H A D | slh_hypertree.c | 44 uint32_t hm = params->hm; in ossl_slh_ht_sign() local 48 mask = (1 << hm) - 1; /* A mod 2^h = A & ((2^h - 1))) */ in ossl_slh_ht_sign() 87 tree_id >>= hm; in ossl_slh_ht_sign() 116 uint32_t tree_height = params->hm; in ossl_slh_ht_verify()
|
| H A D | slh_dsa.c | 341 tree_id_len = ((params->h - params->hm + 7) >> 3); /* 7 or 8 bytes */ in get_tree_ids() 342 leaf_id_len = ((params->hm + 7) >> 3); /* 1 or 2 bytes */ in get_tree_ids() 356 tree_id_mask = (~(uint64_t)0) >> (64 - (params->h - params->hm)); in get_tree_ids() 357 leaf_id_mask = ((uint64_t)1 << params->hm) - 1; /* max value is 0x1FF when hm = 9 */ in get_tree_ids()
|
| /src/sys/netgraph/ |
| H A D | ng_vjc.c | 441 struct mbuf *hm; in ng_vjc_rcvdata() local 475 MGETHDR(hm, M_NOWAIT, MT_DATA); in ng_vjc_rcvdata() 476 if (hm == NULL) { in ng_vjc_rcvdata() 482 hm->m_len = 0; in ng_vjc_rcvdata() 483 hm->m_pkthdr.rcvif = NULL; in ng_vjc_rcvdata() 485 if (!(MCLGET(hm, M_NOWAIT))) { in ng_vjc_rcvdata() 486 m_freem(hm); in ng_vjc_rcvdata() 493 bcopy(hdr, mtod(hm, u_char *), hlen); in ng_vjc_rcvdata() 494 hm->m_len = hlen; in ng_vjc_rcvdata() 497 hm->m_next = m; in ng_vjc_rcvdata() [all …]
|
| /src/sys/netpfil/ipfilter/netinet/ |
| H A D | ip_nat6.c | 362 hostmap_t *hm; in ipf_nat6_hostmap() local 378 for (hm = softn->ipf_hm_maptable[hv]; hm; hm = hm->hm_next) in ipf_nat6_hostmap() 379 if (IP6_EQ(&hm->hm_osrc6, src) && in ipf_nat6_hostmap() 380 IP6_EQ(&hm->hm_odst6, dst) && in ipf_nat6_hostmap() 381 ((np == NULL) || (np == hm->hm_ipnat)) && in ipf_nat6_hostmap() 382 ((port == 0) || (port == hm->hm_port))) { in ipf_nat6_hostmap() 384 hm->hm_ref++; in ipf_nat6_hostmap() 385 return (hm); in ipf_nat6_hostmap() 393 KMALLOC(hm, hostmap_t *); in ipf_nat6_hostmap() 394 if (hm) { in ipf_nat6_hostmap() [all …]
|
| H A D | ip_nat.c | 760 hostmap_t *hm; in ipf_nat_hostmap() local 768 for (hm = softn->ipf_hm_maptable[hv]; hm; hm = hm->hm_hnext) in ipf_nat_hostmap() 769 if ((hm->hm_osrcip.s_addr == src.s_addr) && in ipf_nat_hostmap() 770 (hm->hm_odstip.s_addr == dst.s_addr) && in ipf_nat_hostmap() 771 ((np == NULL) || (np == hm->hm_ipnat)) && in ipf_nat_hostmap() 772 ((port == 0) || (port == hm->hm_port))) { in ipf_nat_hostmap() 774 hm->hm_ref++; in ipf_nat_hostmap() 775 return (hm); in ipf_nat_hostmap() 783 KMALLOC(hm, hostmap_t *); in ipf_nat_hostmap() 784 if (hm) { in ipf_nat_hostmap() [all …]
|
| /src/crypto/libecc/include/libecc/hash/ |
| H A D | hash_algs.h | 243 ATTRIBUTE_WARN_UNUSED_RET static inline int hash_mapping_sanity_check(const hash_mapping *hm) in hash_mapping_sanity_check() argument 247 MUST_HAVE(((hm != NULL) && (hm->name != NULL) && (hm->hfunc_init != NULL) && in hash_mapping_sanity_check() 248 (hm->hfunc_update != NULL) && (hm->hfunc_finalize != NULL) && in hash_mapping_sanity_check() 249 (hm->hfunc_scattered != NULL)), ret, err); in hash_mapping_sanity_check() 549 ATTRIBUTE_WARN_UNUSED_RET int get_hash_by_name(const char *hash_name, const hash_mapping **hm); 550 ATTRIBUTE_WARN_UNUSED_RET int get_hash_by_type(hash_alg_type hash_type, const hash_mapping **hm);
|
| /src/sbin/ipf/ipnat/ |
| H A D | ipnat.c | 610 hostmap_t hm, *hmp, **maptable; in showhostmap_dead() local 627 if (kmemcpy((char *)&hm, (u_long)hmp, sizeof(hm))) { in showhostmap_dead() 632 printhostmap(&hm, hv); in showhostmap_dead() 633 hmp = hm.hm_next; in showhostmap_dead() 647 hostmap_t hm; in showhostmap_live() local 659 iter.igi_data = &hm; in showhostmap_live() 666 printhostmap(&hm, hm.hm_hv); in showhostmap_live() 667 nsp->ns_maplist = hm.hm_next; in showhostmap_live()
|
| /src/crypto/libecc/src/hash/ |
| H A D | hash_algs.c | 23 ATTRIBUTE_WARN_UNUSED_RET int get_hash_by_name(const char *hash_name, const hash_mapping **hm) in get_hash_by_name() argument 29 MUST_HAVE(((hash_name != NULL) && (hm != NULL)), ret, err); in get_hash_by_name() 37 (*hm) = _hm; in get_hash_by_name() 52 ATTRIBUTE_WARN_UNUSED_RET int get_hash_by_type(hash_alg_type hash_type, const hash_mapping **hm) in get_hash_by_type() argument 58 MUST_HAVE((hm != NULL), ret, err); in get_hash_by_type() 64 (*hm) = _hm; in get_hash_by_type()
|
| /src/sbin/ipf/ipftest/ |
| H A D | ipftest.c | 522 hostmap_t *hm; in dumpnat() local 537 for (hm = softn->ipf_hm_maplist; hm != NULL; hm = hm->hm_next) in dumpnat() 538 printhostmap(hm, hm->hm_hv); in dumpnat()
|
| /src/sys/kgssapi/krb5/ |
| H A D | krb5_mech.c | 1684 struct mbuf *m, *mlast, *hm, *cm, *n; in krb5_unwrap_old() local 1819 hm = m; in krb5_unwrap_old() 1822 hm->m_len = 8; in krb5_unwrap_old() 1823 hm->m_next = m; in krb5_unwrap_old() 1828 krb5_checksum(kc->kc_checksumkey, 13, hm, 0, datalen + 8, cklen); in krb5_unwrap_old() 1829 hm->m_next = NULL; in krb5_unwrap_old() 1832 if (bcmp(cm->m_data, hm->m_data + 16, cklen)) { in krb5_unwrap_old() 1833 m_freem(hm); in krb5_unwrap_old() 1837 m_freem(hm); in krb5_unwrap_old() 1862 struct mbuf *m, *mlast, *hm, *cm; in krb5_unwrap_new() local [all …]
|
| /src/crypto/openssl/crypto/ |
| H A D | deterministic_nonce.c | 183 const unsigned char *hm, size_t hmlen, in ossl_gen_deterministic_nonce_rfc6979() argument 216 || !bits2octets(nonceh, q, qlen_bits, rlen, hm, hmlen)) in ossl_gen_deterministic_nonce_rfc6979()
|