30763
|
1 #ifndef MSN_P2P_H
|
|
2 #define MSN_P2P_H
|
|
3
|
|
4 #include "msg.h"
|
|
5
|
|
6 #pragma pack(push,1)
|
|
7 typedef struct {
|
|
8 guint32 session_id;
|
|
9 guint32 seq_id;
|
|
10 guint64 offset;
|
|
11 guint64 total_size;
|
|
12 guint32 length;
|
|
13 guint32 flags;
|
|
14 guint32 ack_id;
|
|
15 guint32 ack_uid;
|
|
16 guint64 ack_size;
|
|
17 /* guint8 body[1]; */
|
|
18 } MsnP2PBinaryHeader;
|
|
19 #pragma pack(pop)
|
|
20
|
|
21 typedef enum
|
|
22 {
|
|
23 P2P_NO_FLAG = 0x0, /**< No flags specified */
|
|
24 P2P_OUT_OF_ORDER = 0x1, /**< Chunk out-of-order */
|
|
25 P2P_ACK = 0x2, /**< Acknowledgement */
|
|
26 P2P_PENDING_INVITE = 0x4, /**< There is a pending invite */
|
|
27 P2P_BINARY_ERROR = 0x8, /**< Error on the binary level */
|
|
28 P2P_MSN_OBJ_DATA = 0x20, /**< MsnObject data */
|
|
29 P2P_WML2009_COMP = 0x1000000, /**< Compatibility with WLM 2009 */
|
|
30 P2P_FILE_DATA = 0x1000030 /**< File transfer data */
|
|
31 } MsnP2PHeaderFlag;
|
|
32 /* Info From:
|
|
33 * http://msnpiki.msnfanatic.com/index.php/MSNC:P2Pv1_Headers#Flags
|
|
34 * http://trac.kmess.org/changeset/ba04d0c825769d23370511031c47f6be75fe9b86
|
|
35 * #7180
|
|
36 */
|
|
37
|
|
38 #define P2P_PACKET_HEADER_SIZE sizeof(MsnP2PBinaryHeader)
|
|
39
|
|
40
|
|
41 #endif /* MSN_P2P_H */
|