X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=blobdiff_plain;f=include%2Fmon_internal.h;h=29ea5146826163a5d4347935f1be2e40aebc9d44;hp=0b19830386b9ef0fcfbe5ff7ac3e47a584934684;hb=86f808dde0595769d045eb82ef414174953ab67e;hpb=6491f2a660c3183b210b968a939eaa18f1b44a09 diff --git a/include/mon_internal.h b/include/mon_internal.h index 0b19830..29ea514 100644 --- a/include/mon_internal.h +++ b/include/mon_internal.h @@ -41,8 +41,8 @@ #include #include #include - -//#include +#include +#include #include #include #include @@ -91,19 +91,24 @@ enum mon_resp_code { enum mon_opt_type { OPT_TYPE_UNKNOWN=0, + OPT_TYPE_ANY, // System information OPT_TYPE_SHOW_VERSION, - OPT_TYPE_SHOW_SERIAL, + OPT_TYPE_SHOW_CONFIG_FILES, // 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_COMMUNITIES + OPT_TYPE_SHOW_PEERS, + OPT_TYPE_SHOW_COMMUNITIES, + OPT_TYPE_SHOW_REALMS, + OPT_TYPE_SHOW_RP_CLIENTS }; struct mon_opt { @@ -126,11 +131,13 @@ struct mons_instance { const char *hostname; unsigned int port; TR_GSS_NAMES *authorized_gss_names; - void *tids; // TODO sort out header file cycles and use typed pointers - void *trps; // TODO sort out header file cycles and use typed pointers + TIDS_INSTANCE *tids; + TRPS_INSTANCE *trps; 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 +169,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);