mi_datagram.c File Reference

MI_DATAGRAM :: Unix socket and network socket (UDP) API for the Kamailio manager interface. More...

#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdarg.h>
#include <time.h>
#include <stdio.h>
#include <fcntl.h>
#include "../../sr_module.h"
#include "../../resolve.h"
#include "../../dprint.h"
#include "../../ut.h"
#include "../../mem/mem.h"
#include "../../mem/shm_mem.h"
#include "../../mi/mi.h"
#include "../../ip_addr.h"
#include "mi_datagram.h"
#include "datagram_fnc.h"
#include "mi_datagram_parser.h"
#include "mi_datagram_writer.h"

Include dependency graph for mi_datagram.c:

Go to the source code of this file.

Defines

#define AF_LOCAL   AF_UNIX
#define MAX_CTIME_LEN   128
#define MAX_NB_PORT   65535
#define PF_LOCAL   PF_UNIX

Functions

static void datagram_process (int rank)
static int mi_child_init (int rank)
static int mi_destroy (void)
static int mi_mod_init (void)
static int post_datagram_process (void)
static int pre_datagram_process (void)

Variables

struct module_exports exports
static sockaddr_dtgram mi_dtgram_addr
static param_export_t mi_params []
static MODULE_VERSION proc_export_t mi_procs []
static char * mi_reply_indent = DEFAULT_MI_REPLY_IDENT
static char * mi_socket = 0
static int mi_socket_domain = AF_LOCAL
int mi_socket_timeout = 2000
static int mi_unix_socket_gid = -1
static char * mi_unix_socket_gid_s = 0
static int mi_unix_socket_mode = S_IRUSR| S_IWUSR| S_IRGRP| S_IWGRP
static int mi_unix_socket_uid = -1
static char * mi_unix_socket_uid_s = 0
static rx_tx_sockets sockets


Detailed Description

MI_DATAGRAM :: Unix socket and network socket (UDP) API for the Kamailio manager interface.

Definition in file mi_datagram.c.


Define Documentation

#define AF_LOCAL   AF_UNIX

Definition at line 67 of file mi_datagram.c.

#define MAX_CTIME_LEN   128

Definition at line 74 of file mi_datagram.c.

#define MAX_NB_PORT   65535

Definition at line 75 of file mi_datagram.c.

Referenced by mi_mod_init().

#define PF_LOCAL   PF_UNIX

Definition at line 70 of file mi_datagram.c.

Referenced by init_twrite_sock(), and write_to_unixsock().


Function Documentation

static void datagram_process ( int  rank  )  [static]

static int mi_child_init ( int  rank  )  [static]

static int mi_destroy ( void   )  [static]

Definition at line 319 of file mi_datagram.c.

References LM_ERR, mi_socket, and mi_socket_domain.

static int mi_mod_init ( void   )  [static]

static int post_datagram_process ( void   )  [static]

Definition at line 310 of file mi_datagram.c.

References rx_tx::rx_sock, and rx_tx::tx_sock.

static int pre_datagram_process ( void   )  [static]


Variable Documentation

Definition at line 129 of file mi_datagram.c.

Definition at line 86 of file mi_datagram.c.

Definition at line 115 of file mi_datagram.c.

MODULE_VERSION proc_export_t mi_procs[] [static]

Initial value:

Definition at line 108 of file mi_datagram.c.

char* mi_reply_indent = DEFAULT_MI_REPLY_IDENT [static]

Definition at line 101 of file mi_datagram.c.

char* mi_socket = 0 [static]

Definition at line 89 of file mi_datagram.c.

Referenced by mi_destroy(), and mi_mod_init().

int mi_socket_domain = AF_LOCAL [static]

Definition at line 85 of file mi_datagram.c.

int mi_socket_timeout = 2000

Timeout for sending replies in milliseconds

Definition at line 90 of file mi_datagram.c.

Referenced by datagram_close_async(), and mi_datagram_server().

int mi_unix_socket_gid = -1 [static]

Definition at line 96 of file mi_datagram.c.

Referenced by mi_mod_init(), and pre_datagram_process().

char* mi_unix_socket_gid_s = 0 [static]

Definition at line 97 of file mi_datagram.c.

Referenced by mi_mod_init().

int mi_unix_socket_mode = S_IRUSR| S_IWUSR| S_IRGRP| S_IWGRP [static]

Definition at line 98 of file mi_datagram.c.

Referenced by mi_mod_init(), and pre_datagram_process().

int mi_unix_socket_uid = -1 [static]

Definition at line 94 of file mi_datagram.c.

Referenced by mi_mod_init(), and pre_datagram_process().

char* mi_unix_socket_uid_s = 0 [static]

Definition at line 95 of file mi_datagram.c.

Referenced by mi_mod_init().

Definition at line 91 of file mi_datagram.c.


Generated on Wed May 23 20:00:40 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6