445
|
1 /*
|
|
2 *
|
|
3 *
|
|
4 */
|
|
5
|
|
6 #include <faim/aim.h>
|
|
7
|
|
8 u_long aim_ads_clientready(struct aim_session_t *sess,
|
|
9 struct aim_conn_t *conn)
|
|
10 {
|
|
11 struct command_tx_struct *newpacket;
|
|
12 int i;
|
|
13
|
|
14 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 0x1a)))
|
|
15 return -1;
|
|
16
|
|
17 newpacket->lock = 1;
|
|
18
|
|
19 i = aim_putsnac(newpacket->data, 0x0001, 0x0002, 0x0000, sess->snac_nextid);
|
|
20
|
|
21 i+= aimutil_put16(newpacket->data+i, 0x0001);
|
|
22 i+= aimutil_put16(newpacket->data+i, 0x0002);
|
|
23
|
|
24 i+= aimutil_put16(newpacket->data+i, 0x0001);
|
|
25 i+= aimutil_put16(newpacket->data+i, 0x0013);
|
|
26
|
|
27 i+= aimutil_put16(newpacket->data+i, 0x0005);
|
|
28 i+= aimutil_put16(newpacket->data+i, 0x0001);
|
|
29 i+= aimutil_put16(newpacket->data+i, 0x0001);
|
|
30 i+= aimutil_put16(newpacket->data+i, 0x0001);
|
|
31
|
|
32 newpacket->lock = 0;
|
|
33 aim_tx_enqueue(sess, newpacket);
|
|
34
|
|
35 return (sess->snac_nextid++);
|
|
36 }
|
|
37
|
|
38 u_long aim_ads_requestads(struct aim_session_t *sess,
|
|
39 struct aim_conn_t *conn)
|
|
40 {
|
|
41 return aim_genericreq_n(sess, conn, 0x0005, 0x0002);
|
|
42 }
|