/freebsd/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 | 659 struct hidmap hm; member 674 struct hidmap hm; member 683 struct hidmap hm; member 959 if (hid_test_quirk(hid_get_device_info(sc->hm.dev), in ps4dsmtp_final_cb() 1036 return (hid_write(sc->hm.dev, buf, osize)); in ps4dshock_write() 1111 hidmap_set_debug_var(&sc->hm, &HID_DEBUG_VAR); in ps4dshock_probe() 1113 HIDMAP_PROBE(&sc->hm, dev, ps4dshock_devs, ps4dshock_map, NULL) in ps4dshock_probe() 1122 hidmap_set_debug_var(&sc->hm, &HID_DEBUG_VAR); in ps4dsacc_probe() 1124 HIDMAP_PROBE(&sc->hm, dev, ps4dsacc_devs, ps4dsacc_map, "Sensors") in ps4dsacc_probe() 1131 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 | 190 error = HIDMAP_PROBE(&sc->hm, dev, hgame_devs, hgame_map, NULL); in hgame_probe() 207 return (hidmap_attach(&sc->hm)); in hgame_attach() 215 return (hidmap_detach(&sc->hm)); in hgame_detach()
|
H A D | hgame.h | 39 struct hidmap hm; member
|
/freebsd/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 …]
|
/freebsd/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 …]
|
/freebsd/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 …]
|
/freebsd/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 …]
|
/freebsd/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);
|
/freebsd/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()
|
/freebsd/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()
|
/freebsd/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()
|
/freebsd/sys/kgssapi/krb5/ |
H A D | krb5_mech.c | 1604 struct mbuf *m, *mlast, *hm, *cm, *n; in krb5_unwrap_old() local 1739 hm = m; in krb5_unwrap_old() 1742 hm->m_len = 8; in krb5_unwrap_old() 1743 hm->m_next = m; in krb5_unwrap_old() 1748 krb5_checksum(kc->kc_checksumkey, 13, hm, 0, datalen + 8, cklen); in krb5_unwrap_old() 1749 hm->m_next = NULL; in krb5_unwrap_old() 1752 if (bcmp(cm->m_data, hm->m_data + 16, cklen)) { in krb5_unwrap_old() 1753 m_freem(hm); in krb5_unwrap_old() 1757 m_freem(hm); in krb5_unwrap_old() 1782 struct mbuf *m, *mlast, *hm, *cm; in krb5_unwrap_new() local [all …]
|
/freebsd/usr.bin/fortune/tools/ |
H A D | Troff.mac | 2 .nr hm 3v
|
/freebsd/contrib/wpa/src/drivers/ |
H A D | driver_ndis.c | 2518 HMODULE hm; in wpa_driver_ndis_set_wzc() 2534 hm = LoadLibrary(TEXT("wzcsapi.dll")); in wpa_driver_ndis_set_wzc() 2535 if (hm == NULL) { in wpa_driver_ndis_set_wzc() 2543 wzc_enum_interf = (void *) GetProcAddressA(hm, "WZCEnumInterfaces"); in wpa_driver_ndis_set_wzc() 2544 wzc_query_interf = (void *) GetProcAddressA(hm, "WZCQueryInterface"); in wpa_driver_ndis_set_wzc() 2545 wzc_set_interf = (void *) GetProcAddressA(hm, "WZCSetInterface"); in wpa_driver_ndis_set_wzc() 2547 wzc_enum_interf = (void *) GetProcAddress(hm, "WZCEnumInterfaces"); in wpa_driver_ndis_set_wzc() 2548 wzc_query_interf = (void *) GetProcAddress(hm, "WZCQueryInterface"); in wpa_driver_ndis_set_wzc() 2549 wzc_set_interf = (void *) GetProcAddress(hm, "WZCSetInterface"); in wpa_driver_ndis_set_wzc() 2669 FreeLibrary(hm); in wpa_driver_ndis_set_wzc()
|
/freebsd/contrib/tcsh/ |
H A D | tc.func.c | 1583 getusername(Char **hm) in getusername() argument 1588 if (hm == NULL) { in getusername() 1599 p = *hm; in getusername() 1603 *hm = &p[j]; in getusername() 1609 *hm = &p[j]; in getusername()
|