Lines Matching defs:sk
290 extern int test_wait_fd(int sk, time_t sec, bool write);
291 extern int __test_connect_socket(int sk, const char *device,
340 static inline int _test_connect_socket(int sk, const union tcp_addr taddr,
346 return __test_connect_socket(sk, veth_name,
350 static inline int test_connect_socket(int sk, const union tcp_addr taddr,
353 return _test_connect_socket(sk, taddr, port, false);
356 extern int __test_set_md5(int sk, void *addr, size_t addr_sz,
358 static inline int test_set_md5(int sk, const union tcp_addr in_addr,
367 return __test_set_md5(sk, (void *)&addr, sizeof(addr),
405 extern int test_get_one_ao(int sk, struct tcp_ao_getsockopt *out,
408 extern int test_get_ao_info(int sk, struct tcp_ao_info_opt *out);
409 extern int test_set_ao_info(int sk, struct tcp_ao_info_opt *in);
415 static inline int test_verify_socket_key(int sk, struct tcp_ao_add *key)
420 err = test_get_one_ao(sk, &key2, &key->addr, sizeof(key->addr),
428 static inline int test_add_key_vrf(int sk,
441 err = setsockopt(sk, IPPROTO_TCP, TCP_AO_ADD_KEY, &tmp, sizeof(tmp));
445 return test_verify_socket_key(sk, &tmp);
448 static inline int test_add_key(int sk, const char *key,
452 return test_add_key_vrf(sk, key, 0, in_addr, prefix, 0, sndid, rcvid);
455 static inline int test_verify_socket_ao(int sk, struct tcp_ao_info_opt *ao)
460 err = test_get_ao_info(sk, &ao2);
467 static inline int test_set_ao_flags(int sk, bool ao_required, bool accept_icmps)
472 err = test_get_ao_info(sk, &ao);
479 err = test_set_ao_info(sk, &ao);
483 return test_verify_socket_ao(sk, &ao);
486 extern ssize_t test_server_run(int sk, ssize_t quota, time_t timeout_sec);
487 extern int test_client_verify(int sk, const size_t msg_len, const size_t nr);
521 extern int test_get_tcp_counters(int sk, struct tcp_counters *out);
594 extern int test_skpair_wait_poll(int sk, bool write, test_cnt cond,
596 extern int _test_skpair_connect_poll(int sk, const char *device,
599 static inline int test_skpair_connect_poll(int sk, const union tcp_addr taddr,
606 return _test_skpair_connect_poll(sk, veth_name,
610 extern int test_skpair_client(int sk, const size_t msg_len, const size_t nr,
612 extern int test_skpair_server(int sk, ssize_t quota,
674 extern void __test_sock_checkpoint(int sk, struct tcp_sock_state *state,
676 static inline void test_sock_checkpoint(int sk, struct tcp_sock_state *state,
679 __test_sock_checkpoint(sk, state, saddr, sizeof(*saddr));
681 extern void test_ao_checkpoint(int sk, struct tcp_ao_repair *state);
682 extern void __test_sock_restore(int sk, const char *device,
685 static inline void test_sock_restore(int sk, struct tcp_sock_state *state,
693 __test_sock_restore(sk, veth_name, state, saddr, &addr, sizeof(addr));
695 extern void test_ao_restore(int sk, struct tcp_ao_repair *state);
697 extern void test_enable_repair(int sk);
698 extern void test_disable_repair(int sk);
699 extern void test_kill_sk(int sk);
700 static inline int test_add_repaired_key(int sk,
715 if (setsockopt(sk, IPPROTO_TCP, TCP_AO_ADD_KEY, &tmp, sizeof(tmp)) < 0)
718 return test_verify_socket_key(sk, &tmp);