[Asterisk-cvs] asterisk/include/asterisk acl.h, 1.7, 1.8 astobj.h, 1.9, 1.10

markster at lists.digium.com markster at lists.digium.com
Tue Jan 11 11:04:44 CST 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv6819/include/asterisk

Modified Files:
	acl.h astobj.h 
Log Message:
Allow multiple bindaddrs so asterisk uses the same interface for tx as rx


Index: acl.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/acl.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- acl.h	3 Dec 2004 23:34:45 -0000	1.7
+++ acl.h	11 Jan 2005 17:08:52 -0000	1.8
@@ -14,19 +14,27 @@
 #ifndef _ASTERISK_ACL_H
 #define _ASTERISK_ACL_H
 
-#define AST_SENSE_DENY                  0
-#define AST_SENSE_ALLOW                 1
-
 
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif
 
 #include <netinet/in.h>
+#include <asterisk/io.h>
+#include <asterisk/astobj.h>
+
+#define AST_SENSE_DENY                  0
+#define AST_SENSE_ALLOW                 1
 
 /* Host based access control */
 
 struct ast_ha;
+struct ast_netsock;
+
+struct ast_netsock_list {
+	ASTOBJ_CONTAINER_COMPONENTS(struct ast_netsock);
+	struct io_context *ioc;
+};
 
 extern void ast_free_ha(struct ast_ha *ha);
 extern struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path);
@@ -36,6 +44,12 @@
 extern int ast_ouraddrfor(struct in_addr *them, struct in_addr *us);
 extern int ast_lookup_iface(char *iface, struct in_addr *address);
 extern struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original);
+extern int ast_netsock_init(struct ast_netsock_list *list);
+extern struct ast_netsock *ast_netsock_bind(struct ast_netsock_list *list, struct io_context *ioc, const char *bindinfo, int defaultport, int tos, ast_io_cb callback, void *data);
+extern struct ast_netsock *ast_netsock_bindaddr(struct ast_netsock_list *list, struct io_context *ioc, struct sockaddr_in *bindaddr, int tos, ast_io_cb callback, void *data);
+extern int ast_netsock_free(struct ast_netsock_list *list, struct ast_netsock *netsock);
+extern int ast_netsock_release(struct ast_netsock_list *list);
+extern int ast_netsock_sockfd(struct ast_netsock *ns);
 
 //! Compares the source address and port of two sockaddr_in
 static inline int inaddrcmp(struct sockaddr_in *sin1, struct sockaddr_in *sin2)

Index: astobj.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/astobj.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- astobj.h	10 Jan 2005 05:46:25 -0000	1.9
+++ astobj.h	11 Jan 2005 17:08:52 -0000	1.10
@@ -15,6 +15,7 @@
 #define _ASTERISK_ASTOBJ_H
 
 #include <string.h>
+#include <asterisk/lock.h>
 
 /*!
   \file astobj.h




More information about the svn-commits mailing list