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:
@@ -66,4 +66,13 @@ adb_disconnect(struct sc_intr *intr, const char *ip_port, unsigned flags);
|
||||
char *
|
||||
adb_get_serialno(struct sc_intr *intr, unsigned flags);
|
||||
|
||||
/**
|
||||
* Attempt to retrieve the device IP
|
||||
*
|
||||
* Return the IP as a string of the form "xxx.xxx.xxx.xxx", to be freed by the
|
||||
* caller, or NULL on error.
|
||||
*/
|
||||
char *
|
||||
adb_get_device_ip(struct sc_intr *intr, const char *serial, unsigned flags);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user