Lines Matching refs:keys
49 static void get_keys(int fd, uint32_t *keys) in get_keys() argument
55 if (getsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, &len)) in get_keys()
62 if (sscanf(buf, "%x-%x-%x-%x,%x-%x-%x-%x", keys, keys + 1, keys + 2, in get_keys()
63 keys + 3, keys + 4, keys + 5, keys + 6, keys + 7) != 8) in get_keys()
67 static void set_keys(int fd, uint32_t *keys) in set_keys() argument
72 if (setsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, in set_keys()
79 keys[0], keys[1], keys[2], keys[3], keys[4], keys[5], in set_keys()
80 keys[6], keys[7]); in set_keys()
83 keys[0], keys[1], keys[2], keys[3]); in set_keys()
96 uint32_t keys[8]; in build_rcv_fd() local
121 for (i = 0; i < ARRAY_SIZE(keys); i++) in build_rcv_fd()
122 keys[i] = rand(); in build_rcv_fd()
135 set_keys(rcv_fds[i], keys); in build_rcv_fd()
215 uint32_t keys[8]; in rotate_key() local
225 get_keys(fd, keys); in rotate_key()
226 memcpy(keys + 4, new_key, KEY_LENGTH); in rotate_key()
227 set_keys(fd, keys); in rotate_key()
230 get_keys(fd, keys); in rotate_key()
231 memcpy(tmp_key, keys + 4, KEY_LENGTH); in rotate_key()
232 memcpy(keys + 4, keys, KEY_LENGTH); in rotate_key()
233 memcpy(keys, tmp_key, KEY_LENGTH); in rotate_key()
234 set_keys(fd, keys); in rotate_key()