Browse code

core: Added virtual flag to output of core.sockets_list

Rhys Hanrahan authored on 22/12/2021 11:14:54 • Daniel-Constantin Mierla committed on 07/01/2022 11:27:25
Showing 1 changed files
... ...
@@ -955,10 +955,11 @@ static void core_sockets_list(rpc_t* rpc, void* c)
955 955
 				for (ai=si->addr_info_lst; ai; ai=ai->next)
956 956
 					rpc->struct_add(ha, "ss",
957 957
 						"address", ai->address_str.s);
958
-				rpc->struct_add(ha, "sss",
958
+				rpc->struct_add(ha, "ssss",
959 959
 						"port", si->port_no_str.s,
960 960
 						"mcast", si->flags & SI_IS_MCAST ? "yes" : "no",
961
-						"mhomed", si->flags & SI_IS_MHOMED ? "yes" : "no");
961
+						"mhomed", si->flags & SI_IS_MHOMED ? "yes" : "no",
962
+						"virtual", si->flags & SI_IS_VIRTUAL ? "yes" : "no");
962 963
 			} else {
963 964
 				printf("             %s: %s",
964 965
 						get_proto_name(proto),
... ...
@@ -969,10 +970,11 @@ static void core_sockets_list(rpc_t* rpc, void* c)
969 970
 				if (!(si->flags & SI_IS_IP))
970 971
 					rpc->struct_add(ha, "s",
971 972
 						"ipaddress", si->address_str.s);
972
-				rpc->struct_add(ha, "sss",
973
+				rpc->struct_add(ha, "ssss",
973 974
 						"port", si->port_no_str.s,
974 975
 						"mcast", si->flags & SI_IS_MCAST ? "yes" : "no",
975
-						"mhomed", si->flags & SI_IS_MHOMED ? "yes" : "no");
976
+						"mhomed", si->flags & SI_IS_MHOMED ? "yes" : "no",
977
+						"virtual", si->flags & SI_IS_VIRTUAL ? "yes" : "no");
976 978
 			}
977 979
 		}
978 980
 	} while((proto=next_proto(proto)));