abyss_socket.c File Reference

#include <sys/types.h>
#include <assert.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include "abyss_mallocvar.h"
#include "abyss_xmlrpc_int.h"
#include <xmlrpc-c/abyss.h>
#include "abyss_socket_unix.h"
#include "abyss_socket.h"

Include dependency graph for abyss_socket.c:

Go to the source code of this file.

Functions

void SocketAccept (TSocket *const listenSocketP, abyss_bool *const connectedP, abyss_bool *const failedP, TSocket **const acceptedSocketPP, TIPAddr *const ipAddrP)
uint32_t SocketAvailableReadBytes (TSocket *const socketP)
abyss_bool SocketBind (TSocket *const socketP, TIPAddr *const addrP, uint16_t const portNumber)
abyss_bool SocketConnect (TSocket *const socketP, TIPAddr *const addrP, uint16_t const portNumber)
void SocketCreate (const struct TSocketVtbl *const vtblP, void *const implP, TSocket **const socketPP)
void SocketDestroy (TSocket *const socketP)
uint32_t SocketError (TSocket *const socketP)
void SocketGetPeerName (TSocket *const socketP, TIPAddr *const ipAddrP, uint16_t *const portNumberP, abyss_bool *const successP)
abyss_bool SocketInit (void)
abyss_bool SocketListen (TSocket *const socketP, uint32_t const backlog)
static void socketOsInit (abyss_bool *const succeededP)
static void socketOsTerm (void)
uint32_t SocketRead (TSocket *const socketP, unsigned char *const buffer, uint32_t const len)
void SocketTerm (void)
uint32_t SocketWait (TSocket *const socketP, abyss_bool const rd, abyss_bool const wr, uint32_t const timems)
void SocketWrite (TSocket *const socketP, const unsigned char *const buffer, uint32_t const len, abyss_bool *const failedP)

Variables

static uint const socketSignature = 0x060609
abyss_bool SocketTraceIsActive


Function Documentation

void SocketAccept ( TSocket *const   listenSocketP,
abyss_bool *const   connectedP,
abyss_bool *const   failedP,
TSocket **const   acceptedSocketPP,
TIPAddr *const   ipAddrP 
)

Definition at line 214 of file abyss_socket.c.

uint32_t SocketAvailableReadBytes ( TSocket *const   socketP  ) 

Definition at line 241 of file abyss_socket.c.

Referenced by ConnRead().

abyss_bool SocketBind ( TSocket *const   socketP,
TIPAddr *const   addrP,
uint16_t const   portNumber 
)

Definition at line 195 of file abyss_socket.c.

abyss_bool SocketConnect ( TSocket *const   socketP,
TIPAddr *const   addrP,
uint16_t const   portNumber 
)

Definition at line 185 of file abyss_socket.c.

void SocketCreate ( const struct TSocketVtbl *const   vtblP,
void *const   implP,
TSocket **const   socketPP 
)

Definition at line 131 of file abyss_socket.c.

References MALLOCVAR, _TConn::socketP, and socketSignature.

void SocketDestroy ( TSocket *const   socketP  ) 

uint32_t SocketError ( TSocket *const   socketP  ) 

Definition at line 260 of file abyss_socket.c.

void SocketGetPeerName ( TSocket *const   socketP,
TIPAddr *const   ipAddrP,
uint16_t *const   portNumberP,
abyss_bool *const   successP 
)

Definition at line 249 of file abyss_socket.c.

Referenced by ConnCreate().

abyss_bool SocketInit ( void   ) 

Definition at line 96 of file abyss_socket.c.

References NULL, socketOsInit(), and SocketTraceIsActive.

Referenced by createAndBindSocket().

abyss_bool SocketListen ( TSocket *const   socketP,
uint32_t const   backlog 
)

Definition at line 205 of file abyss_socket.c.

static void socketOsInit ( abyss_bool *const   succeededP  )  [static]

Definition at line 70 of file abyss_socket.c.

References SocketUnixInit().

Referenced by SocketInit().

static void socketOsTerm ( void   )  [static]

Definition at line 82 of file abyss_socket.c.

References SocketUnixTerm().

Referenced by SocketTerm().

uint32_t SocketRead ( TSocket *const   socketP,
unsigned char *const   buffer,
uint32_t const   len 
)

Definition at line 175 of file abyss_socket.c.

void SocketTerm ( void   ) 

Definition at line 112 of file abyss_socket.c.

References socketOsTerm().

uint32_t SocketWait ( TSocket *const   socketP,
abyss_bool const   rd,
abyss_bool const   wr,
uint32_t const   timems 
)

Definition at line 230 of file abyss_socket.c.

void SocketWrite ( TSocket *const   socketP,
const unsigned char *const   buffer,
uint32_t const   len,
abyss_bool *const   failedP 
)

Definition at line 164 of file abyss_socket.c.


Variable Documentation

uint const socketSignature = 0x060609 [static]

Definition at line 128 of file abyss_socket.c.

Referenced by SocketCreate(), and SocketDestroy().

abyss_bool SocketTraceIsActive

Definition at line 93 of file abyss_socket.c.

Referenced by SocketInit(), socketRead(), and socketWrite().


Generated on Thu May 17 10:00:33 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6