[svn-commits] blanchet: branch blanchet/v6 r60452 -
/team/blanchet/v6/include/asterisk/udptl.h
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri Apr 6 09:08:43 MST 2007
Author: blanchet
Date: Fri Apr 6 11:08:42 2007
New Revision: 60452
URL: http://svn.digium.com/view/asterisk?view=rev&rev=60452
Log:
- new definitions of ast_viudptl routines and definitions for IP version independent routines. vi = version independent.
- see README-IPV6.txt to see the reasoning on why duplicating code and using another namespace: it enables incremental conversion of channels to IPv6. But has drawbacks.
- note well: while the RTP code was tested over both Ipv4 and Ipv6. However, this converted T.38 code was not tested even over IPv4.
Modified:
team/blanchet/v6/include/asterisk/udptl.h
Modified: team/blanchet/v6/include/asterisk/udptl.h
URL: http://svn.digium.com/view/asterisk/team/blanchet/v6/include/asterisk/udptl.h?view=diff&rev=60452&r1=60451&r2=60452
==============================================================================
--- team/blanchet/v6/include/asterisk/udptl.h (original)
+++ team/blanchet/v6/include/asterisk/udptl.h Fri Apr 6 11:08:42 2007
@@ -113,6 +113,84 @@
void ast_udptl_reload(void);
+/* IP version independent versions */
+/* Marc Blanchet */
+
+#include "asterisk/netsock.h"
+
+struct ast_viudptl_protocol {
+ /* Get UDPTL struct, or NULL if unwilling to transfer */
+ struct ast_viudptl *(*get_udptl_info)(struct ast_channel *chan);
+ /* Set UDPTL peer */
+ int (* const set_udptl_peer)(struct ast_channel *chan, struct ast_viudptl *peer);
+ const char * const type;
+ struct ast_viudptl_protocol *next;
+};
+
+struct ast_viudptl;
+
+typedef int (*ast_viudptl_callback)(struct ast_viudptl *udptl, struct ast_frame *f, void *data);
+
+struct ast_viudptl *ast_viudptl_new(struct sched_context *sched, struct io_context *io, int callbackmode);
+
+struct ast_viudptl *ast_viudptl_new_with_bindaddr(struct sched_context *sched, struct io_context *io, int callbackmode, struct sockaddr *sa, socklen_t salen);
+
+void ast_viudptl_set_peer(struct ast_viudptl *udptl, struct sockaddr *them, socklen_t themlen);
+
+void ast_viudptl_get_peer(struct ast_viudptl *udptl, struct sockaddr *them, socklen_t themlen);
+
+void ast_viudptl_get_us(struct ast_viudptl *udptl, struct sockaddr *us, socklen_t uslen);
+
+void ast_viudptl_destroy(struct ast_viudptl *udptl);
+
+void ast_viudptl_reset(struct ast_viudptl *udptl);
+
+void ast_viudptl_set_callback(struct ast_viudptl *udptl, ast_viudptl_callback callback);
+
+void ast_viudptl_set_data(struct ast_viudptl *udptl, void *data);
+
+int ast_viudptl_write(struct ast_viudptl *udptl, struct ast_frame *f);
+
+struct ast_frame *ast_viudptl_read(struct ast_viudptl *udptl);
+
+int ast_viudptl_fd(struct ast_viudptl *udptl);
+
+int ast_viudptl_settos(struct ast_viudptl *udptl, int tos);
+
+void ast_viudptl_set_m_type(struct ast_viudptl* udptl, int pt);
+
+void ast_viudptl_set_udptlmap_type(struct ast_viudptl* udptl, int pt,
+ char* mimeType, char* mimeSubtype);
+
+int ast_viudptl_lookup_code(struct ast_viudptl* udptl, int isAstFormat, int code);
+
+void ast_viudptl_offered_from_local(struct ast_viudptl* udptl, int local);
+
+int ast_viudptl_get_error_correction_scheme(struct ast_viudptl* udptl);
+
+void ast_viudptl_set_error_correction_scheme(struct ast_viudptl* udptl, int ec);
+
+int ast_viudptl_get_local_max_datagram(struct ast_viudptl* udptl);
+
+void ast_viudptl_set_local_max_datagram(struct ast_viudptl* udptl, int max_datagram);
+
+int ast_viudptl_get_far_max_datagram(struct ast_viudptl* udptl);
+
+void ast_viudptl_set_far_max_datagram(struct ast_viudptl* udptl, int max_datagram);
+
+void ast_viudptl_get_current_formats(struct ast_viudptl* udptl,
+ int* astFormats, int* nonAstFormats);
+
+void ast_viudptl_setnat(struct ast_viudptl *udptl, int nat);
+
+int ast_viudptl_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc);
+
+int ast_viudptl_proto_register(struct ast_viudptl_protocol *proto);
+
+void ast_viudptl_proto_unregister(struct ast_viudptl_protocol *proto);
+
+void ast_viudptl_stop(struct ast_viudptl *udptl);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
More information about the svn-commits
mailing list