From 98cbdc7b3c2b1c3e0184d30f7b3c48e703c06e6e Mon Sep 17 00:00:00 2001 From: oej Date: Mon, 1 Jan 2007 19:20:46 +0000 Subject: - 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 --- include/asterisk/acl.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include/asterisk/acl.h') 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); -- cgit v1.2.3