seas.h File Reference

#include <arpa/inet.h>
#include "../../str.h"
#include "../../ip_addr.h"
#include "../../sr_module.h"
#include "../tm/tm_load.h"
#include "ha.h"
#include "cluster.h"

Include dependency graph for seas.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  app_server
struct  as_entry
struct  as_msg
struct  cluster
struct  seas_functions

Defines

#define AS_BUF_SIZE   4000
#define AS_TYPE   1
#define BIND_AC   6
#define CANCEL_FOUND   0x08
#define CLUSTER_TYPE   2
#define E2E_ACK   0x04
#define ENCODED_MSG_SIZE   3200
#define HAS_FD   1
#define HAS_NAME   2
#define MAX_AS_NAME   15
#define MAX_AS_NR   5
#define MAX_AS_PER_CLUSTER   10
#define MAX_BINDS   10
#define MAX_UNC_AS_NR   5
#define MAX_WHOAMI_LEN   30
#define net2hostL(dst, from, index)
#define PING_AC   5
#define RES_IN   4
#define SL_REQ_IN   3
#define SPIRAL_FLAG   0x00000001
#define T_REQ_IN   2
#define UNBIND_AC   7

Typedefs

typedef struct as_msgas_msg_p
typedef struct as_msg as_msg_t
typedef struct app_serveras_p
typedef struct app_server as_t

Functions

char * create_as_event_sl (struct sip_msg *msg, char processor_id, int *evt_len, int flags)
char * create_as_event_t (struct cell *t, struct sip_msg *msg, char processor_id, int *evt_len, int flags)
char get_processor_id (struct receive_info *rcv, as_p as)
static void print_ip_buf (struct ip_addr *ip, char *where, int len)
void seas_sighandler (int signo)

Variables

struct as_entryas_list
struct as_entryas_table
int is_dispatcher
int jain_ping
int jain_pings_lost
struct as_entrymy_as
int read_pipe
struct seas_functions seas_f
struct ip_addrseas_listen_ip
unsigned short seas_listen_port
char seas_sigchld_received
int servlet_ping
int servlet_pings_lost
char use_stats
char whoami []
int write_pipe


Define Documentation

#define AS_BUF_SIZE   4000

#define AS_TYPE   1

#define BIND_AC   6

Definition at line 62 of file seas.h.

Referenced by process_event_reply().

#define CANCEL_FOUND   0x08

Definition at line 51 of file seas.h.

Referenced by create_as_event_t().

#define CLUSTER_TYPE   2

#define E2E_ACK   0x04

EVENT FLAGS

Definition at line 50 of file seas.h.

Referenced by create_as_event_t().

#define ENCODED_MSG_SIZE   3200

Definition at line 46 of file seas.h.

Referenced by create_as_action_reply(), create_as_event_sl(), and create_as_event_t().

#define HAS_FD   1

Definition at line 38 of file seas.h.

Referenced by new_as_connect().

#define HAS_NAME   2

Definition at line 39 of file seas.h.

Referenced by handle_unc_as_data().

#define MAX_AS_NAME   15

Definition at line 34 of file seas.h.

Referenced by handle_unc_as_data().

#define MAX_AS_NR   5

Definition at line 32 of file seas.h.

#define MAX_AS_PER_CLUSTER   10

Definition at line 36 of file seas.h.

Referenced by parse_cluster_cfg().

#define MAX_BINDS   10

#define MAX_UNC_AS_NR   5

Definition at line 33 of file seas.h.

Referenced by handle_unc_as_data(), new_as_connect(), and seas_init().

#define MAX_WHOAMI_LEN   30

Definition at line 42 of file seas.h.

Referenced by dispatch_actions().

#define net2hostL ( dst,
from,
index   ) 

Value:

do{ \
   memcpy(&(dst),(from)+(index),4); \
   dst=ntohl(dst); \
   (index)+=4; \
}while(0);

Definition at line 69 of file seas.h.

Referenced by ac_cancel(), ac_jain_pong(), ac_reply(), ac_sl_msg(), ac_uac_req(), process_bind_action(), and process_unbind_action().

#define PING_AC   5

Definition at line 61 of file seas.h.

Referenced by create_ping_event().

#define RES_IN   4

Definition at line 60 of file seas.h.

Referenced by create_as_action_reply(), and uac_cb().

#define SL_REQ_IN   3

Definition at line 59 of file seas.h.

Referenced by create_as_event_sl(), and w_as_relay_sl().

#define SPIRAL_FLAG   0x00000001

ACTION identifiers

Definition at line 67 of file seas.h.

Referenced by ac_cancel(), and ac_uac_req().

#define T_REQ_IN   2

ACTION identifiers

Definition at line 58 of file seas.h.

Referenced by create_as_event_t(), and w_as_relay_t().

#define UNBIND_AC   7

Definition at line 63 of file seas.h.

Referenced by process_event_reply().


Typedef Documentation

typedef struct as_msg* as_msg_p

typedef struct as_msg as_msg_t

typedef struct app_server * as_p

typedef struct app_server as_t


Function Documentation

char* create_as_event_sl ( struct sip_msg msg,
char  processor_id,
int *  evt_len,
int  flags 
)

creates an as_event in shared memory and returns its address or NULL if error. event_length(4) UNSIGNED INT includes the length 4 bytes itself type(1), processor_id(4), flags(4), transport(1). src_ip_len(1), src_ip(4 or 16), dst_ip_len(1), dst_ip(4 or 16), src_port(2), dst_port(2),

Definition at line 543 of file seas.c.

References receive_info::dst_ip, receive_info::dst_port, encode_msg(), ENCODED_MSG_SIZE, GET_PAY_SIZE, ip_addr::len, len, LM_ERR, NULL, port, receive_info::proto, sip_msg::rcv, shm_free, shm_malloc(), SL_REQ_IN, receive_info::src_ip, receive_info::src_port, and ip_addr::u.

Referenced by w_as_relay_sl(), and w_as_relay_t().

char* create_as_event_t ( struct cell t,
struct sip_msg msg,
char  processor_id,
int *  evt_len,
int  flags 
)

creates an as_event in shared memory and returns its address or NULL if error. event_length(4) UNSIGNED INT includes the length 4 bytes itself type(1), flags(4), transport(1). src_ip_len(1), src_ip(4 or 16), dst_ip_len(1), dst_ip(4 or 16), src_port(2), dst_port(2), hash index(4), label(4), [cancelled hash_index,label]

seas_f.tmb.t_get_trans_ident(msg,&hash_index,&label); this is bad, because it ref-counts !!!

we dont even pass the unknown CANCEL to JAIN

Definition at line 422 of file seas.c.

References CANCEL_FOUND, receive_info::dst_ip, receive_info::dst_port, E2E_ACK, encode_msg(), ENCODED_MSG_SIZE, GET_PAY_SIZE, cell::hash_index, is_e2e_ack(), cell::label, ip_addr::len, len, LM_DBG, LM_ERR, LM_WARN, METHOD_CANCEL, NULL, port, receive_info::proto, sip_msg::rcv, seas_f, shm_free, shm_malloc(), receive_info::src_ip, receive_info::src_port, tm_binds::t_lookup_original_t, T_REQ_IN, T_UNDEFINED, seas_functions::tmb, and ip_addr::u.

Referenced by w_as_relay_t().

char get_processor_id ( struct receive_info rcv,
as_p  as 
)

search within a given AS, if any of the registered processors is bound to the receive_info structure passed. If there is one, it returns its identifier (number between 0 and 128), otherwise it returns -1;

Definition at line 743 of file seas.c.

References ip_addr::addr, socket_info::address, ip_addr::af, app_server::binds, app_server::bound_processor, receive_info::dst_ip, ip_addr::len, MAX_BINDS, and ip_addr::u.

Referenced by w_as_relay_sl(), and w_as_relay_t().

static void print_ip_buf ( struct ip_addr ip,
char *  where,
int  len 
) [inline, static]

Definition at line 163 of file seas.h.

References ip_addr::addr, ip_addr::addr16, ip_addr::af, snprintf, and ip_addr::u.

Referenced by process_bind_action().

void seas_sighandler ( int  signo  ) 


Variable Documentation

struct as_entry* as_list

struct as_entry* as_table

Definition at line 79 of file seas.c.

int jain_ping

Definition at line 36 of file ha.c.

Referenced by prepare_ha().

struct as_entry* my_as

int read_pipe

Definition at line 84 of file seas.c.

Referenced by dispatch_relay(), dispatcher_main_loop(), seas_child_init(), and seas_init().

Definition at line 76 of file seas.c.

Referenced by dispatcher_main_loop().

unsigned short seas_listen_port

Definition at line 77 of file seas.c.

Referenced by dispatcher_main_loop(), and seas_init().

Definition at line 41 of file ha.c.

Referenced by prepare_ha().

char use_stats

char whoami[]

Definition at line 69 of file seas.c.

Referenced by dispatch_actions(), dispatcher_main_loop(), seas_sighandler(), and spawn_pinger().

Definition at line 83 of file seas.c.

Referenced by seas_init(), send_ping(), uac_cb(), w_as_relay_sl(), and w_as_relay_t().


Generated on Thu May 24 12:00:42 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6