OpenVPN
Functions
options_util.h File Reference
#include "options.h"
Include dependency graph for options_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const char * parse_auth_failed_temp (struct options *o, const char *reason)
 
bool valid_integer (const char *str, bool positive)
 Checks if the string is a valid integer by checking if it can be converted to an integer.
 
int positive_atoi (const char *str, int msglevel)
 Converts a str to a positive number if the string represents a postive integer number.
 
int atoi_warn (const char *str, int msglevel)
 Converts a str to an integer if the string can be represented as an integer number.
 

Function Documentation

◆ atoi_warn()

int atoi_warn ( const char *  str,
int  msglevel 
)

Converts a str to an integer if the string can be represented as an integer number.

Otherwise print a warning with msglevel and return 0

Definition at line 135 of file options_util.c.

References msg.

Referenced by add_option(), and test_atoi_variants().

◆ parse_auth_failed_temp()

const char * parse_auth_failed_temp ( struct options o,
const char *  reason 
)

◆ positive_atoi()

int positive_atoi ( const char *  str,
int  msglevel 
)

Converts a str to a positive number if the string represents a postive integer number.

Otherwise print a warning with msglevel and return 0

Definition at line 119 of file options_util.c.

References msg.

Referenced by add_option(), and test_atoi_variants().

◆ valid_integer()

bool valid_integer ( const char *  str,
bool  positive 
)

Checks if the string is a valid integer by checking if it can be converted to an integer.

Definition at line 103 of file options_util.c.

Referenced by add_option(), and test_atoi_variants().