Enable vty command to output talloc report
I don't think I can print this into a string and thus output it via VTY.
In that case it might be smarte to do in a signal handler
diff --git a/src/hnbgw.c b/src/hnbgw.c
index 27ace4e..9cd977f 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -308,10 +308,20 @@
return CMD_SUCCESS;
}
+DEFUN(show_talloc, show_talloc_cmd, "show talloc", SHOW_STR "Display talloc info")
+{
+ talloc_report_full(tall_hnb_ctx, stderr);
+ talloc_report_full(tall_ue_ctx, stderr);
+ talloc_report_full(talloc_asn1_ctx, stderr);
+
+ return CMD_SUCCESS;
+}
+
static void hnbgw_vty_init(void)
{
install_element_ve(&show_hnb_cmd);
install_element_ve(&show_ue_cmd);
+ install_element_ve(&show_talloc_cmd);
}
int main(int argc, char **argv)