Thread (45 messages) 45 messages, 7 authors, 2012-07-31

Re: [PATCH 10/17] Tools: hv: Gather ipv[4,6] gateway information

From: Stephen Hemminger <hidden>
Date: 2012-07-24 16:29:40
Also in: lkml, virtualization

On Tue, 24 Jul 2012 09:01:34 -0700
"K. Y. Srinivasan" [off-list ref] wrote:
+	memset(cmd, 0, sizeof(cmd));
+	strcat(cmd, "/sbin/ip -f inet  route | grep -w ");
+	strcat(cmd, if_name);
+	strcat(cmd, " | awk '/default/ {print $3 }'");

Much simpler method:

ip route show match 0/0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help