#include <talloc.h>
#include <stdint.h>
#include <jansson.h>
-#include <gmodule.h>
+#include <glib.h>
#include <gssapi.h>
#include <trust_router/tid.h>
#include <trp_internal.h>
#include <tr_gss_names.h>
#include <tr_gss_client.h>
#include <tr_name_internal.h>
-#include <trust_router/tr_dh.h>
#include <mon.h>
/* Typedefs */
enum mon_cmd {
MON_CMD_UNKNOWN=0,
- MON_CMD_RECONFIGURE,
MON_CMD_SHOW
};
// 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 {
/* Monitoring server instance */
struct mons_instance {
const char *hostname;
- unsigned int port;
+ int mon_port;
TR_GSS_NAMES *authorized_gss_names;
TIDS_INSTANCE *tids;
TRPS_INSTANCE *trps;
MONS_AUTH_FUNC *auth_handler;
void *cookie;
GPtrArray *handlers;
+ GArray *pids; /* PIDs of active mons processes */
};
/* Client instance */
/* mons.c */
MONS_INSTANCE *mons_new(TALLOC_CTX *mem_ctx);
-int mons_get_listener(MONS_INSTANCE *mons, MONS_REQ_FUNC *req_handler, MONS_AUTH_FUNC *auth_handler, const char *hostname,
- unsigned int port, void *cookie, int *fd_out, size_t max_fd);
+int mons_get_listener(MONS_INSTANCE *mons,
+ MONS_REQ_FUNC *req_handler,
+ MONS_AUTH_FUNC *auth_handler,
+ const char *hostname,
+ int port,
+ void *cookie,
+ int *fd_out,
+ size_t max_fd);
int mons_accept(MONS_INSTANCE *mons, int listen);
/* monc.c */
MONC_INSTANCE *monc_new(TALLOC_CTX *mem_ctx);
void monc_free(MONC_INSTANCE *monc);
-DH *monc_get_dh(MONC_INSTANCE *inst);
-DH *monc_set_dh(MONC_INSTANCE *inst, DH *dh);
-int monc_open_connection(MONC_INSTANCE *monc, const char *server, unsigned int port);
+int monc_open_connection(MONC_INSTANCE *monc, const char *server, int port);
MON_RESP *monc_send_request(TALLOC_CTX *mem_ctx, MONC_INSTANCE *monc, MON_REQ *req);
#endif //TRUST_ROUTER_MON_REQ_H