Lines Matching refs:meta
378 struct unseg_app_sdu_meta *meta) in unseg_app_sdu_unpack() argument
390 meta->subnet = frnd->subnet; in unseg_app_sdu_unpack()
392 err = bt_mesh_keys_resolve(&net.ctx, &net.sub, &meta->key, &meta->aid); in unseg_app_sdu_unpack()
397 meta->crypto.src = net.ctx.addr; in unseg_app_sdu_unpack()
398 meta->crypto.dst = net.ctx.recv_dst; in unseg_app_sdu_unpack()
399 meta->crypto.iv_index = BT_MESH_NET_IVI_TX; in unseg_app_sdu_unpack()
400 meta->crypto.dev_key = BT_MESH_IS_DEV_KEY(app_idx); in unseg_app_sdu_unpack()
401 meta->crypto.seq_num = net.seq; in unseg_app_sdu_unpack()
402 meta->crypto.aszmic = 0; in unseg_app_sdu_unpack()
404 if (BT_MESH_ADDR_IS_VIRTUAL(meta->crypto.dst)) { in unseg_app_sdu_unpack()
405 meta->crypto.ad = bt_mesh_va_get_uuid_by_idx(uuidx); in unseg_app_sdu_unpack()
407 meta->crypto.ad = NULL; in unseg_app_sdu_unpack()
415 const struct unseg_app_sdu_meta *meta) in unseg_app_sdu_decrypt() argument
432 return bt_mesh_app_decrypt(meta->key, &meta->crypto, &in, &out); in unseg_app_sdu_decrypt()
437 const struct unseg_app_sdu_meta *meta) in unseg_app_sdu_encrypt() argument
446 return bt_mesh_app_encrypt(meta->key, &meta->crypto, &sdu); in unseg_app_sdu_encrypt()
452 struct unseg_app_sdu_meta meta; in unseg_app_sdu_prepare() local
459 err = unseg_app_sdu_unpack(frnd, buf, &meta); in unseg_app_sdu_prepare()
467 if (meta.crypto.seq_num == bt_mesh.seq) { in unseg_app_sdu_prepare()
471 LOG_DBG("Re-encrypting friend pdu (SeqNum %06x -> %06x)", meta.crypto.seq_num, bt_mesh.seq); in unseg_app_sdu_prepare()
473 err = unseg_app_sdu_decrypt(frnd, buf, &meta); in unseg_app_sdu_prepare()
479 meta.crypto.seq_num = bt_mesh.seq; in unseg_app_sdu_prepare()
481 err = unseg_app_sdu_encrypt(frnd, buf, &meta); in unseg_app_sdu_prepare()