Functions
test_socks.cpp File Reference
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include "testutil.hpp"
#include "testutil_unity.hpp"
Include dependency graph for test_socks.cpp:

Go to the source code of this file.

Functions

void communicate (void *push, void *pull)
 
int main ()
 
SETUP_TEARDOWN_TESTCONTEXT void recvall (int sock_fd, char *buffer, int len)
 
int recvonce (int sock_fd, char *buffer, int len)
 
int remote_connect (int socket, uint32_t addr, uint16_t port)
 
void sendall (int sock_fd, char *buffer, int len)
 
voidsetup_pull_client (const char *connect_address, const char *socks_proxy)
 
voidsetup_push_server (char *connect_address, int connect_address_size)
 
voidsetup_socks_server (char *socks_server_address, int socks_server_address_len)
 
void socks_server_basic_auth (void *socks_server)
 
void socks_server_basic_auth_delay (void *socks_server)
 
void socks_server_basic_auth_no_pass (void *socks_server)
 
void socks_server_no_auth (void *socks_server)
 
void socks_server_no_auth_delay (void *socks_server)
 
void socks_server_task (void *socks_server, const char *username, const char *password, int max_client_connect)
 
void test_opt_invalid (const char *msg, int opt, const char *value, int len)
 
void test_opt_ok (const char *msg, int opt, const char *value, size_t len, const char *expected_value, size_t expected_len)
 
void test_socks (void)
 
void test_socks_basic_auth (void)
 
void test_socks_basic_auth_delay (void)
 
void test_socks_basic_auth_empty_pass (void)
 
void test_socks_basic_auth_empty_user (void)
 
void test_socks_basic_auth_null_pass (void)
 
void test_socks_basic_auth_null_user (void)
 
void test_socks_bind_before_connect (void)
 
void test_socks_delay (void)
 
void test_socks_domainname (void)
 
void test_socks_ipv6 (void)
 
void test_socks_ipv6_sb (void)
 
void test_socks_no_socks (void)
 
void test_socks_proxy_options (void)
 
void test_socks_userpass_options (void)
 
void test_string_opt_ok (const char *msg, int opt, const char *value)
 

Function Documentation

◆ communicate()

void communicate ( void push,
void pull 
)

Definition at line 450 of file test_socks.cpp.

◆ main()

int main ( )

Definition at line 846 of file test_socks.cpp.

◆ recvall()

SETUP_TEARDOWN_TESTCONTEXT void recvall ( int  sock_fd,
char *  buffer,
int  len 
)

Definition at line 24 of file test_socks.cpp.

◆ recvonce()

int recvonce ( int  sock_fd,
char *  buffer,
int  len 
)

Definition at line 40 of file test_socks.cpp.

◆ remote_connect()

int remote_connect ( int  socket,
uint32_t  addr,
uint16_t  port 
)

Definition at line 66 of file test_socks.cpp.

◆ sendall()

void sendall ( int  sock_fd,
char *  buffer,
int  len 
)

Definition at line 51 of file test_socks.cpp.

◆ setup_pull_client()

void* setup_pull_client ( const char *  connect_address,
const char *  socks_proxy 
)

Definition at line 401 of file test_socks.cpp.

◆ setup_push_server()

void* setup_push_server ( char *  connect_address,
int  connect_address_size 
)

Definition at line 387 of file test_socks.cpp.

◆ setup_socks_server()

void* setup_socks_server ( char *  socks_server_address,
int  socks_server_address_len 
)

Definition at line 77 of file test_socks.cpp.

◆ socks_server_basic_auth()

void socks_server_basic_auth ( void socks_server)

Definition at line 369 of file test_socks.cpp.

◆ socks_server_basic_auth_delay()

void socks_server_basic_auth_delay ( void socks_server)

Definition at line 374 of file test_socks.cpp.

◆ socks_server_basic_auth_no_pass()

void socks_server_basic_auth_no_pass ( void socks_server)

Definition at line 382 of file test_socks.cpp.

◆ socks_server_no_auth()

void socks_server_no_auth ( void socks_server)

Definition at line 356 of file test_socks.cpp.

◆ socks_server_no_auth_delay()

void socks_server_no_auth_delay ( void socks_server)

Definition at line 361 of file test_socks.cpp.

◆ socks_server_task()

void socks_server_task ( void socks_server,
const char *  username,
const char *  password,
int  max_client_connect 
)

Definition at line 91 of file test_socks.cpp.

◆ test_opt_invalid()

void test_opt_invalid ( const char *  msg,
int  opt,
const char *  value,
int  len 
)

Definition at line 796 of file test_socks.cpp.

◆ test_opt_ok()

void test_opt_ok ( const char *  msg,
int  opt,
const char *  value,
size_t  len,
const char *  expected_value,
size_t  expected_len 
)

Definition at line 774 of file test_socks.cpp.

◆ test_socks()

void test_socks ( void  )

Definition at line 473 of file test_socks.cpp.

◆ test_socks_basic_auth()

void test_socks_basic_auth ( void  )

Definition at line 607 of file test_socks.cpp.

◆ test_socks_basic_auth_delay()

void test_socks_basic_auth_delay ( void  )

Definition at line 632 of file test_socks.cpp.

◆ test_socks_basic_auth_empty_pass()

void test_socks_basic_auth_empty_pass ( void  )

Definition at line 707 of file test_socks.cpp.

◆ test_socks_basic_auth_empty_user()

void test_socks_basic_auth_empty_user ( void  )

Definition at line 657 of file test_socks.cpp.

◆ test_socks_basic_auth_null_pass()

void test_socks_basic_auth_null_pass ( void  )

Definition at line 732 of file test_socks.cpp.

◆ test_socks_basic_auth_null_user()

void test_socks_basic_auth_null_user ( void  )

Definition at line 682 of file test_socks.cpp.

◆ test_socks_bind_before_connect()

void test_socks_bind_before_connect ( void  )

Definition at line 583 of file test_socks.cpp.

◆ test_socks_delay()

void test_socks_delay ( void  )

Definition at line 492 of file test_socks.cpp.

◆ test_socks_domainname()

void test_socks_domainname ( void  )

Definition at line 511 of file test_socks.cpp.

◆ test_socks_ipv6()

void test_socks_ipv6 ( void  )

Definition at line 535 of file test_socks.cpp.

◆ test_socks_ipv6_sb()

void test_socks_ipv6_sb ( void  )

Definition at line 559 of file test_socks.cpp.

◆ test_socks_no_socks()

void test_socks_no_socks ( void  )

Definition at line 461 of file test_socks.cpp.

◆ test_socks_proxy_options()

void test_socks_proxy_options ( void  )

Definition at line 806 of file test_socks.cpp.

◆ test_socks_userpass_options()

void test_socks_userpass_options ( void  )

Definition at line 815 of file test_socks.cpp.

◆ test_string_opt_ok()

void test_string_opt_ok ( const char *  msg,
int  opt,
const char *  value 
)

Definition at line 758 of file test_socks.cpp.



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