Add 'show vlib graphviz' command

Add a new command to dump vlib graph as graphviz/dot file

Change-Id: I43fc072cff8153ac500e5fbc6641a3705c2e995e
Signed-off-by: Benoît Ganne <bganne@cisco.com>
diff --git a/src/vlib/main.c b/src/vlib/main.c
index c0ab8e1..c5153ab 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -2126,7 +2126,9 @@
 	    }
 	  pm->n_packets_to_capture = max;
 	}
-      else if (unformat (line_input, "file %s", &filename))
+      else
+	if (unformat
+	    (line_input, "file %U", unformat_vlib_tmpfile, &filename))
 	{
 	  if (vm->dispatch_pcap_enable)
 	    {
@@ -2135,21 +2137,6 @@
 	      errorFlag = 1;
 	      break;
 	    }
-
-	  /* Brain-police user path input */
-	  if (strstr ((char *) filename, "..")
-	      || index ((char *) filename, '/'))
-	    {
-	      vlib_cli_output (vm, "illegal characters in filename '%s'",
-			       filename);
-	      vlib_cli_output (vm, "Hint: .. and / are not allowed.");
-	      vec_free (filename);
-	      errorFlag = 1;
-	      break;
-	    }
-
-	  chroot_filename = format (0, "/tmp/%s%c", filename, 0);
-	  vec_free (filename);
 	}
       else if (unformat (line_input, "status"))
 	{