Add support for show peers monitoring request
[trust_router.git] / mon / mon_common.c
index d0317f7..d97c943 100644 (file)
@@ -81,6 +81,7 @@ 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:
@@ -95,12 +96,18 @@ const char *mon_opt_type_to_string(MON_OPT_TYPE opt_type)
     case OPT_TYPE_SHOW_TID_REQ_COUNT:
       return "tid_req_count";
 
+    case OPT_TYPE_SHOW_TID_REQ_ERR_COUNT:
+      return "tid_req_error_count";
+
     case OPT_TYPE_SHOW_TID_REQ_PENDING:
       return "tid_req_pending";
 
     case OPT_TYPE_SHOW_ROUTES:
       return "routes";
 
+    case OPT_TYPE_SHOW_PEERS:
+      return "peers";
+
     case OPT_TYPE_SHOW_COMMUNITIES:
       return "communities";
   }
@@ -120,8 +127,10 @@ MON_OPT_TYPE mon_opt_type_from_string(const char *s)
   return_if_matches(s, OPT_TYPE_SHOW_SERIAL);
   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 OPT_TYPE_UNKNOWN;
 }