Asterisk - The Open Source Telephony Project GIT-master-55f4e6d
dns_srv.h
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2015, Digium, Inc.
5 *
6 * Joshua Colp <jcolp@digium.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*! \file
20 * \brief DNS SRV Record Parsing API
21 * \author Joshua Colp <jcolp@digium.com>
22 */
23
24#ifndef _ASTERISK_DNS_SRV_H
25#define _ASTERISK_DNS_SRV_H
26
27#if defined(__cplusplus) || defined(c_plusplus)
28extern "C" {
29#endif
30
31/*!
32 * \brief Get the hostname from an SRV record
33 *
34 * \param record The DNS record
35 *
36 * \return the hostname
37 */
38const char *ast_dns_srv_get_host(const struct ast_dns_record *record);
39
40/*!
41 * \brief Get the priority from an SRV record
42 *
43 * \param record The DNS record
44 *
45 * \return the priority
46 */
47unsigned short ast_dns_srv_get_priority(const struct ast_dns_record *record);
48
49/*!
50 * \brief Get the weight from an SRV record
51 *
52 * \param record The DNS record
53 *
54 * \return the weight
55 */
56unsigned short ast_dns_srv_get_weight(const struct ast_dns_record *record);
57
58/*!
59 * \brief Get the port from an SRV record
60 *
61 * \param record The DNS record
62 *
63 * \return the port
64 */
65unsigned short ast_dns_srv_get_port(const struct ast_dns_record *record);
66
67#if defined(__cplusplus) || defined(c_plusplus)
68}
69#endif
70
71#endif /* _ASTERISK_DNS_SRV_H */
const char * ast_dns_srv_get_host(const struct ast_dns_record *record)
Get the hostname from an SRV record.
Definition: dns_srv.c:188
unsigned short ast_dns_srv_get_priority(const struct ast_dns_record *record)
Get the priority from an SRV record.
Definition: dns_srv.c:196
unsigned short ast_dns_srv_get_weight(const struct ast_dns_record *record)
Get the weight from an SRV record.
Definition: dns_srv.c:204
unsigned short ast_dns_srv_get_port(const struct ast_dns_record *record)
Get the port from an SRV record.
Definition: dns_srv.c:212
For AST_LIST.
Definition: dns_internal.h:39