packet type:	215 / 0xd7 / YMSG_YPHOTO_PREV

when sending a file, sender send this packet:

	packet type:	215 / 0xd7

		1	sender id
		5	receiver
		245	filekey
		246	filename
		20	<empty>
		267	preview

	PACKET STATUS is 0 (0x0).

    BUT receiver gets this:

	packet type:	215 / 0xd7

		0	sender id
		4	sender id
		5	receiver
		140	1
		245	filekey
		246	filename
		267	preview
		10093	4

	PACKET STATUS is 1 (0x1).

file receiver acknowledges by sending this packet:

	packet type:	215 / 0xd7

		1	our id (receiver id)
		5	buddy id (sender id)
		245	filekey

	PACKET STATUS is 18 (0x12).


    BUT sender receives this:

	packet type:	215 / 0xd7

		0	sender id
		4	sender id
		5	receiver
		140	1
		245	filekey
		10093	4
		
	PACKET STATUS is 18 (0x12).

=========================================

packet type:	216 / 0xd8 / YMSG_YPHOTO_KEY

packet 216/0xd8 contains sequence position information.
It is sent whenever a photo is selected, including whenever
a photo is added to the list.
(the sequence number is the 194 field, but I have noticed that
this number seems to always be increasing. This *MIGHT* be an
indication of how many times photos were viewed. Aggregate, not
individually per photo.)

Clicking on a photo, or using the <-  or -> navagation keys will
result in a 216 packet being sent.

It appears that when the 1st photo is sent, BOTH a "0" and a "1"
sequence packet is sent. At all other times, just ONE 216 packet
is sent, with the new sequence number in it.

The purpose of the 216 packet appears to be to know what your buddy is
looking at, and to let your buddy know what you are looking at.

The 216 photo key packet looks like this:

    sender send this packet:

	 packet type:	216 / 0xd8

		1	sender id
		5	buddy id
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		194	#

	PACKET STATUS is 0 (0x0).

    BUT buddy receives this:

	 packet type:	216 / 0xd8

		0	buddy id
		4	buddy id
		5	our id
		140	1
		194	#
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		10093	4

	PACKET STATUS is 1 (0x1).

The 194 field might be a selection #, but more and more it looks like a counter.

IN ADDITION... When the GUI starts, and the FIRST FILE IS SENT, sender will
ALSO send a packet with 194 of 0 (as well as a 2nd 216 packet with 194 of 1)

=========================================

packet type:	217 / 0xd9 / YMSG_YPHOTO_REMOVE

    sender sends:

	packet type:	217 / 0xd9

		1	sender id
		5	receiver id
		245	filekey

    receiver receives:

	packet type:	217 / 0xd9

		0	sender id
		4	sender id
		5	receiver id
		140	1
		245	filekey
		10093	4

    sender (the one that performed the removal) will
    immediately follow up with a 216 packet of their
    new position...

    if other side ends up switching images (because they
    were, e.g., sitting on the one that got deleted), then
    they will also send a 216 packet of their new position.

=========================================

packet type:	218 / 0xda / YMSG_YPHOTO_TRANS (file exchange info)

Receiver initiates this transaction:

    receiver sends:
	       
		1	our id
		5	sender id
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		248	2
		249	3
		250	<empty string>
		253	<empty string>

	PACKET STATUS is 0 (0x0).

    sender will see this:

		0	buddy id
		1	buddy id
		4	buddy id
		5	our id
		32	1
		140	1
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		248	2
		249	3
		251	file token
		10093	4

	PACKET STATUS is 1 (0x1).

sender will then reply with this::

	 packet type:	218 / 0xda

		1	our id
		5	buddy id
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		251	file token. e.g. KX.srexgWDBVFTWu9gMQEA--T5q9X0dqKJ9ZbQIBCNWVpHW098A4I4X1w_aIFoqJn4Dd4GmlhSImmTlweu2eYh5bov.FP54-
		248	2
		249	3
		250	ip address of the relay host (e.g. 66.94.230.122)
		28	130800	(the file size)
		276	<empty>
		253	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw-- (SAME AS 245)

	PACKET STATUS is 18 (0x12).

   and the file receiver sees this reply:

		0	buddy id
		1	buddy id
		4	buddy id
		5	our id
		28	130800	(the file size)
		32	18
		140	1
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		248	2
		249	3
		250	ip address of the relay host (e.g. 66.94.230.122)
		251	file token. e.g. KX.srexgWDBVFTWu9gMQEA--T5q9X0dqKJ9ZbQIBCNWVpHW098A4I4X1w_aIFoqJn4Dd4GmlhSImmTlweu2eYh5bov.FP54-
		253	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw-- (SAME AS 245)
		276	another token (this token doesn't seem to be used any place)
		10093	4

	PACKET STATUS is 18 (0x12).

=========================================

relay1.msg.scd.yahoo.com:	66.94.230.122

FILE RECEIVER talks to relay host (immediately after a 218 packet):

receiver send http to RELAY HOST IP (NOTE: <FILE TOKEN> is field 251 token)

	 HEAD /relay?token=<FILE TOKEN>&sender=<SENDER ID>&recver=<OUR ID> HTTP/1.1
	 Accept: */*
	 Cookie: <OUR COOKIE>
	 User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)
	 Host: <IP OF RELAY HOST>
	 Content-Length: 0
	 Cache-Control: no-cache

receiver gets response:

	 \r\n
	 HTTP/1.0 200 OK
	 Server: YHttpServer
	 Active: %d
	 Total: %d
	 Content-Length: 0
	 Connection: close\r\n

receiver sends http to RELAY HOST IP: (NOTE: <FILE TOKEN> is field 251 token)

	 GET /relay?token=<FILE TOKEN>&sender=<SENDER ID>&recver=<OUR ID> HTTP/1.1
	 Cookie: <our cookie>
	 User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)
	 Host: <relay host ip>
	 Connection: Keep-Alive\r\n\r\n

receiver gets http header, and then file:

	 HTTP/1.0 200
	 Server: YHttpServer
	 Content-Type: text/html
	 Content-Length: 130800
	 Date: Thu, 24 Jan 2008 14:27:40 GMT
	 Connection: Keep-Alive\r\n\r\n
	 <FILE IMMEDIATELY FOLLOWS>

=========================================

FILE SENDER talks to relay host (immediately after a 218 packet):
	       
We send a http POST
	POST /relay?token=<file token>&sender=<our id>&recver=<buddy id> HTTP/1.1
	Referer: our hostname
	Cookie: <our cookie>
	User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)
	Host: 66.94.230.122
	Content-Length: 68000
	Cache-Control: no-cache\r\n\r\n

	IMMEDIATELY FOLLOWED BY THE FILE

We get a http reply back:

	HTTP/1.0 200
	Server: YHttpServer
	Content-Type: text/html
	Content-Length: 68000
	Date: Thu, 24 Jan 2008 14:17:42 GMT
	Connection: Keep-Alive


=========================================

packet type:	219 / 0xdb / YMSG_YPHOTO_POINTER

Turn pointer on at coordinate

    Sender sends:

		1	our id
		5	sender id
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		272	X coordinate (upper left is 0,0)
		273	Y coordinate
		13	1
		194	## (a sequential counter)

    Receiver will see:

		0	buddy id
		1	buddy id
		4	buddy id
		5	our id
		13	1
		32	1 (status)
		140	1
		194	## (a sequential counter, to be ignored)
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		272	X coordinant (upper left is 0,0)
		273	Y coordinant
		10093	4


Turn pointer off at coordinate

    Sender sends:

		1	our id
		5	sender id
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		272	X coordinate (upper left is 0,0)
		273	Y coordinate
		13	0
		194	## (a sequential counter)

    Receiver will see:

		0	buddy id
		1	buddy id
		4	buddy id
		5	our id
		13	0
		32	1 (status)
		140	1
		194	## (a sequential counter, to be ignored)
		245	file handle. e.g. BFuArmUZ5YSh8g8jlrZHhw--
		272	X coordinant (upper left is 0,0)
		273	Y coordinant
		10093	4


