Some places containing information about the Quake network protocol. If you know of any others, please let me know.
I don't know of any published information on the QW or Q2 protocol, nor have I written any myself.
Of course, you can always read the QStat code to figure out how things work.