1*795d594fSAndroid Build Coastguard Worker# dt_fd_forward 2*795d594fSAndroid Build Coastguard Worker 3*795d594fSAndroid Build Coastguard Workerdt_fd_forward is a jdwpTransport library. It implements the [Java Debug Wire 4*795d594fSAndroid Build Coastguard WorkerProtocol Transport Interface 5*795d594fSAndroid Build Coastguard Worker(jdwpTransport)](https://docs.oracle.com/javase/7/docs/technotes/guides/jpda/jdwpTransport.html). 6*795d594fSAndroid Build Coastguard WorkerIt allows one to handle and proxy JDWP traffic by supplying the implementation 7*795d594fSAndroid Build Coastguard Workerfor Attach. This transport requires an address. The address is a single integer 8*795d594fSAndroid Build Coastguard Workervalue that is the file-descriptor of an open AF\_UNIX socket. 9*795d594fSAndroid Build Coastguard Worker 10*795d594fSAndroid Build Coastguard WorkerWhen this transport begins listening or attaching it will send the 11*795d594fSAndroid Build Coastguard Workernull-terminated string "dt_fd_forward:START-LISTEN\0" over the given socket. 12*795d594fSAndroid Build Coastguard Worker 13*795d594fSAndroid Build Coastguard WorkerWhen this transport stops listening for connections it will send the 14*795d594fSAndroid Build Coastguard Workernull-terminated string "dt_fd_forward:END-LISTEN\0" over the socket. 15*795d594fSAndroid Build Coastguard Worker 16*795d594fSAndroid Build Coastguard WorkerWhen this transport has successfully received fds from the proxy it sends the 17*795d594fSAndroid Build Coastguard Workermessage "dt_fd_forward:ATTACHED\0" over the socket. 18*795d594fSAndroid Build Coastguard Worker 19*795d594fSAndroid Build Coastguard WorkerWhen this transport has closed its copies of the fds it will send the proxy the 20*795d594fSAndroid Build Coastguard Workermessage "dt_fd_forward:CLOSING\0" over the socket. 21*795d594fSAndroid Build Coastguard Worker 22*795d594fSAndroid Build Coastguard WorkerWhen this transport accepts or attaches to a connection it will read from the 23*795d594fSAndroid Build Coastguard Workersocket a 1 byte message and 3 file-descriptors. The file descriptors are, in 24*795d594fSAndroid Build Coastguard Workerorder, an fd that will be read from to get incoming JDWP packets (read\_fd\_), 25*795d594fSAndroid Build Coastguard Workeran fd that outgoing JDWP packets will be written to (write\_fd\_), and an 26*795d594fSAndroid Build Coastguard Worker_eventfd_ (write\_lock\_fd\_). The eventfd should not have any flags set. Prior 27*795d594fSAndroid Build Coastguard Workerto writing any data to write\_fd\_ the transport will _read_ from the 28*795d594fSAndroid Build Coastguard Workerwrite\_lock\_fd\_ and after finishing the write it will _write_ to it. This 29*795d594fSAndroid Build Coastguard Workerallows one to safely multiplex data on the write\_fd\_. 30*795d594fSAndroid Build Coastguard Worker 31*795d594fSAndroid Build Coastguard WorkerThis transport implements no optional capabilities, though this may change in 32*795d594fSAndroid Build Coastguard Workerthe future. 33