#include <config.h>
#include <atf-c.h>
#include <unistd.h>
#include <time.h>
#include <isc/socket.h>
#include "../task_p.h"
#include "../unix/socket_p.h"
#include "isctest.h"
Go to the source code of this file.
Data Structures | |
struct | completion_t |
Functions | |
static void | completion_init (completion_t *completion) |
static void | accept_done (isc_task_t *task, isc_event_t *event) |
static void | event_done (isc_task_t *task, isc_event_t *event) |
static isc_result_t | waitfor (completion_t *completion) |
static void | waitbody (void) |
static isc_result_t | waitfor2 (completion_t *c1, completion_t *c2) |
ATF_TC (udp_sendto) | |
ATF_TC_HEAD (udp_sendto, tc) | |
ATF_TC_BODY (udp_sendto, tc) | |
ATF_TC (udp_dup) | |
ATF_TC_HEAD (udp_dup, tc) | |
ATF_TC_BODY (udp_dup, tc) | |
ATF_TC (udp_dscp_v4) | |
ATF_TC_HEAD (udp_dscp_v4, tc) | |
ATF_TC_BODY (udp_dscp_v4, tc) | |
ATF_TC (udp_dscp_v6) | |
ATF_TC_HEAD (udp_dscp_v6, tc) | |
ATF_TC_BODY (udp_dscp_v6, tc) | |
ATF_TC (tcp_dscp_v4) | |
ATF_TC_HEAD (tcp_dscp_v4, tc) | |
ATF_TC_BODY (tcp_dscp_v4, tc) | |
ATF_TC (tcp_dscp_v6) | |
ATF_TC_HEAD (tcp_dscp_v6, tc) | |
ATF_TC_BODY (tcp_dscp_v6, tc) | |
ATF_TC (net_probedscp) | |
ATF_TC_HEAD (net_probedscp, tc) | |
ATF_TC_BODY (net_probedscp, tc) | |
ATF_TP_ADD_TCS (tp) | |
Variables | |
static isc_boolean_t | recv_dscp |
static unsigned int | recv_dscp_value |
Definition in file socket_test.c.
static void completion_init | ( | completion_t * | completion | ) | [static] |
Definition at line 48 of file socket_test.c.
References completion_t::done, ISC_FALSE, and completion_t::socket.
Referenced by ATF_TC_BODY().
static void accept_done | ( | isc_task_t * | task, | |
isc_event_t * | event | |||
) | [static] |
Definition at line 54 of file socket_test.c.
References completion_t::done, isc_event_free(), ISC_R_SUCCESS, ISC_TRUE, isc_socket_newconnev::newsocket, isc_socket_newconnev::result, completion_t::result, completion_t::socket, and UNUSED.
Referenced by ATF_TC_BODY().
static void event_done | ( | isc_task_t * | task, | |
isc_event_t * | event | |||
) | [static] |
Definition at line 69 of file socket_test.c.
References isc_socketevent::attributes, completion_t::done, isc_socketevent::dscp, isc_event_free(), ISC_FALSE, ISC_SOCKEVENTATTR_DSCP, ISC_TRUE, recv_dscp, recv_dscp_value, isc_socketevent::result, completion_t::result, and UNUSED.
Referenced by ATF_TC_BODY().
static isc_result_t waitfor | ( | completion_t * | completion | ) | [static] |
Definition at line 87 of file socket_test.c.
References completion_t::done, isc__taskmgr_dispatch(), isc__taskmgr_ready(), ISC_R_FAILURE, ISC_R_SUCCESS, isc_test_nap(), and taskmgr.
Referenced by ATF_TC_BODY().
static void waitbody | ( | void | ) | [static] |
Definition at line 115 of file socket_test.c.
References isc__socketmgr_dispatch(), isc__socketmgr_waitevents(), isc__taskmgr_dispatch(), isc__taskmgr_ready(), isc_test_nap(), socketmgr, and taskmgr.
Referenced by waitfor2().
static isc_result_t waitfor2 | ( | completion_t * | c1, | |
completion_t * | c2 | |||
) | [static] |
Definition at line 133 of file socket_test.c.
References completion_t::done, ISC_R_FAILURE, ISC_R_SUCCESS, and waitbody().
Referenced by ATF_TC_BODY().
ATF_TC | ( | udp_sendto | ) |
ATF_TC_HEAD | ( | udp_sendto | , | |
tc | ||||
) |
Definition at line 150 of file socket_test.c.
ATF_TC_BODY | ( | udp_sendto | , | |
tc | ||||
) |
Definition at line 153 of file socket_test.c.
References isc_region::base, completion_init(), completion_t::done, event_done(), ISC_R_SUCCESS, isc_sockaddr_fromin(), isc_socket_bind(), isc_socket_create(), isc_socket_detach(), isc_socket_recv(), ISC_SOCKET_REUSEADDRESS, isc_socket_sendto(), isc_sockettype_udp, isc_task_create(), isc_task_detach(), isc_test_begin(), isc_test_end(), ISC_TRUE, isc_region::length, r, completion_t::result, socketmgr, taskmgr, UNUSED, and waitfor().
ATF_TC | ( | udp_dup | ) |
ATF_TC_HEAD | ( | udp_dup | , | |
tc | ||||
) |
Definition at line 221 of file socket_test.c.
ATF_TC_BODY | ( | udp_dup | , | |
tc | ||||
) |
Definition at line 224 of file socket_test.c.
References isc_region::base, completion_init(), completion_t::done, event_done(), ISC_R_SUCCESS, isc_sockaddr_fromin(), isc_socket_bind(), isc_socket_create(), isc_socket_detach(), isc_socket_dup(), isc_socket_recv(), ISC_SOCKET_REUSEADDRESS, isc_socket_sendto(), isc_sockettype_udp, isc_task_create(), isc_task_detach(), isc_test_begin(), isc_test_end(), ISC_TRUE, isc_region::length, r, completion_t::result, socketmgr, taskmgr, UNUSED, and waitfor().
ATF_TC | ( | udp_dscp_v4 | ) |
ATF_TC_HEAD | ( | udp_dscp_v4 | , | |
tc | ||||
) |
Definition at line 318 of file socket_test.c.
ATF_TC_BODY | ( | udp_dscp_v4 | , | |
tc | ||||
) |
Definition at line 321 of file socket_test.c.
References isc_socketevent::attributes, isc_region::base, completion_init(), completion_t::done, isc_socketevent::dscp, event_done(), ISC_FALSE, ISC_NET_DSCPPKTV4, ISC_NET_DSCPRECVV4, ISC_NET_DSCPSETV4, isc_net_probedscp(), ISC_R_SUCCESS, isc_result_totext(), isc_sockaddr_fromin(), isc_socket_bind(), isc_socket_create(), isc_socket_detach(), isc_socket_dscp(), isc_socket_recv(), ISC_SOCKET_REUSEADDRESS, isc_socket_sendto2(), isc_socket_socketevent(), isc_sockettype_udp, ISC_SOCKEVENT_SENDDONE, ISC_SOCKEVENTATTR_DSCP, isc_task_create(), isc_task_detach(), isc_test_begin(), isc_test_end(), ISC_TRUE, isc_region::length, mctx, r, recv_dscp, recv_dscp_value, completion_t::result, socketmgr, taskmgr, UNUSED, and waitfor().
ATF_TC | ( | udp_dscp_v6 | ) |
ATF_TC_HEAD | ( | udp_dscp_v6 | , | |
tc | ||||
) |
Definition at line 417 of file socket_test.c.
ATF_TC_BODY | ( | udp_dscp_v6 | , | |
tc | ||||
) |
Definition at line 420 of file socket_test.c.
References AF_INET6, isc_socketevent::attributes, isc_region::base, completion_init(), completion_t::done, isc_socketevent::dscp, event_done(), ISC_FALSE, ISC_NET_DSCPPKTV6, ISC_NET_DSCPRECVV6, ISC_NET_DSCPSETV6, isc_net_probedscp(), ISC_R_SUCCESS, isc_result_totext(), isc_sockaddr_fromin6(), isc_socket_bind(), isc_socket_create(), isc_socket_detach(), isc_socket_dscp(), isc_socket_recv(), ISC_SOCKET_REUSEADDRESS, isc_socket_sendto2(), isc_socket_socketevent(), isc_sockettype_udp, ISC_SOCKEVENT_SENDDONE, ISC_SOCKEVENTATTR_DSCP, isc_task_create(), isc_task_detach(), isc_test_begin(), isc_test_end(), ISC_TRUE, isc_region::length, mctx, PF_INET6, r, recv_dscp, recv_dscp_value, completion_t::result, socketmgr, taskmgr, UNUSED, and waitfor().
ATF_TC | ( | tcp_dscp_v4 | ) |
ATF_TC_HEAD | ( | tcp_dscp_v4 | , | |
tc | ||||
) |
Definition at line 516 of file socket_test.c.
ATF_TC_BODY | ( | tcp_dscp_v4 | , | |
tc | ||||
) |
Definition at line 519 of file socket_test.c.
References accept_done(), isc_region::base, completion_init(), completion_t::done, event_done(), ISC_FALSE, ISC_NET_DSCPRECVV4, isc_net_probedscp(), ISC_R_SUCCESS, isc_sockaddr_fromin(), isc_socket_accept(), isc_socket_bind(), isc_socket_connect(), isc_socket_create(), isc_socket_detach(), isc_socket_dscp(), isc_socket_listen(), isc_socket_recv(), ISC_SOCKET_REUSEADDRESS, isc_socket_sendto(), isc_sockettype_tcp, isc_task_create(), isc_task_detach(), isc_test_begin(), isc_test_end(), ISC_TRUE, isc_region::length, r, recv_dscp, recv_dscp_value, completion_t::result, completion_t::socket, socketmgr, taskmgr, UNUSED, waitfor(), and waitfor2().
ATF_TC | ( | tcp_dscp_v6 | ) |
ATF_TC_HEAD | ( | tcp_dscp_v6 | , | |
tc | ||||
) |
Definition at line 613 of file socket_test.c.
ATF_TC_BODY | ( | tcp_dscp_v6 | , | |
tc | ||||
) |
Definition at line 616 of file socket_test.c.
References accept_done(), AF_INET6, isc_region::base, completion_init(), completion_t::done, event_done(), ISC_FALSE, ISC_NET_DSCPRECVV6, isc_net_probedscp(), ISC_R_SUCCESS, isc_sockaddr_fromin6(), isc_socket_accept(), isc_socket_bind(), isc_socket_connect(), isc_socket_create(), isc_socket_detach(), isc_socket_dscp(), isc_socket_listen(), isc_socket_recv(), ISC_SOCKET_REUSEADDRESS, isc_socket_sendto(), isc_sockettype_tcp, isc_task_create(), isc_task_detach(), isc_test_begin(), isc_test_end(), ISC_TRUE, isc_region::length, PF_INET6, r, recv_dscp, recv_dscp_value, completion_t::result, completion_t::socket, socketmgr, taskmgr, UNUSED, waitfor(), and waitfor2().
ATF_TC | ( | net_probedscp | ) |
ATF_TC_HEAD | ( | net_probedscp | , | |
tc | ||||
) |
Definition at line 717 of file socket_test.c.
ATF_TC_BODY | ( | net_probedscp | , | |
tc | ||||
) |
Definition at line 720 of file socket_test.c.
References ISC_NET_DSCPALL, ISC_NET_DSCPPKTV4, ISC_NET_DSCPPKTV6, ISC_NET_DSCPRECVV4, ISC_NET_DSCPRECVV6, ISC_NET_DSCPSETV4, ISC_NET_DSCPSETV6, isc_net_probedscp(), and UNUSED.
ATF_TP_ADD_TCS | ( | tp | ) |
Definition at line 760 of file socket_test.c.
isc_boolean_t recv_dscp [static] |
unsigned int recv_dscp_value [static] |