Take look at the Minimum Operational Performance Standards for TCAS II. This document defines the TCAS message formats.
The document can be obtained through RTCA as document DO-185,latest revision is DO-185B, change 2. Or through EUROCAE as document ED-143.
Mode S is defined in RTCA DO-181 (E)/ EUROCAE ED- 73 (E), latest revision is
ADS-B is defined in RTCA DO-260 (B) / EUROCAE ED-102 (A)