69 if(mod->
init)
return 0;
mod_ret_t(* pkt_sm)(mod_instance_t mi, pkt_t pkt)
pkt-sm handler
pkt_type_t type
packet type
int sm_register_ns(sm_t sm, const char *uri)
register a new global ns
data structures and prototypes for the session manager
void sm_unregister_ns(sm_t sm, const char *uri)
unregister a global ns
pkt_t pkt_tofrom(pkt_t pkt)
swap a packet's to and from attributes
single instance of a module in a chain
int nad_find_elem(nad_t nad, int elem, int ns, const char *name, int depth)
locate the next elem at a given depth with an optional matching name
int init
number of times the module intialiser has been called
void _iq_ping_reply(pkt_t pkt)
static mod_ret_t _iq_ping_pkt_sm(mod_instance_t mi, pkt_t pkt)
void nad_set_attr(nad_t nad, int elem, int ns, const char *name, const char *val, int vallen)
create, update, or zap any matching attr on this elem
module_t mod
module that this is an instance of
void feature_unregister(sm_t sm, const char *feature)
unregister feature
packet summary data wrapper
nad_t nad
nad of the entire packet
mod_ret_t(* in_sess)(mod_instance_t mi, sess_t sess, pkt_t pkt)
in-sess handler
void pkt_router(pkt_t pkt)
DLLEXPORT int module_init(mod_instance_t mi, const char *arg)
void feature_register(sm_t sm, const char *feature)
register a feature
packet was unhandled, should be passed to the next module
packet was handled (and freed)
There is one instance of this struct per user who is logged in to this c2s instance.
void(* free)(module_t mod)
called when module is freed
void nad_drop_elem(nad_t nad, int elem)
remove an element (and its subelements)
static void _iq_ping_free(module_t mod)
static mod_ret_t _iq_ping_in_sess(mod_instance_t mi, sess_t sess, pkt_t pkt)
mod_ret_t
module return values
void pkt_sess(pkt_t pkt, sess_t sess)
int nad_find_scoped_namespace(nad_t nad, const char *uri, const char *prefix)
find a namespace in scope