| 6 */ |
6 */ |
| 7 |
7 |
| 8 #include <faim/aim.h> |
8 #include <faim/aim.h> |
| 9 |
9 |
| 10 /* this just pushes the passed cookie onto the passed connection -- NO SNAC! */ |
10 /* this just pushes the passed cookie onto the passed connection -- NO SNAC! */ |
| 11 int aim_auth_sendcookie(struct aim_session_t *sess, |
11 faim_export int aim_auth_sendcookie(struct aim_session_t *sess, |
| 12 struct aim_conn_t *conn, |
12 struct aim_conn_t *conn, |
| 13 u_char *chipsahoy) |
13 unsigned char *chipsahoy) |
| 14 { |
14 { |
| 15 struct command_tx_struct *newpacket; |
15 struct command_tx_struct *newpacket; |
| 16 int curbyte=0; |
16 int curbyte=0; |
| 17 |
17 |
| 18 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0001, conn, 4+2+2+AIM_COOKIELEN))) |
18 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0001, conn, 4+2+2+AIM_COOKIELEN))) |
| 27 memcpy(newpacket->data+curbyte, chipsahoy, AIM_COOKIELEN); |
27 memcpy(newpacket->data+curbyte, chipsahoy, AIM_COOKIELEN); |
| 28 |
28 |
| 29 return aim_tx_enqueue(sess, newpacket); |
29 return aim_tx_enqueue(sess, newpacket); |
| 30 } |
30 } |
| 31 |
31 |
| 32 u_long aim_auth_clientready(struct aim_session_t *sess, |
32 faim_export unsigned long aim_auth_clientready(struct aim_session_t *sess, |
| 33 struct aim_conn_t *conn) |
33 struct aim_conn_t *conn) |
| 34 { |
34 { |
| 35 struct command_tx_struct *newpacket; |
35 struct command_tx_struct *newpacket; |
| 36 int curbyte = 0; |
36 int curbyte = 0; |
| 37 |
37 |
| 38 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 26))) |
38 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 26))) |
| 66 } |
66 } |
| 67 |
67 |
| 68 return (sess->snac_nextid++); |
68 return (sess->snac_nextid++); |
| 69 } |
69 } |
| 70 |
70 |
| 71 u_long aim_auth_changepasswd(struct aim_session_t *sess, |
71 faim_export unsigned long aim_auth_changepasswd(struct aim_session_t *sess, |
| 72 struct aim_conn_t *conn, |
72 struct aim_conn_t *conn, |
| 73 char *new, char *current) |
73 char *new, char *current) |
| 74 { |
74 { |
| 75 struct command_tx_struct *newpacket; |
75 struct command_tx_struct *newpacket; |
| 76 int i; |
76 int i; |
| 77 |
77 |
| 78 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10+4+strlen(current)+4+strlen(new)))) |
78 if (!(newpacket = aim_tx_new(AIM_FRAMETYPE_OSCAR, 0x0002, conn, 10+4+strlen(current)+4+strlen(new)))) |