|
Ripples 1.0
High Performant Software Architecture For Transaction Processing
|
#include <errno.h>#include <getopt.h>#include <limits.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "config.h"#include "constants.h"#include "rip_ns_utils.h"#include "utils.h"
Typedefs | |
| typedef enum cfg_opt_long_index_e | cfg_opt_long_index_t |
Enumerations | |
| enum | cfg_opt_long_index_e { OPT_UNKNOWN = 0 , OPT_HELP , OPT_UDP_ENABLE , OPT_UDP_LISTENER_PORT , OPT_UDP_SOCK_RECV_BUFF_SIZE , OPT_UDP_SOCK_SEND_BUFF_SIZE , OPT_UDP_CONN_VECTOR_LEN , OPT_TCP_ENABLE , OPT_TCP_LIST_PENDING_CONNS_MAX , OPT_TCP_LISTENER_PORT , OPT_TCP_CONN_PER_VL_MAX , OPT_TCP_LIST_MAX_ACCEPT_NEW_CONNS , OPT_TCP_CONN_SOCKET_RECV_BUFF_SIZE , OPT_TCP_CONN_SOCKET_SEND_BUFF_SIZE , OPT_TCP_CONN_SIMULTANEOUS_QUERY_COUNT , OPT_TCP_KEEPALIVE , OPT_TCP_QUERY_RECV_TIMEOUT , OPT_TCP_QUERY_SEND_TIMEOUT , OPT_EPOLL_NUM_EVENTS_TCP , OPT_EPOLL_NUM_EVENTS_UDP , OPT_PROCESS_THREAD_COUNT , OPT_PROCESS_THREAD_MASKS , OPT_LOOP_SLOWDOWN_ONE , OPT_LOOP_SLOWDOWN_TWO , OPT_LOOP_SLOWDOWN_THREE , OPT_APP_LOG_NAME , OPT_APP_LOG_PATH , OPT_QUERY_LOG_BUFFER_SIZE , OPT_QUERY_LOG_BASE_NAME , OPT_QUERY_LOG_PATH , OPT_QUERY_LOG_ROTATE_SIZE } |
Functions | |
| static void | usage (void) |
| static ssize_t | config_parse_unsigned_long_opt (const char *name, const char *str, size_t min, size_t max) |
| void | config_init (config_t *cfg) |
| int | config_parse_opts (config_t *cfg, int argc, char *argv[]) |
| void | config_clean (config_t *cfg) |
Copyright (c) 2025 Faruk Grozdanic
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| typedef enum cfg_opt_long_index_e cfg_opt_long_index_t |
Enumerated CLI option indexes.
| enum cfg_opt_long_index_e |
Enumerated CLI option indexes.
|
static |
Parse string to unsigned long and ensure it falls within min & max bounds.
Maximum value is limited to maximum positive number or type ssize_t.
| name | Name of parameter being parsed. |
| str | String to parse into unsigned long. |
| min | Minumum bound for parsed unsigned long. |
| max | Maximum bound for parsed unsigned long. |


|
static |
Outputs a usage message to standard out.
