File indexing completed on 2025-01-30 10:25:06
0001
0002
0003
0004
0005
0006 #ifndef _CRYPT_H_RPCGEN
0007 #define _CRYPT_H_RPCGEN
0008
0009 #include <rpc/rpc.h>
0010
0011 #ifndef IXDR_GET_INT32
0012 #define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf))
0013 #endif
0014 #ifndef IXDR_PUT_INT32
0015 #define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v))
0016 #endif
0017 #ifndef IXDR_GET_U_INT32
0018 #define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf))
0019 #endif
0020 #ifndef IXDR_PUT_U_INT32
0021 #define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v))
0022 #endif
0023
0024 enum des_dir {
0025 ENCRYPT_DES = 0,
0026 DECRYPT_DES = 1,
0027 };
0028 typedef enum des_dir des_dir;
0029 #ifdef __cplusplus
0030 extern "C" bool_t xdr_des_dir(XDR *, des_dir*);
0031 #elif __STDC__
0032 extern bool_t xdr_des_dir(XDR *, des_dir*);
0033 #else
0034 bool_t xdr_des_dir();
0035 #endif
0036
0037
0038 enum des_mode {
0039 CBC_DES = 0,
0040 ECB_DES = 1,
0041 };
0042 typedef enum des_mode des_mode;
0043 #ifdef __cplusplus
0044 extern "C" bool_t xdr_des_mode(XDR *, des_mode*);
0045 #elif __STDC__
0046 extern bool_t xdr_des_mode(XDR *, des_mode*);
0047 #else
0048 bool_t xdr_des_mode();
0049 #endif
0050
0051
0052 struct desargs {
0053 u_char des_key[8];
0054 des_dir des_dir;
0055 des_mode des_mode;
0056 u_char des_ivec[8];
0057 struct {
0058 u_int desbuf_len;
0059 char *desbuf_val;
0060 } desbuf;
0061 };
0062 typedef struct desargs desargs;
0063 #ifdef __cplusplus
0064 extern "C" bool_t xdr_desargs(XDR *, desargs*);
0065 #elif __STDC__
0066 extern bool_t xdr_desargs(XDR *, desargs*);
0067 #else
0068 bool_t xdr_desargs();
0069 #endif
0070
0071
0072 struct desresp {
0073 struct {
0074 u_int desbuf_len;
0075 char *desbuf_val;
0076 } desbuf;
0077 u_char des_ivec[8];
0078 int stat;
0079 };
0080 typedef struct desresp desresp;
0081 #ifdef __cplusplus
0082 extern "C" bool_t xdr_desresp(XDR *, desresp*);
0083 #elif __STDC__
0084 extern bool_t xdr_desresp(XDR *, desresp*);
0085 #else
0086 bool_t xdr_desresp();
0087 #endif
0088
0089
0090 #define CRYPT_PROG ((u_int32_t)600100029)
0091 #define CRYPT_VERS ((u_int32_t)1)
0092
0093 #ifdef __cplusplus
0094 #define DES_CRYPT ((u_int32_t)1)
0095 extern "C" desresp * des_crypt_1(desargs *, CLIENT *);
0096 extern "C" desresp * des_crypt_1_svc(desargs *, struct svc_req *);
0097
0098 #elif __STDC__
0099 #define DES_CRYPT ((u_int32_t)1)
0100 extern desresp * des_crypt_1(desargs *, CLIENT *);
0101 extern desresp * des_crypt_1_svc(desargs *, struct svc_req *);
0102
0103 #else
0104 #define DES_CRYPT ((u_int32_t)1)
0105 extern desresp * des_crypt_1();
0106 extern desresp * des_crypt_1_svc();
0107 #endif
0108
0109 #endif