![]() |
ldns
1.8.4
|
Go to the source code of this file.
Enumerations | |
enum | file_type2parse { zone_file_type , resolv_conf_file_type } |
Functions | |
ssize_t | ldns_fget_token (FILE *f, char *token, const char *delim, size_t limit) |
returns a token/char from the stream F. | |
ldns_status | ldns_fget_token_l_st (FILE *f, char **token, size_t *limit, bool fixed, const char *delim, int *line_nr) |
ssize_t | ldns_fget_token_l_resolv_conf (FILE *f, char *token, const char *delim, size_t limit, int *line_nr) |
returns a token/char from the stream F. | |
ssize_t | ldns_fget_token_l (FILE *f, char *token, const char *delim, size_t limit, int *line_nr) |
returns a token/char from the stream F. | |
ssize_t | ldns_fget_keyword_data (FILE *f, const char *keyword, const char *k_del, char *data, const char *d_del, size_t data_limit) |
ssize_t | ldns_fget_keyword_data_l (FILE *f, const char *keyword, const char *k_del, char *data, const char *d_del, size_t data_limit, int *line_nr) |
ssize_t | ldns_bget_token (ldns_buffer *b, char *token, const char *delim, size_t limit) |
returns a token/char from the buffer b. | |
void | ldns_bskipcs (ldns_buffer *buffer, const char *s) |
skips all of the characters in the given string in the buffer, moving the position to the first character that is not in *s. | |
void | ldns_fskipcs (FILE *fp, const char *s) |
skips all of the characters in the given string in the fp, moving the position to the first character that is not in *s. | |
void | ldns_fskipcs_l (FILE *fp, const char *s, int *line_nr) |
skips all of the characters in the given string in the fp, moving the position to the first character that is not in *s. | |
ssize_t | ldns_bget_keyword_data (ldns_buffer *b, const char *keyword, const char *k_del, char *data, const char *d_del, size_t data_limit) |
Variables | |
ldns_lookup_table | ldns_directive_types [] |
enum file_type2parse |
ssize_t ldns_fget_token | ( | FILE * | f, |
char * | token, | ||
const char * | delim, | ||
size_t | limit | ||
) |
returns a token/char from the stream F.
This function deals with ( and ) in the stream, and ignores them when encountered
[in] | *f | the file to read from |
[out] | *token | the read token is put here |
[in] | *delim | chars at which the parsing should stop |
[in] | *limit | how much to read. If 0 the builtin maximum is used |
Definition at line 25 of file parse.c.
References ldns_fget_token_l().
ldns_status ldns_fget_token_l_st | ( | FILE * | f, |
char ** | token, | ||
size_t * | limit, | ||
bool | fixed, | ||
const char * | delim, | ||
int * | line_nr | ||
) |
Definition at line 226 of file parse.c.
References zone_file_type.
ssize_t ldns_fget_token_l_resolv_conf | ( | FILE * | f, |
char * | token, | ||
const char * | delim, | ||
size_t | limit, | ||
int * | line_nr | ||
) |
returns a token/char from the stream F.
This function deals with ( and ) in the stream, and ignores when it finds them. This function also handles and ignores comments such as they can be used in resolv.conf files. Starting with either ; or #.
[in] | *f | the file to read from |
[out] | *token | the token is put here |
[in] | *delim | chars at which the parsing should stop |
[in] | *limit | how much to read. If 0 use builtin maximum |
[in] | line_nr | pointer to an integer containing the current line number (for debugging purposes) |
Definition at line 234 of file parse.c.
References LDNS_MAX_LINELEN, and resolv_conf_file_type.
ssize_t ldns_fget_token_l | ( | FILE * | f, |
char * | token, | ||
const char * | delim, | ||
size_t | limit, | ||
int * | line_nr | ||
) |
returns a token/char from the stream F.
This function deals with ( and ) in the stream, and ignores when it finds them. This function also handles and ignores zonefile format comments starting with ;
[in] | *f | the file to read from |
[out] | *token | the token is put here |
[in] | *delim | chars at which the parsing should stop |
[in] | *limit | how much to read. If 0 use builtin maximum |
[in] | line_nr | pointer to an integer containing the current line number (for debugging purposes) |
Definition at line 247 of file parse.c.
References ldns_fget_token_l_st(), and LDNS_MAX_LINELEN.
ssize_t ldns_fget_keyword_data | ( | FILE * | f, |
const char * | keyword, | ||
const char * | k_del, | ||
char * | data, | ||
const char * | d_del, | ||
size_t | data_limit | ||
) |
Definition at line 258 of file parse.c.
References ldns_fget_keyword_data_l().
ssize_t ldns_fget_keyword_data_l | ( | FILE * | f, |
const char * | keyword, | ||
const char * | k_del, | ||
char * | data, | ||
const char * | d_del, | ||
size_t | data_limit, | ||
int * | line_nr | ||
) |
Definition at line 266 of file parse.c.
References ldns_fget_token(), ldns_fget_token_l(), LDNS_FREE, LDNS_MAX_KEYWORDLEN, and LDNS_XMALLOC.
ssize_t ldns_bget_token | ( | ldns_buffer * | b, |
char * | token, | ||
const char * | delim, | ||
size_t | limit | ||
) |
returns a token/char from the buffer b.
This function deals with ( and ) in the buffer, and ignores when it finds them.
[in] | *b | the buffer to read from |
[out] | *token | the token is put here |
[in] | *delim | chars at which the parsing should stop |
[in] | *limit | how much to read. If 0 the builtin maximum is used |
Definition at line 301 of file parse.c.
References ldns_bgetc(), ldns_bskipcs(), and LDNS_PARSE_NORMAL.
void ldns_bskipcs | ( | ldns_buffer * | buffer, |
const char * | s | ||
) |
skips all of the characters in the given string in the buffer, moving the position to the first character that is not in *s.
[in] | *buffer | buffer to use |
[in] | *s | characters to skip |
Definition at line 431 of file parse.c.
References ldns_struct_buffer::_limit, and ldns_struct_buffer::_position.
void ldns_fskipcs | ( | FILE * | fp, |
const char * | s | ||
) |
skips all of the characters in the given string in the fp, moving the position to the first character that is not in *s.
[in] | *fp | file to use |
[in] | *s | characters to skip |
Definition at line 454 of file parse.c.
References ldns_fskipcs_l().
void ldns_fskipcs_l | ( | FILE * | fp, |
const char * | s, | ||
int * | line_nr | ||
) |
skips all of the characters in the given string in the fp, moving the position to the first character that is not in *s.
[in] | *fp | file to use |
[in] | *s | characters to skip |
[in] | line_nr | pointer to an integer containing the current line number (for debugging purposes) |
ssize_t ldns_bget_keyword_data | ( | ldns_buffer * | b, |
const char * | keyword, | ||
const char * | k_del, | ||
char * | data, | ||
const char * | d_del, | ||
size_t | data_limit | ||
) |
Definition at line 485 of file parse.c.
References ldns_bget_token(), LDNS_FREE, LDNS_MAX_KEYWORDLEN, and LDNS_XMALLOC.
ldns_lookup_table ldns_directive_types[] |