jabberd2  2.3.4
Data Structures | Typedefs | Enumerations | Functions
router.h File Reference
#include "sx/sx.h"
#include "mio/mio.h"
#include "util/util.h"

Go to the source code of this file.

Data Structures

struct  acl_s
 
struct  router_st
 
struct  component_st
 a single component More...
 
struct  routes_st
 
struct  alias_st
 
union  xhashv
 session packet handling More...
 

Typedefs

typedef struct router_strouter_t
 
typedef struct component_stcomponent_t
 
typedef struct routes_stroutes_t
 
typedef struct alias_stalias_t
 
typedef struct acl_sacl_t
 

Enumerations

enum  route_type_t {
  route_SINGLE = 0x00, route_MULTI_TO = 0x10, route_MULTI_FROM = 0x11, route_NONE = 0x00,
  route_UNICAST = 0x10, route_BROADCAST = 0x11, route_ADV = 0x20, route_ADV_UN = 0x21,
  route_ERROR = 0x40
}
 route types More...
 

Functions

int router_mio_callback (mio_t m, mio_action_t a, mio_fd_t fd, void *data, void *arg)
 
void router_sx_handshake (sx_t s, sx_buf_t buf, void *arg)
 
xht aci_load (router_t r)
 
void aci_unload (xht aci)
 unload aci table More...
 
int aci_check (xht acls, const char *type, const char *name)
 see if a username is in an acl More...
 
int user_table_load (router_t r)
 user table manager More...
 
void user_table_unload (router_t r)
 
int filter_load (router_t r)
 
void filter_unload (router_t r)
 filter manager More...
 
int filter_packet (router_t r, nad_t nad)
 
int message_log (nad_t nad, router_t r, const char *msg_from, const char *msg_to)
 
void routes_free (routes_t routes)
 

Typedef Documentation

typedef struct router_st* router_t

Definition at line 51 of file router.h.

typedef struct component_st* component_t

Definition at line 52 of file router.h.

typedef struct routes_st* routes_t

Definition at line 53 of file router.h.

typedef struct alias_st* alias_t

Definition at line 54 of file router.h.

typedef struct acl_s* acl_t

Definition at line 56 of file router.h.

Enumeration Type Documentation

route types

Enumerator
route_SINGLE 

single component route

route_MULTI_TO 

multi component route - route by 'to'

route_MULTI_FROM 

multi component route - route by 'from'

route_NONE 

no route

route_UNICAST 

unicast

route_BROADCAST 

broadcast

route_ADV 

advertisement (available)

route_ADV_UN 

advertisement (unavailable)

route_ERROR 

route error

Definition at line 201 of file router.h.

Function Documentation

int router_mio_callback ( mio_t  m,
mio_action_t  a,
mio_fd_t  fd,
void *  data,
void *  arg 
)
void router_sx_handshake ( sx_t  s,
sx_buf_t  buf,
void *  arg 
)
xht aci_load ( router_t  r)
void aci_unload ( xht  aci)

unload aci table

Definition at line 114 of file aci.c.

int aci_check ( xht  acls,
const char *  type,
const char *  name 
)

see if a username is in an acl

Definition at line 93 of file aci.c.

References log_debug, aci_user_st::name, aci_user_st::next, xhash_get(), and ZONE.

Referenced by _announce_pkt_sm(), _disco_pkt_sm(), and _router_process_bind().

int user_table_load ( router_t  r)
void user_table_unload ( router_t  r)

Definition at line 103 of file user.c.

References router_st::users, and xhash_free().

Referenced by JABBER_MAIN().

int filter_load ( router_t  r)
void filter_unload ( router_t  r)

filter manager

Definition at line 25 of file filter.c.

References router_st::filter, acl_s::from, acl_s::next, acl_s::redirect, acl_s::to, and acl_s::what.

Referenced by filter_load(), and JABBER_MAIN().

int filter_packet ( router_t  r,
nad_t  nad 
)
int message_log ( nad_t  nad,
router_t  r,
const char *  msg_from,
const char *  msg_to 
)
void routes_free ( routes_t  routes)

Definition at line 153 of file router.c.

References routes_st::comp, and routes_st::name.

Referenced by JABBER_MAIN().