Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Functions
netsock.c File Reference

Network socket handling. More...

#include "asterisk.h"
#include <ifaddrs.h>
#include "include/netsock.h"
#include "asterisk/netsock2.h"
#include "asterisk/utils.h"
#include "include/astobj.h"

Go to the source code of this file.

Data Structures

struct  ast_netsock
 
struct  ast_netsock_list
 

Functions

struct ast_netsockast_netsock_bind (struct ast_netsock_list *list, struct io_context *ioc, const char *bindinfo, int defaultport, int tos, int cos, ast_io_cb callback, void *data)
 
struct ast_netsockast_netsock_bindaddr (struct ast_netsock_list *list, struct io_context *ioc, struct ast_sockaddr *bindaddr, int tos, int cos, ast_io_cb callback, void *data)
 
const struct ast_sockaddrast_netsock_boundaddr (const struct ast_netsock *ns)
 
void * ast_netsock_data (const struct ast_netsock *ns)
 
static void ast_netsock_destroy (struct ast_netsock *netsock)
 
struct ast_netsockast_netsock_find (struct ast_netsock_list *list, struct ast_sockaddr *addr)
 
int ast_netsock_init (struct ast_netsock_list *list)
 
struct ast_netsock_listast_netsock_list_alloc (void)
 
int ast_netsock_release (struct ast_netsock_list *list)
 
int ast_netsock_set_qos (int sockfd, int tos, int cos, const char *desc)
 
int ast_netsock_sockfd (const struct ast_netsock *ns)
 
void ast_netsock_unref (struct ast_netsock *ns)
 

Detailed Description

Network socket handling.

Author
Kevin P. Fleming kpfle.nosp@m.ming.nosp@m.@digi.nosp@m.um.c.nosp@m.om
Mark Spencer marks.nosp@m.ter@.nosp@m.digiu.nosp@m.m.co.nosp@m.m

Definition in file netsock.c.

Function Documentation

int ast_netsock_set_qos ( int  sockfd,
int  tos,
int  cos,
const char *  desc 
)
Deprecated:
Use ast_seq_qos in netsock2.h which properly handles IPv4 and IPv6 sockets, instead.

Definition at line 162 of file netsock.c.

References ast_set_qos().

163 {
164  return ast_set_qos(sockfd, tos, cos, desc);
165 }
int ast_set_qos(int sockfd, int tos, int cos, const char *desc)
Set type of service.
Definition: netsock2.c:621