| /freebsd-12-stable/contrib/wpa/src/eap_common/ |
| D | eap_fast_common.c | 148 int eap_fast_parse_tlv(struct eap_fast_tlv_parse *tlv, in eap_fast_parse_tlv() argument 155 if (tlv->eap_payload_tlv) { in eap_fast_parse_tlv() 158 tlv->iresult = EAP_TLV_RESULT_FAILURE; in eap_fast_parse_tlv() 161 tlv->eap_payload_tlv = pos; in eap_fast_parse_tlv() 162 tlv->eap_payload_tlv_len = len; in eap_fast_parse_tlv() 166 if (tlv->result) { in eap_fast_parse_tlv() 169 tlv->result = EAP_TLV_RESULT_FAILURE; in eap_fast_parse_tlv() 175 tlv->result = EAP_TLV_RESULT_FAILURE; in eap_fast_parse_tlv() 178 tlv->result = WPA_GET_BE16(pos); in eap_fast_parse_tlv() 179 if (tlv->result != EAP_TLV_RESULT_SUCCESS && in eap_fast_parse_tlv() [all …]
|
| D | eap_teap_common.c | 426 int eap_teap_parse_tlv(struct eap_teap_tlv_parse *tlv, in eap_teap_parse_tlv() argument 434 tlv->result = TEAP_STATUS_FAILURE; in eap_teap_parse_tlv() 437 tlv->identity_type = WPA_GET_BE16(pos); in eap_teap_parse_tlv() 439 tlv->identity_type); in eap_teap_parse_tlv() 443 if (tlv->result) { in eap_teap_parse_tlv() 446 tlv->result = TEAP_STATUS_FAILURE; in eap_teap_parse_tlv() 451 tlv->result = TEAP_STATUS_FAILURE; in eap_teap_parse_tlv() 454 tlv->result = WPA_GET_BE16(pos); in eap_teap_parse_tlv() 455 if (tlv->result != TEAP_STATUS_SUCCESS && in eap_teap_parse_tlv() 456 tlv->result != TEAP_STATUS_FAILURE) { in eap_teap_parse_tlv() [all …]
|
| /freebsd-12-stable/sys/dev/mlxfw/ |
| D | mlxfw_mfa2_tlv_multi.c | 38 #define MLXFW_MFA2_TLV_TOTAL_SIZE(tlv) \ argument 39 NLA_ALIGN(sizeof(*(tlv)) + be16_to_cpu((tlv)->len)) 53 const struct mlxfw_mfa2_tlv *tlv) in mlxfw_mfa2_tlv_next() argument 59 tlv_len = MLXFW_MFA2_TLV_TOTAL_SIZE(tlv); in mlxfw_mfa2_tlv_next() 61 if (tlv->type == MLXFW_MFA2_TLV_MULTI_PART) { in mlxfw_mfa2_tlv_next() 62 multi = mlxfw_mfa2_tlv_multi_get(mfa2_file, tlv); in mlxfw_mfa2_tlv_next() 66 next = (const u8 *) tlv + tlv_len; in mlxfw_mfa2_tlv_next() 74 const struct mlxfw_mfa2_tlv *tlv; in mlxfw_mfa2_tlv_advance() local 77 mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, from_tlv, count) in mlxfw_mfa2_tlv_advance() 78 if (!tlv) in mlxfw_mfa2_tlv_advance() [all …]
|
| D | mlxfw_mfa2_tlv.h | 58 const struct mlxfw_mfa2_tlv *tlv, u8 payload_type, in mlxfw_mfa2_tlv_payload_get() argument 63 tlv_top = (const u8 *) tlv + be16_to_cpu(tlv->len) - 1; in mlxfw_mfa2_tlv_payload_get() 64 if (!mlxfw_mfa2_valid_ptr(mfa2_file, (const u8 *) tlv) || in mlxfw_mfa2_tlv_payload_get() 67 if (tlv->type != payload_type) in mlxfw_mfa2_tlv_payload_get() 69 if (varsize && (be16_to_cpu(tlv->len) < payload_size)) in mlxfw_mfa2_tlv_payload_get() 71 if (!varsize && (be16_to_cpu(tlv->len) != payload_size)) in mlxfw_mfa2_tlv_payload_get() 74 return tlv->data; in mlxfw_mfa2_tlv_payload_get() 80 const struct mlxfw_mfa2_tlv *tlv) \ 82 return mlxfw_mfa2_tlv_payload_get(mfa2_file, tlv, \ 90 const struct mlxfw_mfa2_tlv *tlv) \ [all …]
|
| D | mlxfw_mfa2.c | 128 const struct mlxfw_mfa2_tlv *tlv; in mlxfw_mfa2_tlv_multi_validate() local 132 mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) { in mlxfw_mfa2_tlv_multi_validate() 133 if (!tlv) { in mlxfw_mfa2_tlv_multi_validate() 149 const struct mlxfw_mfa2_tlv *tlv; in mlxfw_mfa2_file_dev_validate() local 166 tlv = mlxfw_mfa2_tlv_multi_child_find(mfa2_file, multi, in mlxfw_mfa2_file_dev_validate() 168 if (!tlv) { in mlxfw_mfa2_file_dev_validate() 173 psid = mlxfw_mfa2_tlv_psid_get(mfa2_file, tlv); in mlxfw_mfa2_file_dev_validate() 180 psid->psid, be16_to_cpu(tlv->len), true); in mlxfw_mfa2_file_dev_validate() 195 tlv = mlxfw_mfa2_tlv_multi_child_find(mfa2_file, multi, in mlxfw_mfa2_file_dev_validate() 198 if (!tlv) in mlxfw_mfa2_file_dev_validate() [all …]
|
| D | mlxfw_mfa2_tlv_multi.h | 47 const struct mlxfw_mfa2_tlv *tlv); 63 #define mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, from_tlv, count) \ argument 64 for (idx = 0, tlv = from_tlv; idx < (count); \ 65 idx++, tlv = mlxfw_mfa2_tlv_next(mfa2_file, tlv)) 67 #define mlxfw_mfa2_tlv_multi_foreach(mfa2_file, tlv, idx, multi) \ argument 68 mlxfw_mfa2_tlv_foreach(mfa2_file, tlv, idx, \
|
| /freebsd-12-stable/sys/dev/ice/ |
| D | ice_dcb.c | 340 ice_parse_ieee_etscfg_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_etscfg_tlv() argument 344 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_etscfg_tlv() 372 ice_parse_ieee_etsrec_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_etsrec_tlv() argument 375 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_etsrec_tlv() 389 ice_parse_ieee_pfccfg_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_pfccfg_tlv() argument 392 u8 *buf = tlv->tlvinfo; in ice_parse_ieee_pfccfg_tlv() 416 ice_parse_ieee_app_tlv(struct ice_lldp_org_tlv *tlv, in ice_parse_ieee_app_tlv() argument 425 typelen = NTOHS(tlv->typelen); in ice_parse_ieee_app_tlv() 427 buf = tlv->tlvinfo; in ice_parse_ieee_app_tlv() 432 len -= (sizeof(tlv->ouisubtype) + 1); in ice_parse_ieee_app_tlv() [all …]
|
| /freebsd-12-stable/sys/dev/bhnd/nvram/ |
| D | bhnd_nvram_data_tlv.c | 66 BHND_NVRAM_DATA_CLASS_DEFN(tlv, "WGT634U", BHND_NVRAM_DATA_CAP_DEVPATHS, 102 struct bhnd_nvram_tlv *tlv, 106 struct bhnd_nvram_tlv *tlv, 110 struct bhnd_nvram_tlv *tlv, 113 struct bhnd_nvram_tlv *tlv, 363 bhnd_nvram_tlv_init(struct bhnd_nvram_tlv *tlv, struct bhnd_nvram_io *src) in bhnd_nvram_tlv_init() argument 370 BHND_NV_ASSERT(tlv->data == NULL, ("tlv data already initialized")); in bhnd_nvram_tlv_init() 377 if ((tlv->data = bhnd_nvram_iobuf_copy_range(src, 0x0, size)) == NULL) in bhnd_nvram_tlv_init() 381 tlv->count = 0; in bhnd_nvram_tlv_init() 383 while ((env = bhnd_nvram_tlv_next_env(tlv, &next, NULL)) != NULL) { in bhnd_nvram_tlv_init() [all …]
|
| /freebsd-12-stable/sys/dev/ixl/ |
| D | i40e_dcb.c | 67 static void i40e_parse_ieee_etscfg_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_etscfg_tlv() argument 71 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_etscfg_tlv() 138 static void i40e_parse_ieee_etsrec_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_etsrec_tlv() argument 141 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_etsrec_tlv() 193 static void i40e_parse_ieee_pfccfg_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_pfccfg_tlv() argument 196 u8 *buf = tlv->tlvinfo; in i40e_parse_ieee_pfccfg_tlv() 220 static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, in i40e_parse_ieee_app_tlv() argument 229 typelength = I40E_NTOHS(tlv->typelength); in i40e_parse_ieee_app_tlv() 232 buf = tlv->tlvinfo; in i40e_parse_ieee_app_tlv() 235 length -= (sizeof(tlv->ouisubtype) + 1); in i40e_parse_ieee_app_tlv() [all …]
|
| /freebsd-12-stable/contrib/tcpdump/ |
| D | print-slow.c | 516 } tlv; in slow_oam_print() local 567 tlv.slow_oam_info = (const struct slow_oam_info_t *)tptr; in slow_oam_print() 569 if (tlv.slow_oam_info->info_length != in slow_oam_print() 578 tlv.slow_oam_info->oam_version, in slow_oam_print() 579 EXTRACT_16BITS(&tlv.slow_oam_info->revision))); in slow_oam_print() 583 tlv.slow_oam_info->state & OAM_INFO_TYPE_PARSER_MASK), in slow_oam_print() 585 tlv.slow_oam_info->state & OAM_INFO_TYPE_MUX_MASK))); in slow_oam_print() 588 tlv.slow_oam_info->oam_config), in slow_oam_print() 589 EXTRACT_16BITS(&tlv.slow_oam_info->oam_pdu_config) & in slow_oam_print() 593 EXTRACT_24BITS(&tlv.slow_oam_info->oui)), in slow_oam_print() [all …]
|
| D | print-forces.c | 392 #define TLV_RDAT_LEN(tlv) ((int)(EXTRACT_16BITS(&(tlv)->length) - TLV_SET_LEN(0)) argument 394 #define GO_NXT_TLV(tlv,rlen) ((rlen) -= F_ALN_LEN(EXTRACT_16BITS(&(tlv)->length)), \ argument 395 (const struct forces_tlv*)(((const char*)(tlv)) \ 396 + F_ALN_LEN(EXTRACT_16BITS(&(tlv)->length)))) 417 static inline u_int tlv_valid(const struct forces_tlv *tlv, u_int rlen) in tlv_valid() argument 421 if (EXTRACT_16BITS(&tlv->length) < TLV_HDRL) in tlv_valid() 423 if (EXTRACT_16BITS(&tlv->length) > rlen) in tlv_valid() 425 if (rlen < F_ALN_LEN(EXTRACT_16BITS(&tlv->length))) in tlv_valid() 649 const struct forces_tlv *tlv = (const struct forces_tlv *)pptr; in prestlv_print() local 650 register const u_char *tdp = (const u_char *) TLV_DATA(tlv); in prestlv_print() [all …]
|
| D | print-hncp.c | 270 const u_char *tlv, *value; in dhcpv4_print() local 277 tlv = cp + i; in dhcpv4_print() 278 type = (uint8_t)tlv[0]; in dhcpv4_print() 279 optlen = (uint8_t)tlv[1]; in dhcpv4_print() 280 value = tlv + 2; in dhcpv4_print() 322 const u_char *tlv, *value; in dhcpv6_print() local 329 tlv = cp + i; in dhcpv6_print() 330 type = EXTRACT_16BITS(tlv); in dhcpv6_print() 331 optlen = EXTRACT_16BITS(tlv + 2); in dhcpv6_print() 332 value = tlv + 4; in dhcpv6_print() [all …]
|
| D | print-nflog.c | 74 const nflog_tlv_t *tlv; in nflog_if_print() local 105 tlv = (const nflog_tlv_t *) p; in nflog_if_print() 106 size = tlv->tlv_length; in nflog_if_print() 124 if (tlv->tlv_type == NFULA_PAYLOAD) { in nflog_if_print()
|
| D | print-lldp.c | 1154 uint16_t tlv; in lldp_private_dcbx_print() local 1175 while (tlen >= sizeof(tlv)) { in lldp_private_dcbx_print() 1177 ND_TCHECK2(*tptr, sizeof(tlv)); in lldp_private_dcbx_print() 1179 tlv = EXTRACT_16BITS(tptr); in lldp_private_dcbx_print() 1181 tlv_type = LLDP_EXTRACT_TYPE(tlv); in lldp_private_dcbx_print() 1182 tlv_len = LLDP_EXTRACT_LEN(tlv); in lldp_private_dcbx_print() 1185 tlen -= sizeof(tlv); in lldp_private_dcbx_print() 1186 tptr += sizeof(tlv); in lldp_private_dcbx_print() 1424 uint16_t tlv, cap, ena_cap; in lldp_print() local 1434 while (tlen >= sizeof(tlv)) { in lldp_print() [all …]
|
| /freebsd-12-stable/contrib/wpa/src/eap_peer/ |
| D | eap_teap.c | 539 struct wpabuf *tlv; in eap_teap_add_identity_type() local 541 tlv = eap_teap_tlv_identity_type(sm->use_machine_cred ? in eap_teap_add_identity_type() 544 return wpabuf_concat(msg, tlv); in eap_teap_add_identity_type() 1151 struct eap_teap_tlv_parse *tlv, in eap_teap_parse_decrypted() argument 1159 os_memset(tlv, 0, sizeof(*tlv)); in eap_teap_parse_decrypted() 1180 res = eap_teap_parse_tlv(tlv, tlv_type, pos, len); in eap_teap_parse_decrypted() 1244 struct eap_teap_tlv_parse tlv; in eap_teap_process_decrypted() local 1249 if (eap_teap_parse_decrypted(decrypted, &tlv, &resp) < 0) { in eap_teap_process_decrypted() 1259 if (tlv.result == TEAP_STATUS_FAILURE) { in eap_teap_process_decrypted() 1271 if (tlv.iresult == TEAP_STATUS_SUCCESS && !tlv.crypto_binding) { in eap_teap_process_decrypted() [all …]
|
| D | eap_fast.c | 1107 struct eap_fast_tlv_parse *tlv, in eap_fast_parse_decrypted() argument 1114 os_memset(tlv, 0, sizeof(*tlv)); in eap_fast_parse_decrypted() 1134 res = eap_fast_parse_tlv(tlv, tlv_type, pos, len); in eap_fast_parse_decrypted() 1205 struct eap_fast_tlv_parse tlv; in eap_fast_process_decrypted() local 1208 if (eap_fast_parse_decrypted(decrypted, &tlv, &resp) < 0) in eap_fast_process_decrypted() 1214 if (tlv.result == EAP_TLV_RESULT_FAILURE) { in eap_fast_process_decrypted() 1220 if (tlv.iresult == EAP_TLV_RESULT_FAILURE) { in eap_fast_process_decrypted() 1226 if (tlv.crypto_binding) { in eap_fast_process_decrypted() 1228 tlv.crypto_binding, in eap_fast_process_decrypted() 1229 tlv.crypto_binding_len); in eap_fast_process_decrypted() [all …]
|
| /freebsd-12-stable/sys/dev/qlnx/qlnxe/ |
| D | ecore_mng_tlv.c | 1247 struct ecore_drv_tlv_hdr tlv; in ecore_mfw_update_tlvs() local 1261 OSAL_MEMSET(&tlv, 0, sizeof(tlv)); in ecore_mfw_update_tlvs() 1263 offset += sizeof(tlv) + sizeof(u32) * tlv.tlv_length) { in ecore_mfw_update_tlvs() 1265 tlv.tlv_type = TLV_TYPE(p_tlv); in ecore_mfw_update_tlvs() 1266 tlv.tlv_length = TLV_LENGTH(p_tlv); in ecore_mfw_update_tlvs() 1267 tlv.tlv_flags = TLV_FLAGS(p_tlv); in ecore_mfw_update_tlvs() 1270 "Type %d length = %d flags = 0x%x\n", tlv.tlv_type, in ecore_mfw_update_tlvs() 1271 tlv.tlv_length, tlv.tlv_flags); in ecore_mfw_update_tlvs() 1274 len = ecore_mfw_get_gen_tlv_value(&tlv, &p_tlv_data->generic, &buffer); in ecore_mfw_update_tlvs() 1276 len = ecore_mfw_get_eth_tlv_value(&tlv, &p_tlv_data->eth, &buffer); in ecore_mfw_update_tlvs() [all …]
|
| D | ecore_vf.c | 1198 u16 tlv) in ecore_vf_handle_vp_update_is_needed() argument 1200 switch (tlv) { in ecore_vf_handle_vp_update_is_needed() 1227 tlv, ecore_channel_tlvs_string[tlv]); in ecore_vf_handle_vp_update_is_needed() 1238 u16 tlv; in ecore_vf_handle_vp_update_tlvs_resp() local 1240 for (tlv = CHANNEL_TLV_VPORT_UPDATE_ACTIVATE; in ecore_vf_handle_vp_update_tlvs_resp() 1241 tlv < CHANNEL_TLV_VPORT_UPDATE_MAX; in ecore_vf_handle_vp_update_tlvs_resp() 1242 tlv++) { in ecore_vf_handle_vp_update_tlvs_resp() 1243 if (!ecore_vf_handle_vp_update_is_needed(p_hwfn, p_data, tlv)) in ecore_vf_handle_vp_update_tlvs_resp() 1248 tlv); in ecore_vf_handle_vp_update_tlvs_resp() 1252 tlv, ecore_channel_tlvs_string[tlv], in ecore_vf_handle_vp_update_tlvs_resp() [all …]
|
| D | ecore_sriov.c | 1307 u16 tlv) in ecore_iov_lock_vf_pf_channel() argument 1316 if (ecore_iov_tlv_supported(tlv)) in ecore_iov_lock_vf_pf_channel() 1321 ecore_channel_tlvs_string[tlv]); in ecore_iov_lock_vf_pf_channel() 1326 vf->abs_vf_id, tlv); in ecore_iov_lock_vf_pf_channel() 1379 struct channel_tlv *tlv; in ecore_dp_tlv_list() local 1383 tlv = (struct channel_tlv *)((u8 *)tlvs_list + total_length); in ecore_dp_tlv_list() 1386 if (ecore_iov_tlv_supported(tlv->type)) in ecore_dp_tlv_list() 1389 i, ecore_channel_tlvs_string[tlv->type], in ecore_dp_tlv_list() 1390 tlv->length); in ecore_dp_tlv_list() 1394 i, tlv->type, tlv->length); in ecore_dp_tlv_list() [all …]
|
| /freebsd-12-stable/contrib/wpa/src/eap_server/ |
| D | eap_server_fast.c | 1146 struct eap_fast_tlv_parse *tlv) in eap_fast_parse_tlvs() argument 1152 os_memset(tlv, 0, sizeof(*tlv)); in eap_fast_parse_tlvs() 1171 res = eap_fast_parse_tlv(tlv, tlv_type, pos, len); in eap_fast_parse_tlvs() 1252 struct eap_tlv_pac_type_tlv *tlv; in eap_fast_pac_type() local 1254 if (pac == NULL || len != sizeof(*tlv)) in eap_fast_pac_type() 1257 tlv = (struct eap_tlv_pac_type_tlv *) pac; in eap_fast_pac_type() 1259 return be_to_host16(tlv->tlv_type) == PAC_TYPE_PAC_TYPE && in eap_fast_pac_type() 1260 be_to_host16(tlv->length) == 2 && in eap_fast_pac_type() 1261 be_to_host16(tlv->pac_type) == type; in eap_fast_pac_type() 1269 struct eap_fast_tlv_parse tlv; in eap_fast_process_phase2_tlvs() local [all …]
|
| D | eap_server_teap.c | 1331 struct eap_teap_tlv_parse *tlv) in eap_teap_parse_tlvs() argument 1338 os_memset(tlv, 0, sizeof(*tlv)); in eap_teap_parse_tlvs() 1358 res = eap_teap_parse_tlv(tlv, tlv_type, pos, len); in eap_teap_parse_tlvs() 1488 struct teap_attr_pac_type *tlv; in eap_teap_pac_type() local 1490 if (!pac || len != sizeof(*tlv)) in eap_teap_pac_type() 1493 tlv = (struct teap_attr_pac_type *) pac; in eap_teap_pac_type() 1495 return be_to_host16(tlv->type) == PAC_TYPE_PAC_TYPE && in eap_teap_pac_type() 1496 be_to_host16(tlv->length) == 2 && in eap_teap_pac_type() 1497 be_to_host16(tlv->pac_type) == type; in eap_teap_pac_type() 1505 struct eap_teap_tlv_parse tlv; in eap_teap_process_phase2_tlvs() local [all …]
|
| /freebsd-12-stable/usr.sbin/ctld/ |
| D | isns.c | 116 struct isns_tlv *tlv; in isns_req_add() local 120 isns_req_getspace(req, sizeof(*tlv) + vlen); in isns_req_add() 121 tlv = (struct isns_tlv *)&req->ir_buf[req->ir_usedlen]; in isns_req_add() 122 be32enc(tlv->it_tag, tag); in isns_req_add() 123 be32enc(tlv->it_length, vlen); in isns_req_add() 124 memcpy(tlv->it_value, value, len); in isns_req_add() 126 memset(&tlv->it_value[len], 0, vlen - len); in isns_req_add() 127 req->ir_usedlen += sizeof(*tlv) + vlen; in isns_req_add()
|
| /freebsd-12-stable/contrib/libpcap/ |
| D | pcap-common.c | 1507 nflog_tlv_t *tlv; in swap_nflog_header() local 1528 tlv = (nflog_tlv_t *) p; in swap_nflog_header() 1531 tlv->tlv_type = SWAPSHORT(tlv->tlv_type); in swap_nflog_header() 1532 tlv->tlv_length = SWAPSHORT(tlv->tlv_length); in swap_nflog_header() 1535 size = tlv->tlv_length; in swap_nflog_header()
|
| /freebsd-12-stable/sys/net/ |
| D | ieee8023ad_lacp.h | 111 #define TLV_SET(tlv, type, length) \ argument 113 (tlv)->tlv_type = (type); \ 114 (tlv)->tlv_length = sizeof(*tlv) + (length); \
|
| /freebsd-12-stable/contrib/wpa/src/crypto/ |
| D | crypto_module_tests.c | 1074 u8 tlv[] = { in test_eap_fast() local 1143 os_memset(tlv + sizeof(tlv) - 20, 0, 20); in test_eap_fast() 1144 if (hmac_sha1(cmk, 20, tlv, sizeof(tlv), tlv + sizeof(tlv) - 20) < 0 || in test_eap_fast() 1145 os_memcmp(tlv + sizeof(tlv) - 20, compound_mac, in test_eap_fast()
|