| /openbsd-src/usr.bin/ssh/ |
| H A D | mac.c | 102 mac_setup_by_alg(struct sshmac *mac, const struct macalg *macalg) in mac_setup_by_alg() argument 104 mac->type = macalg->type; in mac_setup_by_alg() 105 if (mac->type == SSH_DIGEST) { in mac_setup_by_alg() 106 if ((mac->hmac_ctx = ssh_hmac_start(macalg->alg)) == NULL) in mac_setup_by_alg() 108 mac->key_len = mac->mac_len = ssh_hmac_bytes(macalg->alg); in mac_setup_by_alg() 110 mac->mac_len = macalg->len / 8; in mac_setup_by_alg() 111 mac->key_len = macalg->key_len / 8; in mac_setup_by_alg() 112 mac->umac_ctx = NULL; in mac_setup_by_alg() 115 mac->mac_len = macalg->truncatebits / 8; in mac_setup_by_alg() 116 mac->etm = macalg->etm; in mac_setup_by_alg() [all …]
|
| H A D | packet.c | 70 #include "mac.h" 387 struct sshmac *mac, size_t mac_already, u_int discard) in ssh_packet_start_discard() argument 392 if (enc == NULL || !cipher_is_cbc(enc->cipher) || (mac && mac->etm)) { in ssh_packet_start_discard() 398 * Record number of bytes over which the mac has already in ssh_packet_start_discard() 401 if (mac && mac->enabled) { in ssh_packet_start_discard() 402 state->packet_discard_mac = mac; in ssh_packet_start_discard() 933 struct sshmac *mac; in ssh_set_newkeys() local 972 mac in ssh_set_newkeys() 1148 struct sshmac *mac = NULL; ssh_packet_send2_wrapped() local 1541 struct sshmac *mac = NULL; ssh_packet_read_poll2() local 2341 struct sshmac *mac; newkeys_to_blob() local 2411 struct sshmac *mac; newkeys_from_blob() local [all...] |
| /openbsd-src/sys/dev/ic/ |
| H A D | bwi.c | 191 void bwi_tbl_write_2(struct bwi_mac *mac, uint16_t, uint16_t); 192 void bwi_tbl_write_4(struct bwi_mac *mac, uint16_t, uint32_t); 416 #define RF_LO_WRITE(mac, lo) bwi_rf_lo_write((mac), (lo)) argument 444 #define SAVE_RF_REG(mac, regs, n) (regs)->rf_##n = RF_READ((mac), 0x##n) argument 445 #define RESTORE_RF_REG(mac, regs, n) RF_WRITE((mac), 0x##n, (regs)->rf_##n) argument 447 #define SAVE_PHY_REG(mac, regs, n) (regs)->phy_##n = PHY_READ((mac), 0x##n) argument 448 #define RESTORE_PHY_REG(mac, regs, n) PHY_WRITE((mac), 0x##n, (regs)->phy_##n) argument 574 struct bwi_mac *mac; in bwi_intr() local 598 mac = (struct bwi_mac *)sc->sc_cur_regwin; in bwi_intr() 632 if (mac->mac_flags & BWI_MAC_F_PHYE_RESET) { in bwi_intr() [all …]
|
| H A D | bwivar.h | 455 #define BWI_CREATE_MAC(mac, sc, id, rev) \ argument 457 BWI_CREATE_REGWIN(&(mac)->mac_regwin, \ 459 (mac)->mac_sc = (sc); \ 633 #define MOBJ_WRITE_2(mac, objid, ofs, val) \ argument 634 bwi_memobj_write_2((mac), (objid), (ofs), (val)) 635 #define MOBJ_WRITE_4(mac, objid, ofs, val) \ argument 636 bwi_memobj_write_4((mac), (objid), (ofs), (val)) 637 #define MOBJ_READ_2(mac, objid, ofs) \ argument 638 bwi_memobj_read_2((mac), (objid), (ofs)) 639 #define MOBJ_READ_4(mac, objid, ofs) \ argument [all …]
|
| H A D | hme.c | 327 bus_space_handle_t mac = sc->sc_mac; in hme_tick() local 335 bus_space_read_4(t, mac, HME_MACI_NCCNT) + in hme_tick() 336 bus_space_read_4(t, mac, HME_MACI_FCCNT) + in hme_tick() 337 bus_space_read_4(t, mac, HME_MACI_EXCNT) + in hme_tick() 338 bus_space_read_4(t, mac, HME_MACI_LTCNT); in hme_tick() 343 bus_space_write_4(t, mac, HME_MACI_NCCNT, 0); in hme_tick() 344 bus_space_write_4(t, mac, HME_MACI_FCCNT, 0); in hme_tick() 345 bus_space_write_4(t, mac, HME_MACI_EXCNT, 0); in hme_tick() 346 bus_space_write_4(t, mac, HME_MACI_LTCNT, 0); in hme_tick() 500 bus_space_handle_t mac = sc->sc_mac; in hme_init() local [all …]
|
| /openbsd-src/lib/libcrypto/pkcs12/ |
| H A D | p12_mutl.c | 79 return p12->mac != NULL; in PKCS12_mac_present() 88 if (p12->mac == NULL) { in PKCS12_get0_mac() 101 *pmac = p12->mac->dinfo->digest; in PKCS12_get0_mac() 103 *pmacalg = p12->mac->dinfo->algor; in PKCS12_get0_mac() 105 *psalt = p12->mac->salt; in PKCS12_get0_mac() 107 *piter = p12->mac->iter; in PKCS12_get0_mac() 114 unsigned char *mac, unsigned int *maclen) in PKCS12_gen_mac() argument 133 salt = p12->mac->salt->data; in PKCS12_gen_mac() 134 saltlen = p12->mac->salt->length; in PKCS12_gen_mac() 137 if (p12->mac->iter != NULL) { in PKCS12_gen_mac() [all …]
|
| H A D | p12_npas.c | 215 unsigned char mac[EVP_MAX_MD_SIZE]; in pkcs12_repack_authsafes() local 225 if (!PKCS12_gen_mac(pkcs12, newpass, -1, mac, &mac_len)) in pkcs12_repack_authsafes() 229 if (!ASN1_OCTET_STRING_set(new_mac, mac, mac_len)) in pkcs12_repack_authsafes() 232 ASN1_OCTET_STRING_free(pkcs12->mac->dinfo->digest); in pkcs12_repack_authsafes() 233 pkcs12->mac->dinfo->digest = new_mac; in pkcs12_repack_authsafes() 246 explicit_bzero(mac, sizeof(mac)); in pkcs12_repack_authsafes()
|
| /openbsd-src/regress/lib/libcrypto/poly1305/ |
| H A D | poly1305test.c | 12 void poly1305_auth(unsigned char mac[16], const unsigned char *m, size_t bytes, 19 poly1305_auth(unsigned char mac[16], const unsigned char *m, size_t bytes, in poly1305_auth() 24 CRYPTO_poly1305_finish(&ctx, mac); in poly1305_auth() 113 unsigned char mac[16]; in poly1305_power_on_self_test() local 117 for (i = 0; i < sizeof(mac); i++) in poly1305_power_on_self_test() 118 mac[i] = 0; in poly1305_power_on_self_test() 119 poly1305_auth(mac, nacl_msg, sizeof(nacl_msg), nacl_key); in poly1305_power_on_self_test() 120 result &= poly1305_verify(nacl_mac, mac); in poly1305_power_on_self_test() 122 for (i = 0; i < sizeof(mac); i++) in poly1305_power_on_self_test() 123 mac[i] = 0; in poly1305_power_on_self_test() [all …]
|
| /openbsd-src/sys/dev/pci/ |
| H A D | ixgbe_82599.c | 99 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_mac_link_ops_82599() local 107 if ((mac->ops.get_media_type(hw) == ixgbe_media_type_fiber) && in ixgbe_init_mac_link_ops_82599() 109 mac->ops.disable_tx_laser = in ixgbe_init_mac_link_ops_82599() 111 mac->ops.enable_tx_laser = in ixgbe_init_mac_link_ops_82599() 113 mac->ops.flap_tx_laser = ixgbe_flap_tx_laser_multispeed_fiber; in ixgbe_init_mac_link_ops_82599() 116 mac->ops.disable_tx_laser = NULL; in ixgbe_init_mac_link_ops_82599() 117 mac->ops.enable_tx_laser = NULL; in ixgbe_init_mac_link_ops_82599() 118 mac->ops.flap_tx_laser = NULL; in ixgbe_init_mac_link_ops_82599() 123 mac->ops.setup_link = ixgbe_setup_mac_link_multispeed_fiber; in ixgbe_init_mac_link_ops_82599() 124 mac->ops.setup_mac_link = ixgbe_setup_mac_link_82599; in ixgbe_init_mac_link_ops_82599() [all …]
|
| H A D | ixgbe_x540.c | 85 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X540() local 109 mac->ops.reset_hw = ixgbe_reset_hw_X540; in ixgbe_init_ops_X540() 110 mac->ops.get_media_type = ixgbe_get_media_type_X540; in ixgbe_init_ops_X540() 111 mac->ops.get_supported_physical_layer = in ixgbe_init_ops_X540() 113 mac->ops.read_analog_reg8 = NULL; in ixgbe_init_ops_X540() 114 mac->ops.write_analog_reg8 = NULL; in ixgbe_init_ops_X540() 115 mac->ops.start_hw = ixgbe_start_hw_X540; in ixgbe_init_ops_X540() 116 mac->ops.get_device_caps = ixgbe_get_device_caps_generic; in ixgbe_init_ops_X540() 117 mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X540; in ixgbe_init_ops_X540() 118 mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X540; in ixgbe_init_ops_X540() [all …]
|
| H A D | igc_api.c | 23 if (hw->mac.ops.init_params) { in igc_init_mac_params() 24 ret_val = hw->mac.ops.init_params(hw); in igc_init_mac_params() 101 struct igc_mac_info *mac = &hw->mac; in igc_set_mac_type() local 122 mac->type = igc_i225; in igc_set_mac_type() 176 switch (hw->mac.type) { in igc_setup_init_funcs() 220 if (hw->mac.ops.update_mc_addr_list) in igc_update_mc_addr_list() 221 hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, in igc_update_mc_addr_list() 236 if (hw->mac.ops.check_for_link) in igc_check_for_link() 237 return hw->mac.ops.check_for_link(hw); in igc_check_for_link() 252 if (hw->mac.ops.reset_hw) in igc_reset_hw() [all …]
|
| H A D | ixgbe_82598.c | 137 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_82598() local 150 mac->ops.start_hw = ixgbe_start_hw_82598; in ixgbe_init_ops_82598() 151 mac->ops.reset_hw = ixgbe_reset_hw_82598; in ixgbe_init_ops_82598() 152 mac->ops.get_media_type = ixgbe_get_media_type_82598; in ixgbe_init_ops_82598() 153 mac->ops.get_supported_physical_layer = in ixgbe_init_ops_82598() 155 mac->ops.read_analog_reg8 = ixgbe_read_analog_reg8_82598; in ixgbe_init_ops_82598() 156 mac->ops.write_analog_reg8 = ixgbe_write_analog_reg8_82598; in ixgbe_init_ops_82598() 157 mac->ops.set_lan_id = ixgbe_set_lan_id_multi_port_pcie_82598; in ixgbe_init_ops_82598() 158 mac->ops.enable_rx_dma = ixgbe_enable_rx_dma_82598; in ixgbe_init_ops_82598() 161 mac->ops.set_vmdq = ixgbe_set_vmdq_82598; in ixgbe_init_ops_82598() [all …]
|
| H A D | ixgbe.c | 115 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_generic() 134 mac->ops.init_hw = ixgbe_init_hw_generic; in ixgbe_init_ops_generic() 135 mac->ops.reset_hw = NULL; in ixgbe_init_ops_generic() 136 mac->ops.start_hw = ixgbe_start_hw_generic; in ixgbe_init_ops_generic() 137 mac->ops.clear_hw_cntrs = ixgbe_clear_hw_cntrs_generic; in ixgbe_init_ops_generic() 138 mac->ops.get_media_type = NULL; in ixgbe_init_ops_generic() 139 mac->ops.get_supported_physical_layer = NULL; in ixgbe_init_ops_generic() 140 mac->ops.enable_rx_dma = ixgbe_enable_rx_dma_generic; in ixgbe_init_ops_generic() 141 mac in ixgbe_init_ops_generic() 116 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_init_ops_generic() local 718 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_set_pci_config_data_generic() local [all...] |
| H A D | ixgbe_x550.c | 139 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_ops_X550() local 146 mac->ops.dmac_config = ixgbe_dmac_config_X550; in ixgbe_init_ops_X550() 147 mac->ops.dmac_config_tcs = ixgbe_dmac_config_tcs_X550; in ixgbe_init_ops_X550() 148 mac->ops.dmac_update_tcs = ixgbe_dmac_update_tcs_X550; in ixgbe_init_ops_X550() 149 mac->ops.setup_eee = NULL; in ixgbe_init_ops_X550() 150 mac->ops.set_source_address_pruning = in ixgbe_init_ops_X550() 160 mac->ops.disable_rx = ixgbe_disable_rx_x550; in ixgbe_init_ops_X550() 163 hw->mac.ops.led_on = NULL; in ixgbe_init_ops_X550() 164 hw->mac in ixgbe_init_ops_X550() 618 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_init_ops_X550EM() local 788 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_init_ops_X550EM_a() local 846 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_init_ops_X550EM_x() local 1504 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_setup_sgmii() local 1573 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_setup_sgmii_fw() local 1643 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_init_mac_link_ops_X550em() local 2487 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_setup_sfi_x550a() local 2637 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_setup_ixfi_x550em_x() local 2708 struct ixgbe_mac_info *mac = &hw->mac; ixgbe_setup_ixfi_x550em() local [all...] |
| H A D | igc_base.c | 29 return hw->mac.ops.acquire_swfw_sync(hw, mask); in igc_acquire_phy_base() 48 hw->mac.ops.release_swfw_sync(hw, mask); in igc_release_phy_base() 60 struct igc_mac_info *mac = &hw->mac; in igc_init_hw_base() local 61 uint16_t i, rar_count = mac->rar_entry_count; in igc_init_hw_base() 71 for (i = 0; i < mac->mta_reg_count; i++) in igc_init_hw_base() 76 for (i = 0; i < mac->uta_reg_count; i++) in igc_init_hw_base() 80 ret_val = mac->ops.setup_link(hw); in igc_init_hw_base()
|
| H A D | igc_mac.c | 19 struct igc_mac_info *mac = &hw->mac; in igc_init_mac_ops_generic() local 23 mac->ops.init_params = igc_null_ops_generic; in igc_init_mac_ops_generic() 24 mac->ops.config_collision_dist = igc_config_collision_dist_generic; in igc_init_mac_ops_generic() 25 mac->ops.rar_set = igc_rar_set_generic; in igc_init_mac_ops_generic() 77 hw->mac.ops.rar_set(hw, hw->mac.addr, 0); in igc_init_rx_addrs_generic() 82 hw->mac.ops.rar_set(hw, mac_addr, i); in igc_init_rx_addrs_generic() 147 hw->mac.ops.rar_set(hw, alt_mac_addr, 0); in igc_check_alt_mac_addr_generic() 209 hash_mask = (hw->mac.mta_reg_count * 32) - 1; in igc_hash_mc_addr_generic() 242 switch (hw->mac.mc_filter_type) { in igc_hash_mc_addr_generic() 282 memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow)); in igc_update_mc_addr_list_generic() [all …]
|
| H A D | igc_i225.c | 83 struct igc_mac_info *mac = &hw->mac; in igc_init_mac_params_i225() local 94 mac->mta_reg_count = 128; in igc_init_mac_params_i225() 96 mac->rar_entry_count = IGC_RAR_ENTRIES_BASE; in igc_init_mac_params_i225() 99 mac->ops.reset_hw = igc_reset_hw_i225; in igc_init_mac_params_i225() 101 mac->ops.init_hw = igc_init_hw_i225; in igc_init_mac_params_i225() 103 mac->ops.setup_link = igc_setup_link_generic; in igc_init_mac_params_i225() 105 mac->ops.check_for_link = igc_check_for_link_i225; in igc_init_mac_params_i225() 107 mac->ops.get_link_up_info = igc_get_speed_and_duplex_copper_generic; in igc_init_mac_params_i225() 109 mac in igc_init_mac_params_i225() 994 struct igc_mac_info *mac = &hw->mac; igc_check_for_link_i225() local [all...] |
| H A D | if_ngbe.c | 267 hw->mac.autoneg = 1; in ngbe_attach() 274 sc->hw.mac.ops.set_lan_id(&sc->hw); in ngbe_attach() 285 error = sc->hw.mac.ops.reset_hw(sc); in ngbe_attach() 300 hw->mac.ops.release_swfw_sync(sc, NGBE_MNG_SWFW_SYNC_SW_MB); in ngbe_attach() 316 memcpy(sc->sc_ac.ac_enaddr, sc->hw.mac.addr, ETHER_ADDR_LEN); in ngbe_attach() 325 error = hw->mac.ops.start_hw(sc); in ngbe_attach() 332 hw->mac.ops.get_bus_info(sc); in ngbe_attach() 334 hw->mac.ops.set_fw_drv_ver(sc, 0xff, 0xff, 0xff, 0xff); in ngbe_attach() 336 printf(", address %s\n", ether_sprintf(sc->hw.mac.addr)); in ngbe_attach() 416 hw->mac in ngbe_init() 1840 struct ngbe_mac_info *mac = &hw->mac; ngbe_init_ops() local 3679 struct ngbe_mac_info *mac = &hw->mac; ngbe_reset_hw() local [all...] |
| H A D | if_ix.c | 310 bcopy(sc->hw.mac.addr, sc->arpcom.ac_enaddr, in ixgbe_attach() 321 if (sc->hw.mac.ops.enable_tx_laser) in ixgbe_attach() 322 sc->hw.mac.ops.enable_tx_laser(&sc->hw); in ixgbe_attach() 332 hw->mac.ops.get_bus_info(hw); in ixgbe_attach() 342 printf(", address %s\n", ether_sprintf(sc->hw.mac.addr)); in ixgbe_attach() 414 if (sc->hw.mac.ops.enable_tx_laser) in ixgbe_activate() 415 sc->hw.mac.ops.enable_tx_laser(&sc->hw); in ixgbe_activate() 422 hw->mac.ops.get_bus_info(hw); in ixgbe_activate() 602 if (hw->mac.ops.acquire_swfw_sync(hw, swfw_mask)) in ixgbe_get_sffpage() 630 hw->mac in ixgbe_get_sffpage() [all...] |
| /openbsd-src/usr.sbin/nsd/ |
| H A D | tsig-openssl.c | 31 EVP_MAC* mac; member 47 EVP_MAC_free(d->mac); in cleanup_tsig_openssl_data() 48 d->mac = NULL; in cleanup_tsig_openssl_data() 71 data->mac = EVP_MAC_fetch(NULL, "hmac", NULL); in tsig_openssl_init_algorithm() 72 if(!data->mac) { in tsig_openssl_init_algorithm() 77 hmac_ctx = EVP_MAC_CTX_new(data->mac); in tsig_openssl_init_algorithm() 79 EVP_MAC_free(data->mac); in tsig_openssl_init_algorithm() 91 EVP_MAC_free(data->mac); in tsig_openssl_init_algorithm() 98 EVP_MAC_free(data->mac); in tsig_openssl_init_algorithm() 113 EVP_MAC_free(data->mac); in tsig_openssl_init_algorithm() [all …]
|
| /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/cpp/ |
| H A D | redef2.c | 6 #define mac(a, b) (a) + (b) macro 7 #define mac(a, b) (a) * (b) macro 8 #define mac(a, b) (a) * (x) macro 9 #define mac(a, g) (a) * (x) macro
|
| /openbsd-src/regress/sbin/slaacd/ |
| H A D | IfInfo.py | 25 self.mac = None 32 return "{0}: mac: {1}, link local: {2}".format(self.ifname, 33 self.mac, self.ll) 41 self.mac = lladdr.group(1) 46 if self.mac and self.ll:
|
| /openbsd-src/usr.sbin/ldpd/ |
| H A D | address.c | 144 send_mac_withdrawal(struct nbr *nbr, struct map *fec, uint8_t *mac) in send_mac_withdrawal() argument 152 if (mac) in send_mac_withdrawal() 164 err |= gen_mac_list_tlv(buf, mac); in send_mac_withdrawal() 170 log_msg_mac_withdrawal(1, nbr, mac); in send_mac_withdrawal() 357 gen_mac_list_tlv(struct ibuf *buf, uint8_t *mac) in gen_mac_list_tlv() argument 364 if (mac) in gen_mac_list_tlv() 367 if (mac) in gen_mac_list_tlv() 368 err |= ibuf_add(buf, mac, ETHER_ADDR_LEN); in gen_mac_list_tlv() 406 log_msg_mac_withdrawal(int out, struct nbr *nbr, uint8_t *mac) in log_msg_mac_withdrawal() argument 410 (mac) ? ether_ntoa((struct ether_addr *)mac) : "wildcard"); in log_msg_mac_withdrawal()
|
| /openbsd-src/gnu/llvm/llvm/utils/gn/secondary/compiler-rt/lib/ubsan/ |
| H A D | BUILD.gn | 9 if (current_os != "mac") { 103 if (current_os == "mac") { 120 if (current_os == "mac") { 125 if (current_os != "mac") { 141 if (current_os == "mac") { 148 if (current_os == "mac") { 180 if (current_os != "mac" && current_os != "win") {
|
| /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/cpp/trad/ |
| H A D | recurse-3.c | 18 #define mac mac/**/ro macro 19 mac /* { dg-bogus "detected recursion" } */
|