aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_linux.h
diff options
context:
space:
mode:
authorKris Alder <kalder@google.com>2022-04-08 14:06:21 -0700
committerAleksandr Nogikh <wp32pw@gmail.com>2022-04-12 19:32:41 +0200
commit87d46b64e1389c842869fae9199221565d6f65d2 (patch)
tree8030113f01a1db5af4ec3181dd003358f0a7436e /executor/common_linux.h
parentdacb3f1c44e9c527b8bb595e3b37a43ca7733cc0 (diff)
vm/cuttlefish: implement forward function
We need to tunnel ports from the Manager instance all the way through to the virtual device. We do this by tunneling from the Manager to the worker GCE instance using 'socat' on the worker instance and 'adb reverse' to forward the port on the device. We need the 'socat' process to keep running for the tunnel to stay open. We can check for an error on launch, but to check if the process is still running we send it a zero signal after waiting an appropriate amount of time. The 'adb reverse' command, by comparison returns immediately after the connection is established and keeps the tunnel open. We loop until we find a valid/available port, similar to what is done in vm/adb/adb.go. In practice, this nearly always finds a valid port on the first attempt.
Diffstat (limited to 'executor/common_linux.h')
0 files changed, 0 insertions, 0 deletions