cpw.masca.p2p: 941c9038: Add some constants used by P2Pv2.

masca at cpw.pidgin.im masca at cpw.pidgin.im
Wed Dec 15 01:22:04 EST 2010


----------------------------------------------------------------------
Revision: 941c9038bb0859c618dd334ada00158485678d24
Parent:   c1ba1070ea1b0fc82772aacc38d3158e1dcd2f2e
Author:   masca at cpw.pidgin.im
Date:     12/15/10 01:17:36
Branch:   im.pidgin.cpw.masca.p2p
URL: http://d.pidgin.im/viewmtn/revision/info/941c9038bb0859c618dd334ada00158485678d24

Changelog: 

Add some constants used by P2Pv2.

Changes against parent c1ba1070ea1b0fc82772aacc38d3158e1dcd2f2e

  patched  libpurple/protocols/msn/p2p.h

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/p2p.h	32d9aa05d7b1837e535ae3240efc6d7375501fb6
+++ libpurple/protocols/msn/p2p.h	341e160e5bcacfc6e59dad95dc692f96aa50d49f
@@ -56,6 +56,37 @@ typedef struct {
 } MsnP2Pv2Header;
 #pragma pack(pop)
 
+typedef enum
+{
+	OP_NONE		= 0x00; 		/**< None, Nothing required. */
+	OP_SYN		= 0x01; 		/**< SYN, just like TCP. */
+	OP_RAK 		= 0x02; 		/**< Request for Ack. */
+} OpCode
+
+typedef enum
+{
+	TF_FIRST 	= 0x01; 	/**< The first package. */
+	TF_OBJ 		= 0x04; 	/**< Payload contains binary data for MsnObject. */
+	TF_FILE 	= 0x06; 	/**< Payload contains binary data. */
+} TF;
+
+typedef enum
+{
+	TLP_PEER_INFO 	= 0x01; 	/**< Client peer info */
+	TLP_ACK 		= 0x02; 	/**< ACK */
+	TLP_NAK 		= 0x03; 	/**< NAK */
+} TLP;
+
+typedef enum
+{
+	TLP_LEN_PEER_INFO 	= 12;
+	TLP_LEN_ACK 		= 4;
+	TLP_LEN_NAK 		= 4;
+} TLPLength;
+
+#define DLP_REMAINING 0x01; 	/**< Indicates the remaining data to transfer.*/
+#define DLP_REMAINING_LEN 8
+
 typedef struct
 {
 	guint32 value;


More information about the Commits mailing list