![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
#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 |
| NETWORK * | netw = NULL |
| Network for server mode, accepting incomming. | |
| char * | port = NULL |
| char * | root_dir = NULL |
| LIST * | routes = NULL |
| NETWORK * | server = NULL |
| int | ssl_verify = 0 |
| struct NETWORK_SSL_THREAD_PARAMS |
structure of a NETWORK_SSL_THREAD_PARAMS
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 |
| void action_on_sig | ( | int | recvd_signal | ) |
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:Definition at line 245 of file ex_network_ssl.c.
References __n_assert, _nstr, _str, Alloca, NETWORK_HTTP_INFO::body, char_to_nstr(), N_STR::data, destroy_ht(), file_to_nstr(), free_nstr, free_split_result(), HT_FOREACH, N_SOCKET::ip, NETWORK::link, list_foreach, LOG_DEBUG, LOG_ERR, LOG_INFO, max_http_request_size, n_log, netw_build_http_response(), netw_close(), netw_extract_http_info(), netw_get_url_from_http_request(), netw_guess_http_content_type(), netw_info_destroy(), netw_parse_post_data(), new_nstr(), nstrprintf, root_dir, send_ssl_data(), N_SOCKET::sock, SOCKET_SIZE_FORMAT, split(), NETWORK::ssl, NETWORK_HTTP_INFO::type, and N_STR::written.
Referenced by ssl_network_thread().
Here is the call graph for this function:
Here is the caller graph for this function:| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 428 of file ex_network_ssl.c.
References __n_assert, _str, action_on_sig(), add_threaded_process(), addr, ca_file, cert, destroy_threaded_pool(), DIRECT_PROC, done, FreeNoLog, get_nb_cpu_cores(), ip_version, key, NETWORK::link, list_destroy(), LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_NOTICE, Malloc, max_connections, max_http_request_size, MAX_LIST_ITEMS, n_log, netw, NETWORK_SSL_THREAD_PARAMS::netw, netw_accept_from_ex(), netw_close(), netw_make_listening(), netw_set_crypto(), netw_set_crypto_chain(), netw_ssl_set_verify(), new_generic_list(), new_thread_pool(), port, process_args(), root_dir, routes, NETWORK_SSL_THREAD_PARAMS::routes, server, N_SOCKET::sock, ssl_network_thread(), ssl_verify, thread_pool, and wait_for_threaded_pool().
Here is the call graph for this function:| 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:| void * ssl_network_thread | ( | void * | params | ) |
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:| void usage | ( | void | ) |
Network for managing connections.
Definition at line 52 of file ex_network_ssl.c.
References max_http_request_size.
| char* addr = NULL |
Definition at line 37 of file ex_network_ssl.c.
Referenced by addr2line(), main(), main(), netw_bind_udp(), and netw_make_listening().
| char* ca_file = NULL |
Definition at line 40 of file ex_network_ssl.c.
Referenced by main(), netw_set_crypto_chain(), and netw_ssl_set_ca().
| char* cert = NULL |
Definition at line 39 of file ex_network_ssl.c.
Referenced by main(), and netw_set_crypto_pem().
| bool done = 0 |
Definition at line 47 of file ex_network_ssl.c.
Referenced by action_on_sig(), main(), main(), and on_quit_click().
| int ip_version = 0 |
Definition at line 43 of file ex_network_ssl.c.
Referenced by main(), netw_bind_udp(), netw_connect(), netw_connect_ex(), netw_connect_udp(), netw_make_listening(), netw_ssl_connect(), and netw_ssl_connect_client().
| char* key = NULL |
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().
| int max_connections = 0 |
Definition at line 46 of file ex_network_ssl.c.
Referenced by main(), and process_args().
| int max_http_request_size = 16384 |
Definition at line 44 of file ex_network_ssl.c.
Referenced by handle_request(), main(), and usage().
| NETWORK * netw = NULL |
Network for server mode, accepting incomming.
Definition at line 50 of file ex_network_ssl.c.
| char* port = NULL |
Definition at line 36 of file ex_network_ssl.c.
Referenced by _proxy_tcp_connect(), main(), main(), n_mock_server_start(), n_proxy_cfg_parse(), n_sse_connect(), n_ws_connect(), netw_bind_udp(), netw_connect(), netw_connect_ex(), netw_connect_udp(), netw_make_listening(), netw_ssl_connect(), netw_ssl_connect_client(), run_client(), and run_server().
| char* root_dir = NULL |
Definition at line 41 of file ex_network_ssl.c.
Referenced by handle_request(), and main().
| LIST* routes = NULL |
Definition at line 42 of file ex_network_ssl.c.
Referenced by main().
| NETWORK* server = NULL |
Definition at line 49 of file ex_network_ssl.c.
Referenced by main(), main(), n_mock_server_free(), n_mock_server_run(), n_mock_server_start(), n_mock_server_stop(), netw_accept_pool_create(), and run_client().
| int ssl_verify = 0 |
Definition at line 45 of file ex_network_ssl.c.
Referenced by main().