Add function to find the device IP address

Parse the result of "adb shell ip route" to find the device IP address.

PR #2827 <https://github.com/Genymobile/scrcpy/pull/2827>
This commit is contained in:
Romain Vimont
2021-11-25 22:11:59 +01:00
parent b7e631791c
commit f609b406c9
6 changed files with 217 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
src = [
'src/main.c',
'src/adb.c',
'src/adb_parser.c',
'src/adb_tunnel.c',
'src/cli.c',
'src/clock.c',
@@ -204,8 +205,14 @@ install_data('../data/icon.png',
# do not build tests in release (assertions would not be executed at all)
if get_option('buildtype') == 'debug'
tests = [
['test_adb_parser', [
'tests/test_adb_parser.c',
'src/adb_parser.c',
'src/util/str.c',
'src/util/strbuf.c',
]],
['test_buffer_util', [
'tests/test_buffer_util.c'
'tests/test_buffer_util.c',
]],
['test_cbuf', [
'tests/test_cbuf.c',