Lines Matching full:collection

430 static struct key_collection collection;  variable
454 struct test_key *key = &collection.keys[index]; in init_key_in_collection()
485 size_t key_sz = sizeof(collection.keys[0]); in init_default_key_collection()
488 free(collection.keys); in init_default_key_collection()
489 collection.keys = NULL; in init_default_key_collection()
501 collection.keys = reallocarray(collection.keys, nr_keys, key_sz); in init_default_key_collection()
502 if (!collection.keys) in init_default_key_collection()
505 memset(collection.keys, 0, nr_keys * key_sz); in init_default_key_collection()
506 collection.nr_keys = nr_keys; in init_default_key_collection()
592 for (i = 0; i < collection.nr_keys; i++) { in key_collection_socket()
593 struct test_key *key = &collection.keys[i]; in key_collection_socket()
622 server ? "server" : "client", i, collection.nr_keys, in key_collection_socket()
638 for (i = 0; i < collection.nr_keys; i++) { in verify_counters()
639 struct test_key *key = &collection.keys[i]; in verify_counters()
687 keys = calloc(collection.nr_keys, len); in verify_keys()
691 keys->nkeys = collection.nr_keys; in verify_keys()
699 for (i = 0; i < collection.nr_keys; i++) { in verify_keys()
700 struct test_key *key = &collection.keys[i]; in verify_keys()
801 synchronize_threads(); /* 1: key collection initialized */ in start_server()
873 if (i >= collection.nr_keys) in server_rotations()
881 collection.keys[i].server_keyid, -1); in server_rotations()
894 synchronize_threads(); /* 1: key collection initialized */ in run_client()
901 sndid = collection.keys[current_index].client_keyid; in run_client()
903 rcvid = collection.keys[rnext_index].server_keyid; in run_client()
917 collection.keys[current_index].used_on_client_tx = 1; in run_client()
918 collection.keys[rnext_index].used_on_server_tx = 1; in run_client()
938 test_error("Failed to init the key collection"); in start_client()
956 collection.keys[current_index].client_keyid, in end_client()
957 collection.keys[rnext_index].server_keyid); in end_client()
975 key = &collection.keys[i]; in try_unmatched_keys()
978 } while (++i < collection.nr_keys); in try_unmatched_keys()
1007 for (i = 0; i < collection.nr_keys; i++) { in try_unmatched_keys()
1008 key = &collection.keys[i]; in try_unmatched_keys()
1032 test_error("Failed to init the key collection"); in client_non_matching()
1036 collection.keys[i].matches_client = !!((i + 3) % 4); in client_non_matching()
1037 collection.keys[i].matches_server = !!((i + 2) % 4); in client_non_matching()
1039 collection.keys[i].matches_vrf = !!((i + 1) % 4); in client_non_matching()
1058 if (test_set_key(sk, collection.keys[rotate_to_index].client_keyid, -1)) in check_current_back()
1062 collection.keys[rotate_to_index].client_keyid, in check_current_back()
1063 collection.keys[current_index].client_keyid, -1); in check_current_back()
1075 collection.keys[rotate_to_index].skip_counters_checks = 1; in check_current_back()
1093 if (i >= collection.nr_keys) in roll_over_keys()
1098 i == 0 ? -1 : collection.keys[i - 1].server_keyid, in roll_over_keys()
1099 collection.keys[i].server_keyid, -1); in roll_over_keys()
1100 if (test_set_key(sk, -1, collection.keys[i].server_keyid)) in roll_over_keys()
1109 collection.keys[i].server_keyid); in roll_over_keys()
1110 collection.keys[i].used_on_server_tx = 1; in roll_over_keys()