Protocols/YMSG/Packet Structure
All Yahoo! communications use TCP over IP communication and the Yahoo! data resides in the data field of the TCP packet as shown in the figure below.
Yahoo! extends the common TCP/IP convention of using headers by creating its own application level header format. A Yahoo! header is 20 bytes long and is identified by the first 4 bytes being “YMSG.” The Yahoo! header also includes the YMSG version, message length, service type, status, and session ID. The figure below shows a graphical representation of the Yahoo! header and data.
The data portion of a Yahoo! packet also has a structure. Immediately following the session ID, the data starts in the form of FIELD ID, FIELD SEPERATOR, FIELD DATA, FIELD SEPARATOR, …, FIELD SEPARATOR. The field ID is represented as an ASCII integer that may consist of several characters. The Yahoo! field separator is the hexadecimal sequence of C0 80. The figure below shows a typical Yahoo! data field structure.
Throughout this wiki a short hand representation of a Yahoo! packet will be used as shown below. The top of the figure contains the service type reference and the top right header shows the direction of communication.