libpurple/protocols/qq/packet_parse.h

changeset 23950
a974649cdb89
parent 23193
384ba35bfa8f
child 23959
586238415076
equal deleted inserted replaced
23949:9ec519c1b341 23950:a974649cdb89
35 * 35 *
36 * TCP allows packet 64K 36 * TCP allows packet 64K
37 */ 37 */
38 #define MAX_PACKET_SIZE 65535 38 #define MAX_PACKET_SIZE 65535
39 39
40 #include <netinet/in.h>
41
40 gint qq_get8(guint8 *b, guint8 *buf); 42 gint qq_get8(guint8 *b, guint8 *buf);
41 gint qq_get16(guint16 *w, guint8 *buf); 43 gint qq_get16(guint16 *w, guint8 *buf);
42 gint qq_get32(guint32 *dw, guint8 *buf); 44 gint qq_get32(guint32 *dw, guint8 *buf);
45 gint qq_getIP(struct in_addr *ip, guint8 *buf);
43 gint qq_getime(time_t *t, guint8 *buf); 46 gint qq_getime(time_t *t, guint8 *buf);
44 gint qq_getdata(guint8 *data, gint datalen, guint8 *buf); 47 gint qq_getdata(guint8 *data, gint datalen, guint8 *buf);
45 48
46 gint qq_put8(guint8 *buf, guint8 b); 49 gint qq_put8(guint8 *buf, guint8 b);
47 gint qq_put16(guint8 *buf, guint16 w); 50 gint qq_put16(guint8 *buf, guint16 w);
48 gint qq_put32(guint8 *buf, guint32 dw); 51 gint qq_put32(guint8 *buf, guint32 dw);
52 gint qq_putIP(guint8* buf, struct in_addr *ip);
49 gint qq_putdata(guint8 *buf, const guint8 *data, const int datalen); 53 gint qq_putdata(guint8 *buf, const guint8 *data, const int datalen);
50 54
51 /* 55 /*
52 gint read_packet_b(guint8 *buf, guint8 **cursor, gint buflen, guint8 *b); 56 gint read_packet_b(guint8 *buf, guint8 **cursor, gint buflen, guint8 *b);
53 gint read_packet_w(guint8 *buf, guint8 **cursor, gint buflen, guint16 *w); 57 gint read_packet_w(guint8 *buf, guint8 **cursor, gint buflen, guint16 *w);

mercurial