X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=blobdiff_plain;f=include%2Fmon_internal.h;h=c58b9d704b8b34b3430f6c104f4e41492a5fb682;hp=27fc00e4705b736545d53731dd3bf599fdf8e601;hb=01415bbcacceae7f2fb1286fe8fe2665f4a755bf;hpb=f55d5503336233c90fb84aec15c2f0a18116831e diff --git a/include/mon_internal.h b/include/mon_internal.h index 27fc00e..c58b9d7 100644 --- a/include/mon_internal.h +++ b/include/mon_internal.h @@ -91,6 +91,7 @@ enum mon_resp_code { enum mon_opt_type { OPT_TYPE_UNKNOWN=0, + OPT_TYPE_ANY, // System information OPT_TYPE_SHOW_VERSION, @@ -99,10 +100,12 @@ enum mon_opt_type { // System statistics OPT_TYPE_SHOW_UPTIME, OPT_TYPE_SHOW_TID_REQ_COUNT, + OPT_TYPE_SHOW_TID_REQ_ERR_COUNT, OPT_TYPE_SHOW_TID_REQ_PENDING, // Dynamic trust router state OPT_TYPE_SHOW_ROUTES, + OPT_TYPE_SHOW_PEERS, OPT_TYPE_SHOW_COMMUNITIES }; @@ -131,6 +134,8 @@ struct mons_instance { MONS_REQ_FUNC *req_handler; MONS_AUTH_FUNC *auth_handler; void *cookie; + GPtrArray *handlers; + GArray *pids; /* PIDs of active mons processes */ }; /* Client instance */ @@ -162,6 +167,8 @@ MON_REQ *mon_req_parse(TALLOC_CTX *mem_ctx, const char *input); /* mon_resp.c */ MON_RESP *mon_resp_new(TALLOC_CTX *mem_ctx, MON_RESP_CODE code, const char *msg, json_t *payload); void mon_resp_free(MON_RESP *resp); +int mon_resp_set_message(MON_RESP *resp, const char *new_msg); +void mon_resp_set_payload(MON_RESP *resp, json_t *new_payload); /* mon_resp_encode.c */ json_t *mon_resp_encode(MON_RESP *resp);