Skip to content
Snippets Groups Projects
Commit bd54bcb1 authored by Juhász Bálint's avatar Juhász Bálint
Browse files

linux command for def. gateway

parent 3c6eaeaa
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,8 @@ int main(int argc, char *argv[]) ...@@ -16,6 +16,8 @@ int main(int argc, char *argv[])
"route print -4 | findstr /r \"[^0-9]0\\.0\\.0\\.0\" ", "r" "route print -4 | findstr /r \"[^0-9]0\\.0\\.0\\.0\" ", "r"
); );
#elif defined ( Q_OS_LINUX ) #elif defined ( Q_OS_LINUX )
// a guess: netstat -rn | grep "^0\.0\.0\.0" | awk '{print $2}'
// w/o awk: netstat -rn | sed -rn 's/^0\.0\.0\.0\s+([^ ]+).*/\1/p'
#else #else
#error "We do not support this version." #error "We do not support this version."
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment