summaryrefslogtreecommitdiff
path: root/include/asterisk/acl.h
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2007-07-20 14:38:36 +0000
committerLuigi Rizzo <rizzo@icir.org>2007-07-20 14:38:36 +0000
commit925ebbb2b31865c80c4d92985b7d6e80dd6dbc4a (patch)
tree34782c0c57ac6462b0324972f96d798027eb24c8 /include/asterisk/acl.h
parent4af3f12b29c9023963c21ec1dd18dbadeec67439 (diff)
expose struct ast_ha so external code can do things such as printing it
(e.g. chan_sip.c in a subsequent commit). Obviously exposing the internals of a data structure is far from ideal (especially in a case like this where the implementation is very inefficient and will need to be changed at some point). On the other hand, it was also unclear what additional APIs should we provide instead, and because exposing the stucture has no impact on source and binary compatibility, this seemed to me the best option at this time. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/acl.h')
-rw-r--r--include/asterisk/acl.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/asterisk/acl.h b/include/asterisk/acl.h
index 9dba9c17e..7b107641c 100644
--- a/include/asterisk/acl.h
+++ b/include/asterisk/acl.h
@@ -36,7 +36,21 @@ extern "C" {
/* Host based access control */
-struct ast_ha;
+/*! \brief internal representation of acl entries
+ * In principle user applications would have no need for this,
+ * but there is sometimes a need to extract individual items,
+ * e.g. to print them, and rather than defining iterators to
+ * navigate the list, and an externally visible 'struct ast_ha_entry',
+ * at least in the short term it is more convenient to make the whole
+ * thing public and let users play with them.
+ */
+struct ast_ha {
+ /* Host access rule */
+ struct in_addr netaddr;
+ struct in_addr netmask;
+ int sense;
+ struct ast_ha *next;
+};
/*! \brief Free host access list */
void ast_free_ha(struct ast_ha *ha);