Asterisk - The Open Source Telephony Project  18.5.0
config_parser.h
Go to the documentation of this file.
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 2010, Digium, Inc.
5  *
6  * See http://www.asterisk.org for more information about
7  * the Asterisk project. Please do not directly contact
8  * any of the maintainers of this project for assistance;
9  * the project provides a web site, mailing lists and IRC
10  * channels for your use.
11  *
12  * This program is free software, distributed under the terms of
13  * the GNU General Public License Version 2. See the LICENSE file
14  * at the top of the source tree.
15  */
16 
17 /*!
18  * \file
19  * \brief sip.conf parser header file
20  */
21 
22 #include "sip.h"
23 
24 #ifndef _SIP_CONF_PARSE_H
25 #define _SIP_CONF_PARSE_H
26 
27 /*!
28  * \brief Parse register=> line in sip.conf
29  *
30  * \retval 0 on success
31  * \retval -1 on failure
32  */
33 int sip_parse_register_line(struct sip_registry *reg, int default_expiry, const char *value, int lineno);
34 
35 /*!
36  * \brief parses a config line for a host with a transport
37  *
38  * An example input would be:
39  * <code>tls://www.google.com:8056</code>
40  *
41  * \retval 0 on success
42  * \retval -1 on failure
43  */
44 int sip_parse_host(char *line, int lineno, char **hostname, int *portnum, enum ast_transport *transport);
45 
46 /*! \brief Parse the comma-separated nat= option values
47  * \param value The comma-separated value
48  * \param mask An array of ast_flags that will be set by this function
49  * and used as a mask for copying the flags later
50  * \param flags An array of ast_flags that will be set by this function
51  *
52  * \note The nat-related values in both mask and flags are assumed to empty. This function
53  * will treat the first "yes" or "no" value in a list of values as overiding all other values
54  * and will stop parsing. Auto values will override their non-auto counterparts.
55  */
56 void sip_parse_nat_option(const char *value, struct ast_flags *mask, struct ast_flags *flags);
57 
58 /*!
59  * \brief register config parsing tests
60  */
62 
63 /*!
64  * \brief unregister config parsing tests
65  */
67 
68 #endif
chan_sip header file
void sip_config_parser_register_tests(void)
register config parsing tests
void sip_parse_nat_option(const char *value, struct ast_flags *mask, struct ast_flags *flags)
Parse the comma-separated nat= option values.
int sip_parse_host(char *line, int lineno, char **hostname, int *portnum, enum ast_transport *transport)
parses a config line for a host with a transport
ast_transport
Definition: netsock2.h:59
Registrations with other SIP proxies.
Definition: sip.h:1396
int value
Definition: syslog.c:37
int sip_parse_register_line(struct sip_registry *reg, int default_expiry, const char *value, int lineno)
Parse register=> line in sip.conf.
Definition: config_parser.c:37
static int default_expiry
Definition: chan_sip.c:669
Structure used to handle boolean flags.
Definition: utils.h:199
void sip_config_parser_unregister_tests(void)
unregister config parsing tests
static struct ast_str * hostname
Definition: cdr_mysql.c:77