[svn-commits] file: branch group/dns r432446 - /team/group/dns/include/asterisk/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Mar 4 09:48:15 CST 2015


Author: file
Date: Wed Mar  4 09:48:11 2015
New Revision: 432446

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432446
Log:
Add header files from wiki page.

Added:
    team/group/dns/include/asterisk/dns_core.h   (with props)
    team/group/dns/include/asterisk/dns_naptr.h   (with props)
    team/group/dns/include/asterisk/dns_query_set.h   (with props)
    team/group/dns/include/asterisk/dns_resolver.h   (with props)
    team/group/dns/include/asterisk/dns_srv.h   (with props)
    team/group/dns/include/asterisk/dns_tlsa.h   (with props)

Added: team/group/dns/include/asterisk/dns_core.h
URL: http://svnview.digium.com/svn/asterisk/team/group/dns/include/asterisk/dns_core.h?view=auto&rev=432446
==============================================================================
--- team/group/dns/include/asterisk/dns_core.h (added)
+++ team/group/dns/include/asterisk/dns_core.h Wed Mar  4 09:48:11 2015
@@ -1,0 +1,263 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2015, Digium, Inc.
+ *
+ * Joshua Colp <jcolp at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ * \brief Core DNS API
+ * \author Joshua Colp <jcolp at digium.com>
+ */
+
+#ifndef _ASTERISK_DNS_CORE_H
+#define _ASTERISK_DNS_CORE_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/*! \brief Opaque structure for a DNS query */
+struct ast_dns_query;
+
+/*!
+ * \brief Get the name queried in a DNS query
+ *
+ * \param query The DNS query
+ *
+ * \return the name queried
+ */
+const char *ast_dns_query_get_name(const struct ast_dns_query *query);
+
+/*!
+ * \brief Get the record resource type of a DNS query
+ *
+ * \param query The DNS query
+ *
+ * \return the record resource type
+ */
+int ast_dns_query_get_rr_type(const struct ast_dns_query *query);
+
+/*!
+ * \brief Get the record resource class of a DNS query
+ *
+ * \param query The DNS query
+ *
+ * \return the record resource class
+ */
+int ast_dns_query_get_rr_class(const struct ast_dns_query *query);
+
+/*!
+ * \brief Get the error rcode of a DNS query
+ *
+ * \param query The DNS query
+ *
+ * \return the DNS rcode
+ */
+int ast_dns_query_get_rcode(const struct ast_dns_query *query);
+
+/*!
+ * \brief Get the user specific data of a DNS query
+ *
+ * \param query The DNS query
+ *
+ * \return the user specific data
+ */
+void *ast_dns_query_get_data(const struct ast_dns_query *query);
+
+/*! \brief Opaque structure for a DNS query result */
+struct ast_dns_result;
+
+/*!
+ * \brief Get the result information for a DNS query
+ *
+ * \param query The DNS query
+ *
+ * \return the DNS result information
+ */
+struct ast_dns_result *ast_dns_query_get_result(const struct ast_dns_query *query);
+
+/*!
+ * \brief Get whether the domain exists or not
+ *
+ * \param query The DNS result
+ *
+ * \return whether the domain exists or not
+ */
+unsigned int ast_dns_result_get_nxdomain(const struct ast_dns_result *result);
+
+/*!
+ * \brief Get whether the result is secure or not
+ *
+ * \param result The DNS result
+ *
+ * \return whether the result is secure or not
+ */
+unsigned int ast_dns_result_get_secure(const struct ast_dns_result *result);
+
+/*!
+ * \brief Get whether the result is bogus or not
+ *
+ * \param result The DNS result
+ *
+ * \return whether the result is bogus or not
+ */
+unsigned int ast_dns_result_get_bogus(const struct ast_dns_result *result);
+
+/*!
+ * \brief Get the canonical name of the result
+ *
+ * \param result The DNS result
+ *
+ * \return the canonical name
+ */
+const char *ast_dns_result_get_canonical(const struct ast_dns_result *result);
+
+/*!
+ * \brief Get the first record of a DNS Result
+ *
+ * \param result The DNS result
+ *
+ * \return first DNS record
+ */
+const struct ast_dns_record *ast_dns_result_get_records(const struct ast_dns_result *result);
+
+/*!
+ * \brief Free the DNS result information
+ *
+ * \param result The DNS result
+ */
+void ast_dns_result_free(struct ast_dns_result *result);
+
+/*! \brief Opaque structure for a DNS record */
+struct ast_dns_record;
+
+/*!
+ * \brief Callback invoked when a query completes
+ *
+ * \param query The DNS query that was invoked
+ */
+typedef void (*ast_dns_resolve_callback)(const struct ast_dns_query *query);
+
+/*!
+ * \brief Get the resource record type of a DNS record
+ *
+ * \param record The DNS record
+ *
+ * \return the resource record type
+ */
+int ast_dns_record_get_rr_type(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the resource record class of a DNS record
+ *
+ * \param record The DNS record
+ *
+ * \return the resource record class
+ */
+int ast_dns_record_get_rr_class(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the TTL of a DNS record
+ *
+ * \param record The DNS record
+ *
+ * \return the TTL
+ */
+int ast_dns_record_get_ttl(const struct ast_dns_record *record);
+
+/*!
+ * \brief Retrieve the raw DNS record
+ *
+ * \param record The DNS record
+ *
+ * \return the raw DNS record
+ */
+const char *ast_dns_record_get_data(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the next DNS record
+ *
+ * \param record The current DNS record
+ *
+ * \return the next DNS record
+ */
+struct ast_dns_record *ast_dns_record_get_next(const struct ast_dns_record *record);
+
+/*!
+ * \brief Asynchronously resolve a DNS query
+ *
+ * \param name The name of what to resolve
+ * \param rr_type Resource record type
+ * \param rr_class Resource record class
+ * \param callback The callback to invoke upon completion
+ * \param data User data to make available on the query
+ *
+ * \retval non-NULL success - query has been sent for resolution
+ * \retval NULL failure
+ *
+ * \note The result passed to the callback does not need to be freed
+ */
+struct ast_dns_query *ast_dns_resolve_async(const char *name, int rr_type, int rr_class, ast_dns_resolve_callback callback, void *data);
+
+/*!
+ * \brief Asynchronously resolve a DNS query, and continue resolving it according to the lowest TTL available
+ *
+ * \param name The name of what to resolve
+ * \param rr_type Resource record type
+ * \param rr_class Resource record class
+ * \param callback The callback to invoke upon completion
+ * \param data User data to make available on the query
+ *
+ * \retval non-NULL success - query has been sent for resolution
+ * \retval NULL failure
+ *
+ * \note The user data passed in to this function must be ao2 allocated
+ *
+ * \note This query will continue to happen according to the lowest TTL unless cancelled using ast_dns_resolve_cancel
+ *
+ * \note It is NOT possible for the callback to be invoked concurrently for the query multiple times
+ */
+struct ast_dns_query *ast_dns_resolve_async_recurring(const char *name, int rr_type, int rr_class, ast_dns_resolve_callback callback, void *data);
+
+/*!
+ * \brief Cancel an asynchronous DNS resolution
+ *
+ * \param query The DNS query returned from ast_dns_resolve_async
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ *
+ * \note If successfully cancelled the callback will not be invoked
+ */
+int ast_dns_resolve_cancel(struct ast_dns_query *query);
+
+/*!
+ * \brief Synchronously resolve a DNS query
+ *
+ * \param name The name of what to resolve
+ * \param rr_type Resource record type
+ * \param rr_class Resource record class
+ * \param result A pointer to hold the DNS result
+ *
+ * \retval 0 success - query was completed and result is available
+ * \retval -1 failure
+ */
+int ast_dns_resolve(const char *name, int rr_type, int rr_class, struct ast_dns_result **result);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* _ASTERISK_DNS_CORE_H */

Propchange: team/group/dns/include/asterisk/dns_core.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/dns/include/asterisk/dns_core.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/dns/include/asterisk/dns_core.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/group/dns/include/asterisk/dns_naptr.h
URL: http://svnview.digium.com/svn/asterisk/team/group/dns/include/asterisk/dns_naptr.h?view=auto&rev=432446
==============================================================================
--- team/group/dns/include/asterisk/dns_naptr.h (added)
+++ team/group/dns/include/asterisk/dns_naptr.h Wed Mar  4 09:48:11 2015
@@ -1,0 +1,89 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2015, Digium, Inc.
+ *
+ * Joshua Colp <jcolp at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ * \brief DNS NAPTR Record Parsing API
+ * \author Joshua Colp <jcolp at digium.com>
+ */
+
+#ifndef _ASTERISK_DNS_NAPTR_H
+#define _ASTERISK_DNS_NAPTR_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/*!
+ * \brief Get the flags from a NAPTR record
+ *
+ * \param record The DNS record
+ *
+ * \return the flags
+ */
+const char *ast_dns_naptr_get_flags(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the service from a NAPTR record
+ *
+ * \param record The DNS record
+ *
+ * \return the service
+ */
+const char *ast_dns_naptr_get_service(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the regular expression from a NAPTR record
+ *
+ * \param record The DNS record
+ *
+ * \return the regular expression
+ */
+const char *ast_dns_naptr_get_regexp(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the replacement value from a NAPTR record
+ *
+ * \param record The DNS record
+ *
+ * \return the replacement value
+ */
+const char *ast_dns_naptr_get_replacement(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the order from a NAPTR record
+ *
+ * \param record The DNS record
+ *
+ * \return the order
+ */
+unsigned short ast_dns_naptr_get_order(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the preference from a NAPTR record
+ *
+ * \param record The DNS record
+ *
+ * \return the preference
+ */
+unsigned short ast_dns_naptr_get_preference(const struct ast_dns_record *record);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* _ASTERISK_DNS_NAPTR_H */

Propchange: team/group/dns/include/asterisk/dns_naptr.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/dns/include/asterisk/dns_naptr.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/dns/include/asterisk/dns_naptr.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/group/dns/include/asterisk/dns_query_set.h
URL: http://svnview.digium.com/svn/asterisk/team/group/dns/include/asterisk/dns_query_set.h?view=auto&rev=432446
==============================================================================
--- team/group/dns/include/asterisk/dns_query_set.h (added)
+++ team/group/dns/include/asterisk/dns_query_set.h Wed Mar  4 09:48:11 2015
@@ -1,0 +1,136 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2015, Digium, Inc.
+ *
+ * Joshua Colp <jcolp at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ * \brief DNS Query Set API
+ * \author Joshua Colp <jcolp at digium.com>
+ */
+
+#ifndef _ASTERISK_DNS_QUERY_SET_H
+#define _ASTERISK_DNS_QUERY_SET_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/*! \brief Opaque structure for a set of DNS queries */
+struct ast_dns_query_set;
+
+/*!
+ * \brief Callback invoked when a query set completes
+ *
+ * \param query_set The DNS query set that was invoked
+ */
+typedef void (*ast_dns_query_set_callback)(const struct ast_dns_query_set *query_set);
+
+/*!
+ * \brief Create a query set to hold queries
+ *
+ * \retval non-NULL success
+ * \retval NULL failure
+ */
+struct ast_dns_query_set *ast_dns_query_set_create(void);
+
+/*!
+ * \brief Add a query to a query set
+ *
+ * \param query_set A DNS query set
+ * \param name The name of what to resolve
+ * \param rr_type Resource record type
+ * \param rr_class Resource record class
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+int ast_dns_query_set_add(struct ast_dns_query_set *query_set, const char *name, int rr_type, int rr_class);
+
+/*!
+ * \brief Retrieve the number of queries in a query set
+ *
+ * \param query_set A DNS query set
+ *
+ * \return the number of queries
+ */
+size_t ast_dns_query_set_num_queries(const struct ast_dns_query_set *query_set);
+
+/*!
+ * \brief Retrieve a query from a query set
+ *
+ * \param query_set A DNS query set
+ * \param index The index of the query to retrieve
+ *
+ * \retval non-NULL success
+ * \retval NULL failure
+ */
+struct ast_dns_query *ast_dns_query_set_get(const struct ast_dns_query_set *query_set, unsigned int index);
+
+/*!
+ * \brief Retrieve user specific data from a query set
+ *
+ * \param query_set A DNS query set
+ *
+ * \return user specific data
+ */
+void *ast_dns_query_set_get_data(const struct ast_dns_query_set *query_set);
+
+/*!
+ * \brief Asynchronously resolve queries in a query set
+ *
+ * \param query_set The query set
+ * \param callback The callback to invoke upon completion
+ * \param data User data to make available on the query set
+ *
+ * \note The callback will be invoked when all queries have completed
+ *
+ * \note The user data passed in to this function must be ao2 allocated
+ */
+void ast_dns_query_set_resolve_async(struct ast_dns_query_set *query_set, ast_dns_query_set_callback callback, void *data);
+
+/*!
+ * \brief Synchronously resolve queries in a query set
+ *
+ * \param query_set The query set
+ *
+ * \note This function will return when all queries have been completed
+ */
+void ast_query_set_resolve(struct ast_dns_query_set *query_set);
+
+/*!
+ * \brief Cancel an asynchronous DNS query set resolution
+ *
+ * \param query_set The DNS query set
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ *
+ * \note If successfully cancelled the callback will not be invoked
+ */
+int ast_dns_query_set_resolve_cancel(struct ast_dns_query_set *query_set);
+
+/*!
+ * \brief Free a query set
+ *
+ * \param query_set A DNS query set
+ */
+void ast_dns_query_set_free(struct ast_dns_query_set *query_set);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* _ASTERISK_DNS_QUERY_SET_H */

Propchange: team/group/dns/include/asterisk/dns_query_set.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/dns/include/asterisk/dns_query_set.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/dns/include/asterisk/dns_query_set.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/group/dns/include/asterisk/dns_resolver.h
URL: http://svnview.digium.com/svn/asterisk/team/group/dns/include/asterisk/dns_resolver.h?view=auto&rev=432446
==============================================================================
--- team/group/dns/include/asterisk/dns_resolver.h (added)
+++ team/group/dns/include/asterisk/dns_resolver.h Wed Mar  4 09:48:11 2015
@@ -1,0 +1,122 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2015, Digium, Inc.
+ *
+ * Joshua Colp <jcolp at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ * \brief DNS Resolver API
+ * \author Joshua Colp <jcolp at digium.com>
+ */
+
+#ifndef _ASTERISK_DNS_RESOLVER_H
+#define _ASTERISK_DNS_RESOLVER_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/*! \brief DNS resolver implementation */
+struct ast_dns_resolver {
+    /*! \brief The name of the resolver implementation */
+    const char *name;
+    /*! \brief Priority for this resolver if multiple exist */
+    unsigned int priority;
+    /*! \brief Perform resolution of a DNS query */
+    int (*resolve)(struct ast_dns_query *query);
+    /*! \brief Cancel resolution of a DNS query */
+    int (*cancel)(struct ast_dns_query *query);
+};
+
+/*!
+ * \brief Set resolver specific data on a query
+ *
+ * \param query The DNS query
+ * \param data The resolver specific data
+ *
+ * \note Unlike user specific data this does not have to be ao2 allocated
+ */
+void ast_dns_resolver_set_data(struct ast_dns_query *query, void *data);
+
+/*!
+ * \brief Retrieve resolver specific data
+ *
+ * \param query The DNS query
+ *
+ * \return the resolver specific data
+ */
+void *ast_dns_resolver_get_data(const struct ast_dns_query *query);
+
+/*!
+ * \brief Set result information for a DNS query
+ *
+ * \param query The DNS query
+ * \param nxdomain Whether the domain was not found
+ * \param result Whether the result is secured or not
+ * \param bogus Whether the result is bogus or not
+ * \param canonical The canonical name
+ */
+void ast_dns_resolver_set_result(struct ast_dns_query *query, unsigned int nxdomain, unsigned int secure, unsigned int bogus,
+	const char *canonical);
+
+/*!
+ * \brief Add a DNS record to the result of a DNS query
+ *
+ * \param query The DNS query
+ * \param rr_type Resource record type
+ * \param rr_class Resource record class
+ * \param ttl TTL of the record
+ * \param data The raw DNS record
+ * \param size The size of the raw DNS record
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+int ast_dns_resolver_add_record(struct ast_dns_query *query, int rr_type, int rr_class, int ttl, char *data, size_t size);
+
+/*!
+ * \brief Mark a DNS query as having been completed
+ *
+ * \param query The DNS query
+ *
+ * \note Once this is invoked the resolver data on the query will be removed
+ */
+void ast_dns_resolver_completed(const struct ast_dns_query *query);
+
+/*!
+ * \brief Register a DNS resolver
+ *
+ * \param resolver A DNS resolver implementation
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+int ast_dns_resolver_register(const struct ast_core_dns_resolver *resolver);
+
+/*!
+ * \brief Unregister a DNS resolver
+ *
+ * \param resolver A DNS resolver implementation
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+int ast_dns_resolver_unregister(const struct ast_core_dns_resolver *resolver);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* _ASTERISK_DNS_RESOLVER_H */

Propchange: team/group/dns/include/asterisk/dns_resolver.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/dns/include/asterisk/dns_resolver.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/dns/include/asterisk/dns_resolver.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/group/dns/include/asterisk/dns_srv.h
URL: http://svnview.digium.com/svn/asterisk/team/group/dns/include/asterisk/dns_srv.h?view=auto&rev=432446
==============================================================================
--- team/group/dns/include/asterisk/dns_srv.h (added)
+++ team/group/dns/include/asterisk/dns_srv.h Wed Mar  4 09:48:11 2015
@@ -1,0 +1,71 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2015, Digium, Inc.
+ *
+ * Joshua Colp <jcolp at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ * \brief DNS SRV Record Parsing API
+ * \author Joshua Colp <jcolp at digium.com>
+ */
+
+#ifndef _ASTERISK_DNS_SRV_H
+#define _ASTERISK_DNS_SRV_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/*!
+ * \brief Get the hostname from an SRV record
+ *
+ * \param record The DNS record
+ *
+ * \return the hostname
+ */
+const char *ast_dns_srv_get_host(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the priority from an SRV record
+ *
+ * \param record The DNS record
+ *
+ * \return the priority
+ */
+unsigned short ast_dns_srv_get_priority(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the weight from an SRV record
+ *
+ * \param record The DNS record
+ *
+ * \return the weight
+ */
+unsigned short ast_dns_srv_get_weight(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the port from an SRV record
+ *
+ * \param record The DNS record
+ *
+ * \return the port
+ */
+unsigned short ast_dns_srv_get_port(const struct ast_dns_record *record);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* _ASTERISK_DNS_SRV_H */

Propchange: team/group/dns/include/asterisk/dns_srv.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/dns/include/asterisk/dns_srv.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/dns/include/asterisk/dns_srv.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/group/dns/include/asterisk/dns_tlsa.h
URL: http://svnview.digium.com/svn/asterisk/team/group/dns/include/asterisk/dns_tlsa.h?view=auto&rev=432446
==============================================================================
--- team/group/dns/include/asterisk/dns_tlsa.h (added)
+++ team/group/dns/include/asterisk/dns_tlsa.h Wed Mar  4 09:48:11 2015
@@ -1,0 +1,72 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2015, Digium, Inc.
+ *
+ * Joshua Colp <jcolp at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ * \brief DNS TLSA Record Parsing API
+ * \author Joshua Colp <jcolp at digium.com>
+ */
+
+#ifndef _ASTERISK_DNS_TLSA_H
+#define _ASTERISK_DNS_TLSA_H
+
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
+/*!
+ * \brief Get the certificate usage field from a TLSA record
+ *
+ * \param record The DNS record
+ *
+ * \return the certificate usage field
+ */
+
+unsigned int ast_dns_tlsa_get_usage(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the selector field from a TLSA record
+ *
+ * \param record The DNS record
+ *
+ * \return the selector field
+ */
+unsigned int ast_dns_tlsa_get_selector(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the matching type field from a TLSA record
+ *
+ * \param record The DNS record
+ *
+ * \return the matching type field
+ */
+unsigned int ast_dns_tlsa_get_matching_type(const struct ast_dns_record *record);
+
+/*!
+ * \brief Get the certificate association data from a TLSA record
+ *
+ * \param record The DNS record
+ *
+ * \return the certificate association data
+ */
+const char *ast_dns_tlsa_get_association_data(const struct ast_dns_record *record);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
+#endif /* _ASTERISK_DNS_TLSA_H */

Propchange: team/group/dns/include/asterisk/dns_tlsa.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/group/dns/include/asterisk/dns_tlsa.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/group/dns/include/asterisk/dns_tlsa.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the svn-commits mailing list