diff options
author | Olle Johansson <oej@edvina.net> | 2007-01-01 19:20:46 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2007-01-01 19:20:46 +0000 |
commit | f83b845f08c23ec4755d0bf857498b5bd5f67dff (patch) | |
tree | cdfc30ab8c71535d91b2f6486a4ad42838bdf612 /include/asterisk/acl.h | |
parent | 7eb0f10f34503d38a232eb8852e21adabaf0549c (diff) |
- Implement error handling in ast_append_ha
- Use this in chan_sip
- Document ha functions in acl.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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); |