]> andersk Git - libfaim.git/blame - utils/aimdebugd/README
- Sun Oct 14 19:45:54 PDT 2001
[libfaim.git] / utils / aimdebugd / README
CommitLineData
e5012450 1
2aimdebugd. Slightly ambiguous name. Basically, its a
3micro-aim-server thats meant to be hacked. Its completely useless the
4way it is, but it does let you poke and prod at clients while they're
5in their main loop. It won't help for debugging the login process,
6but it will allow you to test various ICBM types, etc -- anything you
7want to implement packet handlers and transmitters for.
8
9How to make your client work with aimdebugd
10-------------------------------------------
11 1. Create a handler for the debug connection SNAC like this:
12
13int debugconn_connect_handler(struct aim_session_t *sess, struct command_rx_struct *command, ...) {
14
15 printf("connecting to an aimdebugd!\n");
16
17 /* convert the authorizer connection to a BOS connection */
18 command->conn->type = AIM_CONN_TYPE_BOS;
19
20 /* You may want to add some of your BOS callbacks here */
21
22 /* tell the aimdebugd we're ready */
23 aim_debugconn_sendconnect(sess, command->conn);
24
25 /* go right into main loop (don't open a BOS connection, etc) */
26 return 1;
27}
28
29 2. Connect the handler to your authorizer connection before
30 calling aim_send_login() or aim_select():
31
32 ...
33 aim_conn_addhandler(sess, authconn, AIM_CB_FAM_SPECIAL,
34 AIM_CB_SPECIAL_DEBUGCONN_CONNECT,
35 debugconn_connect_handler, 0);
36 ...
37
38 3. Start your client with the authorizer host set to the box
39 running the aimddebugd.
40
41
42Writing Halfscripts
43-------------------
44
45Some hacking of aimdebugd can be done without writing any C. But it
46its write-only.
47
48Once aimdebugd gets the acknowledgment from the client, it can begin
49to run through a file (passed through a command line) that contains a
50listing of excruciatingly simple "commands" and react to it. The
51commandset is very small, and, as mentioned above, is write-only --
52its not event driven. The list of commands is executed linearly and
53does not stop until it hits the break command, hits the end of the
54file, hits the disconnect command, or the connection to the client
55dies.
56
57Commands:
58 # -- Comment
59 b -- Breaks execution, leaves connection open
60 d -- Disconnects from client (results in connection termination)
61 e <msg> -- Prints msg to stderr
62 m <srcsn>/<msg> -- Sends msg from srcsn to the client
63 s <seconds> -- Sleeps for an arbitrary number of seconds
64
65Note that the client must have callbacks connected to the appropriate
66handlers if it wants to react to any of the output from these commands
67(except 'e', thats just there).
68
69
70
This page took 0.076999 seconds and 5 git commands to generate.