|
Greenbone Security Assistant
7.0.3~git
|
Headers/structs for a string validator. More...
#include <glib.h>

Go to the source code of this file.
Data Structures | |
| struct | validator_rule |
| A validator rule. More... | |
Typedefs | |
| typedef GHashTable * | validator_t |
| A set of name rule pairs. More... | |
| typedef struct validator_rule | validator_rule_t |
| A validator rule. More... | |
Functions | |
| validator_t | openvas_validator_new () |
| Create a new validator. More... | |
| void | openvas_validator_add (validator_t, const char *, const char *) |
| Add or overwrite a validation rule. More... | |
| int | openvas_validator_alias (validator_t, const char *, const char *) |
| Make an alias for a rule name. More... | |
| gchar * | openvas_validator_alias_for (validator_t, const char *) |
| Get the name of the rule for which a rule is an alias. More... | |
| int | openvas_validate (validator_t, const char *, const char *) |
| Validate a string for a given rule. More... | |
| void | openvas_validator_free (validator_t) |
| Free a validator. More... | |
Headers/structs for a string validator.
Definition in file validator.h.
| typedef struct validator_rule validator_rule_t |
A validator rule.
Definition at line 54 of file validator.h.
| typedef GHashTable* validator_t |
A set of name rule pairs.
Definition at line 40 of file validator.h.
| int openvas_validate | ( | validator_t | validator, |
| const char * | name, | ||
| const char * | value | ||
| ) |
Validate a string for a given rule.
| validator | Validator to validate from. |
| name | Name of rule. |
| value | Value to validate. |
Definition at line 182 of file validator.c.
References validator_rule::regex, and validator.
| void openvas_validator_add | ( | validator_t | validator, |
| const char * | name, | ||
| const char * | regex | ||
| ) |
Add or overwrite a validation rule.
| validator | Validator to add rule to. |
| name | Name of the rule. |
| regex | Validation rule as a regular expression. |
Definition at line 106 of file validator.c.
References openvas_validator_rule_new(), and validator.
Referenced by init_validator().


| int openvas_validator_alias | ( | validator_t | validator, |
| const char * | alias, | ||
| const char * | name | ||
| ) |
Make an alias for a rule name.
| validator | Validator to add alias to. |
| alias | Name of alias for rule. |
| name | Name of the rule. |
Definition at line 125 of file validator.c.
References validator_rule::alias_for, openvas_validator_rule_new(), validator_rule::regex, and validator.
Referenced by init_validator().


| gchar* openvas_validator_alias_for | ( | validator_t | validator, |
| const char * | alias | ||
| ) |
Get the name of the rule for which a rule is an alias.
| validator | Validator. |
| alias | Name of alias. |
alias is an alias, else NULL. Freed by openvas_validator_free. Definition at line 157 of file validator.c.
References validator_rule::alias_for, and validator.
| void openvas_validator_free | ( | validator_t | validator | ) |
Free a validator.
| validator | Validator. |
Definition at line 247 of file validator.c.
References validator.
| validator_t openvas_validator_new | ( | ) |
Create a new validator.
The validator must be freed with openvas_validator_free.
Definition at line 90 of file validator.c.
References openvas_validator_rule_free().
Referenced by init_validator().

