Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_network_ssl.c File Reference
#include "nilorea/n_list.h"
#include "nilorea/n_str.h"
#include "nilorea/n_log.h"
#include "nilorea/n_network.h"
#include "nilorea/n_thread_pool.h"
#include "nilorea/n_signals.h"
#include <sys/stat.h>
+ Include dependency graph for ex_network_ssl.c:

Go to the source code of this file.

Data Structures

struct  NETWORK_SSL_THREAD_PARAMS
 structure of a NETWORK_SSL_THREAD_PARAMS More...
 

Functions

void action_on_sig (int recvd_signal)
 
void handle_request (NETWORK *netw_ptr, LIST *routes_ptr)
 
int main (int argc, char *argv[])
 
void process_args (int argc_nb, char **argv_ptr, char **addr_ptr, char **port_ptr, char **key_ptr, char **cert_ptr, char **ca_file_ptr, int *ssl_verify_ptr, LIST *routes_ptr, int *ip_version_ptr, int *max_http_request_size_ptr, char **root_dir_ptr)
 
void * ssl_network_thread (void *params)
 
void usage (void)
 Network for managing connections.
 

Variables

char * addr = NULL
 
char * ca_file = NULL
 
char * cert = NULL
 
bool done = 0
 
int ip_version = 0
 
char * key = NULL
 
int max_connections = 0
 
int max_http_request_size = 16384
 
NETWORKnetw = NULL
 Network for server mode, accepting incomming.
 
char * port = NULL
 
char * root_dir = NULL
 
LISTroutes = NULL
 
NETWORKserver = NULL
 
int ssl_verify = 0
 

Data Structure Documentation

◆ NETWORK_SSL_THREAD_PARAMS

struct NETWORK_SSL_THREAD_PARAMS

structure of a NETWORK_SSL_THREAD_PARAMS

Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 412 of file ex_network_ssl.c.

+ Collaboration diagram for NETWORK_SSL_THREAD_PARAMS:
Data Fields
NETWORK * netw network to use for the receiving thread
LIST * routes virtual routes for the server

Function Documentation

◆ action_on_sig()

void action_on_sig ( int  recvd_signal)
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 194 of file ex_network_ssl.c.

References done, LOG_ERR, LOG_NOTICE, and n_log.

Referenced by main().

+ Here is the caller graph for this function:

◆ handle_request()

◆ main()

◆ process_args()

void process_args ( int  argc_nb,
char **  argv_ptr,
char **  addr_ptr,
char **  port_ptr,
char **  key_ptr,
char **  cert_ptr,
char **  ca_file_ptr,
int *  ssl_verify_ptr,
LIST routes_ptr,
int *  ip_version_ptr,
int *  max_http_request_size_ptr,
char **  root_dir_ptr 
)

Definition at line 70 of file ex_network_ssl.c.

References getoptret, list_push(), LOG_DEBUG, LOG_ERR, LOG_INFO, log_level, LOG_NOTICE, LOG_NULL, max_connections, n_log, NETWORK_IPV4, NETWORK_IPV6, set_log_level(), and usage().

+ Here is the call graph for this function:

◆ ssl_network_thread()

void * ssl_network_thread ( void *  params)
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 419 of file ex_network_ssl.c.

References __n_assert, Free, handle_request(), NETWORK_SSL_THREAD_PARAMS::netw, netw_close(), and NETWORK_SSL_THREAD_PARAMS::routes.

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ usage()

void usage ( void  )

Network for managing connections.

Definition at line 52 of file ex_network_ssl.c.

References max_http_request_size.

Variable Documentation

◆ addr

◆ ca_file

char* ca_file = NULL
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 40 of file ex_network_ssl.c.

Referenced by main(), netw_set_crypto_chain(), and netw_ssl_set_ca().

◆ cert

char* cert = NULL
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 39 of file ex_network_ssl.c.

Referenced by main(), and netw_set_crypto_pem().

◆ done

bool done = 0

◆ ip_version

◆ key

char* key = NULL
Examples
ex_configfile.c, ex_crypto.c, ex_fluid.c, ex_gui_dictionary.c, ex_gui_particles.c, ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 38 of file ex_network_ssl.c.

Referenced by _ht_check_trie_divergence(), _ht_find_longest_prefix_trie(), _ht_get_double(), _ht_get_double_trie(), _ht_get_int(), _ht_get_int_trie(), _ht_get_node(), _ht_get_node_trie(), _ht_get_ptr(), _ht_get_ptr_trie(), _ht_get_string(), _ht_get_string_trie(), _ht_is_leaf_node_trie(), _ht_new_double_node(), _ht_new_int_node(), _ht_new_node(), _ht_new_node_trie(), _ht_new_ptr_node(), _ht_new_string_node(), _ht_new_string_ptr_node(), _ht_put_double(), _ht_put_double_trie(), _ht_put_int(), _ht_put_int_trie(), _ht_put_ptr(), _ht_put_ptr_trie(), _ht_put_string(), _ht_put_string_ptr(), _ht_put_string_ptr_trie(), _ht_put_string_trie(), _ht_remove(), _ht_remove_trie(), _n_nodup_log(), _n_nodup_log_indexed(), _register_widget(), avro_decode_container(), avro_decode_datum(), avro_encode_datum(), check_n_log_dup(), check_n_log_dup_indexed(), ht_get_completion_list(), ht_get_double(), ht_get_int(), ht_get_node(), ht_get_ptr(), ht_get_string(), ht_put_double(), ht_put_int(), ht_put_ptr(), ht_put_string(), ht_put_string_ptr(), ht_remove(), iso_map_draw(), main(), MurmurHash3_x64_128(), MurmurHash3_x86_128(), MurmurHash3_x86_32(), n_gui_get_widget(), n_gui_kvtable_add_row(), n_kafka_add_header(), n_kafka_add_header_ex(), n_str_template_expand(), n_vigenere_cypher(), n_vigenere_cypher_thread(), n_vigenere_decode(), n_vigenere_decode_file(), n_vigenere_decode_in_place(), n_vigenere_encode(), n_vigenere_encode_file(), n_vigenere_encode_in_place(), netw_parse_post_data(), netw_pool_add(), netw_pool_remove(), netw_set_crypto(), netw_set_crypto_chain(), and write_config_file().

◆ max_connections

int max_connections = 0
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 46 of file ex_network_ssl.c.

Referenced by main(), and process_args().

◆ max_http_request_size

int max_http_request_size = 16384
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 44 of file ex_network_ssl.c.

Referenced by handle_request(), main(), and usage().

◆ netw

NETWORK * netw = NULL

Network for server mode, accepting incomming.

Definition at line 50 of file ex_network_ssl.c.

◆ port

◆ root_dir

char* root_dir = NULL
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 41 of file ex_network_ssl.c.

Referenced by handle_request(), and main().

◆ routes

LIST* routes = NULL
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 42 of file ex_network_ssl.c.

Referenced by main().

◆ server

◆ ssl_verify

int ssl_verify = 0
Examples
ex_network_ssl.c, and ex_network_ssl_hardened.c.

Definition at line 45 of file ex_network_ssl.c.

Referenced by main().