Macros | Functions | Variables
testutil.cpp File Reference
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <stdarg.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <grp.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netdb.h>
#include <sys/un.h>
#include <dirent.h>
Include dependency graph for testutil.cpp:

Go to the source code of this file.

Macros

#define PATH_MAX   1024
 

Functions

sockaddr_in bind_bsd_socket (int socket_)
 
fd_t bind_socket_resolve_port (const char *address_, const char *port_, char *my_endpoint_, const int af_, const int protocol_)
 
void bounce (void *server_, void *client_)
 
void close_zero_linger (void *socket_)
 
fd_t connect_socket (const char *endpoint_, const int af_, const int protocol_)
 
void expect_bounce_fail (void *server_, void *client_)
 
int fuzzer_corpus_encode (const char *dirname, uint8_t ***data, size_t **len, size_t *num_cases)
 
int is_ipv6_available ()
 
int is_tipc_available ()
 
void msleep (int milliseconds_)
 
static void recv_bounce_msg (void *socket_)
 
static void recv_bounce_msg_fail (void *socket_)
 
char * s_recv (void *socket_)
 
void s_recv_seq (void *socket_,...)
 
void s_send_seq (void *socket_,...)
 
static void send_bounce_msg (void *socket_)
 
static void send_bounce_msg_may_fail (void *socket_)
 
void setup_test_environment (int timeout_seconds_)
 
bool streq (const char *lhs_, const char *rhs_)
 
bool strneq (const char *lhs_, const char *rhs_)
 
int test_inet_pton (int af_, const char *src_, void *dst_)
 

Variables

const char bounce_content [] = "12345678ABCDEFGH12345678abcdefgh"
 
const char * SEQ_END = (const char *) 1
 

Macro Definition Documentation

◆ PATH_MAX

#define PATH_MAX   1024

Definition at line 44 of file testutil.cpp.

Function Documentation

◆ bind_bsd_socket()

sockaddr_in bind_bsd_socket ( int  socket_)

Definition at line 329 of file testutil.cpp.

◆ bind_socket_resolve_port()

fd_t bind_socket_resolve_port ( const char *  address_,
const char *  port_,
char *  my_endpoint_,
const int  af_,
const int  protocol_ 
)

Definition at line 410 of file testutil.cpp.

◆ bounce()

void bounce ( void server_,
void client_ 
)

Definition at line 71 of file testutil.cpp.

◆ close_zero_linger()

void close_zero_linger ( void socket_)

Definition at line 193 of file testutil.cpp.

◆ connect_socket()

fd_t connect_socket ( const char *  endpoint_,
const int  af_,
const int  protocol_ 
)

Definition at line 353 of file testutil.cpp.

◆ expect_bounce_fail()

void expect_bounce_fail ( void server_,
void client_ 
)

Definition at line 107 of file testutil.cpp.

◆ fuzzer_corpus_encode()

int fuzzer_corpus_encode ( const char *  dirname,
uint8_t ***  data,
size_t **  len,
size_t *  num_cases 
)

Definition at line 534 of file testutil.cpp.

◆ is_ipv6_available()

int is_ipv6_available ( )

Definition at line 236 of file testutil.cpp.

◆ is_tipc_available()

int is_tipc_available ( )

Definition at line 283 of file testutil.cpp.

◆ msleep()

void msleep ( int  milliseconds_)

Definition at line 227 of file testutil.cpp.

◆ recv_bounce_msg()

static void recv_bounce_msg ( void socket_)
static

Definition at line 57 of file testutil.cpp.

◆ recv_bounce_msg_fail()

static void recv_bounce_msg_fail ( void socket_)
static

Definition at line 98 of file testutil.cpp.

◆ s_recv()

char* s_recv ( void socket_)

Definition at line 123 of file testutil.cpp.

◆ s_recv_seq()

void s_recv_seq ( void socket_,
  ... 
)

Definition at line 158 of file testutil.cpp.

◆ s_send_seq()

void s_send_seq ( void socket_,
  ... 
)

Definition at line 135 of file testutil.cpp.

◆ send_bounce_msg()

static void send_bounce_msg ( void socket_)
static

Definition at line 51 of file testutil.cpp.

◆ send_bounce_msg_may_fail()

static void send_bounce_msg_may_fail ( void socket_)
static

Definition at line 87 of file testutil.cpp.

◆ setup_test_environment()

void setup_test_environment ( int  timeout_seconds_)

Definition at line 201 of file testutil.cpp.

◆ streq()

bool streq ( const char *  lhs_,
const char *  rhs_ 
)

Definition at line 508 of file testutil.cpp.

◆ strneq()

bool strneq ( const char *  lhs_,
const char *  rhs_ 
)

Definition at line 513 of file testutil.cpp.

◆ test_inet_pton()

int test_inet_pton ( int  af_,
const char *  src_,
void dst_ 
)

Definition at line 303 of file testutil.cpp.

Variable Documentation

◆ bounce_content

const char bounce_content[] = "12345678ABCDEFGH12345678abcdefgh"

Definition at line 49 of file testutil.cpp.

◆ SEQ_END

const char* SEQ_END = (const char *) 1

Definition at line 47 of file testutil.cpp.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:04