30 #ifdef ENABLE_SUPERSEDED
31 static int ns_TIME = 0;
36 extern char *tzname[];
47 #ifdef ENABLE_SUPERSEDED
60 #ifdef ENABLE_SUPERSEDED
61 if(pkt->
ns == ns_TIME) {
65 strcpy(buf, asctime(tm));
66 c = strchr(buf,
'\n');
70 #if defined(HAVE_STRUCT_TM_TM_ZONE)
72 #elif defined(HAVE_TZNAME)
81 snprintf(buf, 64,
"%+03d:%02d", -((
int)timezone)/(60*60), -((
int)timezone)%(60*60));
83 snprintf(buf, 64,
"%+03d:%02d", (
int) tm->tm_gmtoff/(60*60), (
int) tm->tm_gmtoff%(60*60));
87 #ifdef ENABLE_SUPERSEDED
105 if(mod->
init)
return 0;
110 #ifdef ENABLE_SUPERSEDED
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
int nad_insert_elem(nad_t nad, int parent, int ns, const char *name, const char *cdata)
shove in a new child elem after the given one
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 init
number of times the module intialiser has been called
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
void datetime_out(time_t t, datetime_t type, char *date, int datelen)
static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt)
DLLEXPORT int module_init(mod_instance_t mi, const char *arg)
void pkt_router(pkt_t pkt)
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)
static void _iq_time_free(module_t mod)
void(* free)(module_t mod)
called when module is freed
mod_ret_t
module return values