Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _ASTERISK_NETSOCK_H
00025 #define _ASTERISK_NETSOCK_H
00026
00027 #if defined(__cplusplus) || defined(c_plusplus)
00028 extern "C" {
00029 #endif
00030
00031 #include "asterisk/network.h"
00032 #include "asterisk/io.h"
00033 #include "asterisk/netsock2.h"
00034
00035 struct ast_netsock;
00036
00037 struct ast_netsock_list;
00038
00039 struct ast_netsock_list *ast_netsock_list_alloc(void);
00040
00041 int ast_netsock_init(struct ast_netsock_list *list);
00042
00043 struct ast_netsock *ast_netsock_bind(struct ast_netsock_list *list, struct io_context *ioc,
00044 const char *bindinfo, int defaultport, int tos, int cos, ast_io_cb callback, void *data);
00045
00046 struct ast_netsock *ast_netsock_bindaddr(struct ast_netsock_list *list, struct io_context *ioc,
00047 struct ast_sockaddr *bindaddr, int tos, int cos, ast_io_cb callback, void *data);
00048
00049 int ast_netsock_release(struct ast_netsock_list *list);
00050
00051 struct ast_netsock *ast_netsock_find(struct ast_netsock_list *list,
00052 struct ast_sockaddr *addr);
00053
00054
00055
00056
00057
00058 int ast_netsock_set_qos(int sockfd, int tos, int cos, const char *desc);
00059
00060 int ast_netsock_sockfd(const struct ast_netsock *ns);
00061
00062 const struct ast_sockaddr *ast_netsock_boundaddr(const struct ast_netsock *ns);
00063
00064 void *ast_netsock_data(const struct ast_netsock *ns);
00065
00066 void ast_netsock_unref(struct ast_netsock *ns);
00067
00068 #if defined(__cplusplus) || defined(c_plusplus)
00069 }
00070 #endif
00071
00072 #endif