diff options
-rw-r--r-- | include/asterisk/acl.h | 16 | ||||
-rw-r--r-- | main/acl.c | 8 |
2 files changed, 15 insertions, 9 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); diff --git a/main/acl.c b/main/acl.c index e15f4a336..efbc9d183 100644 --- a/main/acl.c +++ b/main/acl.c @@ -70,14 +70,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/lock.h" #include "asterisk/srv.h" -struct ast_ha { - /* Host access rule */ - struct in_addr netaddr; - struct in_addr netmask; - int sense; - struct ast_ha *next; -}; - struct my_ifreq { char ifrn_name[IFNAMSIZ]; /* Interface name, e.g. "eth0", "ppp0", etc. */ struct sockaddr_in ifru_addr; |