diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-01 19:20:46 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-01 19:20:46 +0000 |
commit | 98cbdc7b3c2b1c3e0184d30f7b3c48e703c06e6e (patch) | |
tree | cdfc30ab8c71535d91b2f6486a4ad42838bdf612 /include/asterisk/acl.h | |
parent | c3751a767534313fd94de14368c5691380ed4f74 (diff) |
- Implement error handling in ast_append_ha
- Use this in chan_sip
- Document ha functions in acl.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49092 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/acl.h')
-rw-r--r-- | include/asterisk/acl.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/asterisk/acl.h b/include/asterisk/acl.h index b3a0e7aee..efc604990 100644 --- a/include/asterisk/acl.h +++ b/include/asterisk/acl.h @@ -38,13 +38,24 @@ extern "C" { struct ast_ha; +/*! \brief Free host access list */ void ast_free_ha(struct ast_ha *ha); -struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path); + +/*! \brief Append ACL entry to host access list. */ +struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path, int *error); + +/*! \brief Check IP address with host access list */ int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin); + +/*! \brief Copy host access list */ +struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original); + int ast_get_ip(struct sockaddr_in *sin, const char *value); + int ast_get_ip_or_srv(struct sockaddr_in *sin, const char *value, const char *service); + int ast_ouraddrfor(struct in_addr *them, struct in_addr *us); -struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original); + int ast_find_ourip(struct in_addr *ourip, struct sockaddr_in bindaddr); int ast_str2tos(const char *value, unsigned int *tos); const char *ast_tos2str(unsigned int tos); |