[distcc] Network protocol

Brad Hards bhards at bigpond.net.au
Wed Feb 5 11:05:55 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

G'day,

I'm working on an ethereal dissector for distcc, and it is starting to come 
together. However I have some queries.	I might have some of it wrong too. Any 
corrections appreciated.

The protocol starts off with the client (distcc application) sending DIST 
(literally), then the version number packet into 8 ascii digits.

The client then sends ARGC (literally) followed by the number of arguments, 
again packed into 8 ascii digits.Then comes the various arguments as ascii 
text where each argument is preceded by ARGV and the length as as an ascii 
encoded hex string.

Next is the liternal DOTI, followed by the length of the preprocessed C text, 
followed by the preprocessed C text itself. This normally spans more than one 
packet - the following packets just have the TCP/IP header, and the text 
continues.
Question: What does DOTI mean?

Then the volunteer (running distccd) responds.
It starts with DONE (liternally) then the version number.
Then it responds with STAT (literally), and some error code (normally zero).
Question: What do the various codes mean?

Then it sends the literal SERR (which I guess indicates the output to standard 
error), and then the length of the string (again, ascii encoded hex string), 
and the standard error message. I have seen this span multiple packets, 
although I don't currently handle this.

Then it sends the literal SOUT (which I guess indicated the output to the 
standard output stream), and the length of the string, and then the string. I 
guess that thsi can span multiple packets, but I don't handle it, nor have I 
seen it.

Then you get the literal DOTO, followed by the length of the compiled output, 
and the compiled output. This normally spans multiple packets too.
Question: What does DOTO mean?

Brad

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD4DBQE+QPAZW6pHgIdAuOMRAouVAJiDYsCb7yw7ZBEYLeY67sAXpQaKAJ0dwI6F
oBV0/JL8jPxINBjEa2ABPw==
=Znh2
-----END PGP SIGNATURE-----



More information about the distcc mailing list