OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / user / arj / arjcrypt.h
1 /*
2  * $Id: arjcrypt.h,v 1.1.1.1 2002/03/28 00:01:13 andrew_belov Exp $
3  * ---------------------------------------------------------------------------
4  * All defines regarding ARJCRYPT operations are stored in this file
5  *
6  */
7
8 #ifndef ARJCRYPT_INCLUDED
9 #define ARJCRYPT_INCLUDED
10
11 /* Signature for identifying ARJCRYPT modules */
12
13 #define ARJCRYPT_SIG "Signature to search"
14
15 /* ARJCRYPT operation modes */
16
17 #define ARJCRYPT_V2_INIT           0
18 #define ARJCRYPT_INIT              1
19 #define ARJCRYPT_ENCODE            2
20 #define ARJCRYPT_DECODE            3
21 #define ARJCRYPT_CIPHER            4
22 #define ARJCRYPT_DECIPHER          5
23
24 /* ARJCRYPT return codes */
25
26 #define ARJCRYPT_RC_OK             0
27 #define ARJCRYPT_RC_INITIALIZED    2
28 #define ARJCRYPT_RC_INIT_V2        3
29 #define ARJCRYPT_RC_ERROR         -1
30
31 /* Inquiry types */
32
33 #define ARJCRYPT_INQ_INIT          1    /* Initialization request */
34 #define ARJCRYPT_INQ_RSP           2    /* Initialization response */
35
36 #pragma pack(1)
37
38 /* Structure of exchange block */
39
40 struct arjcrypt_exblock
41 {
42  int mode;
43  int len;
44  char FAR *data;
45  char FAR *password;
46  unsigned long l_modifier[2];
47  int rc;
48  int (FAR *ret_addr)();
49  int inq_type;                          /* ARJCRYPT v 2.0+ */
50  int flags;                             /* ARJCRYPT v 2.0+ */
51 };
52
53 #pragma pack()
54
55 #endif