1 /* 2 * This file describes the structures passed back and forth 3 * between the API client and API server on a Unix-based 4 * tn3270 implementation. 5 * 6 * A command is: <command code> <sequence number> <parameter>* 7 * 8 */ 9 10 11 #define EXCH_ASSOCIATE 23 /* Connect [client->server] */ 12 #define EXCH_DISASSOCIATE 39 /* Disconnect [client->server] */ 13 #define EXCH_SEND_AUTH 44 /* Send password [server->client] */ 14 /* 15 * struct storeage_desc 16 * char prompt[] 17 * struct storeage_desc 18 * char seed[] 19 */ 20 #define EXCH_AUTH 65 /* Authorization [client->server] */ 21 /* 22 * struct storeage_desc 23 * char authenticator[] 24 */ 25 #define EXCH_ASSOCIATED 78 /* Connected [server->client] */ 26 #define EXCH_REJECTED 93 /* Too bad [server->client] */ 27 /* 28 * struct storeage_desc 29 * char message[] 30 */ 31 32 #define EXCH_REQUEST 19 /* A request [client->server] */ 33 /* struct regs, 34 * struct sregs, 35 * struct storage_desc 36 * char bytes[] 37 */ 38 #define EXCH_GIMME 20 /* Send storage [server->client] */ 39 /* 40 * struct storage_desc 41 */ 42 #define EXCH_HEREIS 49 /* Here is storage [BOTH WAYS] */ 43 /* 44 * struct storage_desc 45 * char bytes[] 46 */ 47 #define EXCH_REPLY 87 /* End of discussion */ 48 /* 49 * struct regs, 50 * struct sregs, 51 */ 52 53 #define EXCH_TYPE_REGS 13 54 #define EXCH_TYPE_SREGS 27 55 #define EXCH_TYPE_STORE_DESC 33 56 #define EXCH_TYPE_BYTES 67 57 58 /* 59 * each parameter that comes over looks like: 60 * 61 * char type of following 62 * short (2 bytes) length of following (network byte order) 63 * following 64 */ 65 66 struct storage_descriptor { 67 long location; /* In network byte order */ 68 short length; /* In network byte order */ 69 }; 70