23 #ifndef _ASTERISK_ACL_H
24 #define _ASTERISK_ACL_H
27 #if defined(__cplusplus) || defined(c_plusplus)
35 #define AST_SENSE_DENY 0
36 #define AST_SENSE_ALLOW 1
261 #if defined(__cplusplus) || defined(c_plusplus)
struct ast_ha * ast_duplicate_ha_list(struct ast_ha *original)
Duplicate the contents of a list of host access rules.
int ast_find_ourip(struct ast_sockaddr *ourip, const struct ast_sockaddr *bindaddr, int family)
Find our IP address.
int ast_apply_ha(const struct ast_ha *ha, const struct ast_sockaddr *addr)
Apply a set of rules to a given IP address.
enum ast_cc_service_type service
int ast_str2tos(const char *value, unsigned int *tos)
Convert a string to the appropriate TOS value.
I/O Management (derived from Cheops-NG)
Socket address structure.
internal representation of acl entries In principle user applications would have no need for this...
int ast_ouraddrfor(const struct ast_sockaddr *them, struct ast_sockaddr *us)
Get our local IP address when contacting a remote host.
struct ast_sockaddr netmask
Wrapper for network related headers, masking differences between various operating systems...
struct ast_sockaddr bindaddr
int ast_get_ip(struct ast_sockaddr *addr, const char *hostname)
Get the IP address given a hostname.
int ast_str2cos(const char *value, unsigned int *cos)
Convert a string to the appropriate COS value.
int ast_lookup_iface(char *iface, struct ast_sockaddr *address)
Find an IP address associated with a specific interface.
int ast_get_ip_or_srv(struct ast_sockaddr *addr, const char *hostname, const char *service)
Get the IP address given a hostname and optional service.
void ast_free_ha(struct ast_ha *ha)
Free a list of HAs.
struct ast_ha * ast_append_ha(const char *sense, const char *stuff, struct ast_ha *path, int *error)
Add a new rule to a list of HAs.
const char * ast_tos2str(unsigned int tos)
Convert a TOS value into its string representation.
void ast_copy_ha(const struct ast_ha *from, struct ast_ha *to)
Copy the contents of one HA to another.
static char hostname[MAXHOSTNAMELEN]