X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=blobdiff_plain;f=mon%2Fmon_common.c;h=3ca8d16fa90ad6f123051e8ac75fc0bef621a8fa;hp=d0317f7d2026ae362c9cc8cb8c2aedc33c41eaad;hb=7458d6a285fa526fd8cec03e1bbb497650a0e405;hpb=547fc620bfb088fbc35d7301dc52251d7818f4ea diff --git a/mon/mon_common.c b/mon/mon_common.c index d0317f7..3ca8d16 100644 --- a/mon/mon_common.c +++ b/mon/mon_common.c @@ -34,7 +34,7 @@ #include -#include +#include #include #include @@ -50,9 +50,6 @@ const char *mon_cmd_to_string(MON_CMD cmd) case MON_CMD_UNKNOWN: return NULL; - case MON_CMD_RECONFIGURE: - return "reconfigure"; - case MON_CMD_SHOW: return "show"; } @@ -68,7 +65,6 @@ const char *mon_cmd_to_string(MON_CMD cmd) MON_CMD mon_cmd_from_string(const char *s) { - return_if_matches(s, MON_CMD_RECONFIGURE); return_if_matches(s, MON_CMD_SHOW); return MON_CMD_UNKNOWN; } @@ -81,28 +77,41 @@ const char *mon_opt_type_to_string(MON_OPT_TYPE opt_type) { switch(opt_type) { case OPT_TYPE_UNKNOWN: + case OPT_TYPE_ANY: return NULL; case OPT_TYPE_SHOW_VERSION: return "version"; - case OPT_TYPE_SHOW_SERIAL: - return "serial"; + case OPT_TYPE_SHOW_CONFIG_FILES: + return "config_files"; case OPT_TYPE_SHOW_UPTIME: return "uptime"; case OPT_TYPE_SHOW_TID_REQ_COUNT: - return "tid_req_count"; + return "tid_reqs_processed"; + + case OPT_TYPE_SHOW_TID_REQ_ERR_COUNT: + return "tid_error_count"; case OPT_TYPE_SHOW_TID_REQ_PENDING: - return "tid_req_pending"; + return "tid_reqs_pending"; case OPT_TYPE_SHOW_ROUTES: return "routes"; + case OPT_TYPE_SHOW_PEERS: + return "peers"; + case OPT_TYPE_SHOW_COMMUNITIES: return "communities"; + + case OPT_TYPE_SHOW_REALMS: + return "realms"; + + case OPT_TYPE_SHOW_RP_CLIENTS: + return "rp_clients"; } return NULL; } @@ -117,12 +126,16 @@ const char *mon_opt_type_to_string(MON_OPT_TYPE opt_type) MON_OPT_TYPE mon_opt_type_from_string(const char *s) { return_if_matches(s, OPT_TYPE_SHOW_VERSION); - return_if_matches(s, OPT_TYPE_SHOW_SERIAL); + return_if_matches(s, OPT_TYPE_SHOW_CONFIG_FILES); return_if_matches(s, OPT_TYPE_SHOW_UPTIME); return_if_matches(s, OPT_TYPE_SHOW_TID_REQ_COUNT); + return_if_matches(s, OPT_TYPE_SHOW_TID_REQ_ERR_COUNT); return_if_matches(s, OPT_TYPE_SHOW_TID_REQ_PENDING); return_if_matches(s, OPT_TYPE_SHOW_ROUTES); + return_if_matches(s, OPT_TYPE_SHOW_PEERS); return_if_matches(s, OPT_TYPE_SHOW_COMMUNITIES); + return_if_matches(s, OPT_TYPE_SHOW_REALMS); + return_if_matches(s, OPT_TYPE_SHOW_RP_CLIENTS); return OPT_TYPE_UNKNOWN; } #undef return_if_matches