On Tue, 24 Jul 2012 09:01:34 -0700
"K. Y. Srinivasan" <[email protected]> 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

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to