#ifndef _ALGORITHM_H
#define _ALGORITHM_H
-#include <gnuc.h>
#include "Algorithm_types.h"
char *name;
int type;
int doi;
- caddr_t (*init) __P((vchar_t *));
- void (*update) __P((caddr_t, vchar_t *));
- vchar_t *(*final) __P((caddr_t));
- int (*hashlen) __P((void));
- vchar_t *(*one) __P((vchar_t *, vchar_t *));
+ caddr_t (*init) (vchar_t *);
+ void (*update) (caddr_t, vchar_t *);
+ vchar_t *(*final) (caddr_t);
+ int (*hashlen) (void);
+ vchar_t *(*one) (vchar_t *, vchar_t *);
};
struct hash_algorithm {
char *name;
int type;
int doi;
- caddr_t (*init) __P((void));
- void (*update) __P((caddr_t, vchar_t *));
- vchar_t *(*final) __P((caddr_t));
- int (*hashlen) __P((void));
- vchar_t *(*one) __P((vchar_t *));
+ caddr_t (*init) (void);
+ void (*update) (caddr_t, vchar_t *);
+ vchar_t *(*final) (caddr_t);
+ int (*hashlen) (void);
+ vchar_t *(*one) (vchar_t *);
};
struct enc_algorithm {
int type;
int doi;
int blocklen;
- vchar_t *(*encrypt) __P((vchar_t *, vchar_t *, vchar_t *));
- vchar_t *(*decrypt) __P((vchar_t *, vchar_t *, vchar_t *));
- int (*weakkey) __P((vchar_t *));
- int (*keylen) __P((int));
+ vchar_t *(*encrypt) (vchar_t *, vchar_t *, vchar_t *);
+ vchar_t *(*decrypt) (vchar_t *, vchar_t *, vchar_t *);
+ int (*weakkey) (vchar_t *);
+ int (*keylen) (int);
};
/* dh group */
int doi;
};
-extern int alg_oakley_hashdef_ok __P((int));
-extern int alg_oakley_hashdef_doi __P((int));
-extern int alg_oakley_hashdef_hashlen __P((int));
-extern vchar_t *alg_oakley_hashdef_one __P((int, vchar_t *));
+extern int alg_oakley_hashdef_ok (int);
+extern int alg_oakley_hashdef_doi (int);
+extern int alg_oakley_hashdef_hashlen (int);
+extern vchar_t *alg_oakley_hashdef_one (int, vchar_t *);
-extern int alg_oakley_hmacdef_doi __P((int));
-extern vchar_t *alg_oakley_hmacdef_one __P((int, vchar_t *, vchar_t *));
+extern int alg_oakley_hmacdef_doi (int);
+extern vchar_t *alg_oakley_hmacdef_one (int, vchar_t *, vchar_t *);
-extern int alg_oakley_encdef_ok __P((int));
-extern int alg_oakley_encdef_doi __P((int));
-extern int alg_oakley_encdef_keylen __P((int, int));
-extern int alg_oakley_encdef_blocklen __P((int));
-extern vchar_t *alg_oakley_encdef_decrypt __P((int, vchar_t *, vchar_t *, vchar_t *));
-extern vchar_t *alg_oakley_encdef_encrypt __P((int, vchar_t *, vchar_t *, vchar_t *));
+extern int alg_oakley_encdef_ok (int);
+extern int alg_oakley_encdef_doi (int);
+extern int alg_oakley_encdef_keylen (int, int);
+extern int alg_oakley_encdef_blocklen (int);
+extern vchar_t *alg_oakley_encdef_decrypt (int, vchar_t *, vchar_t *, vchar_t *);
+extern vchar_t *alg_oakley_encdef_encrypt (int, vchar_t *, vchar_t *, vchar_t *);
-extern int alg_ipsec_encdef_doi __P((int));
-extern int alg_ipsec_encdef_keylen __P((int, int));
+extern int alg_ipsec_encdef_doi (int);
+extern int alg_ipsec_encdef_keylen (int, int);
-extern int alg_ipsec_hmacdef_doi __P((int));
-extern int alg_ipsec_hmacdef_hashlen __P((int));
+extern int alg_ipsec_hmacdef_doi (int);
+extern int alg_ipsec_hmacdef_hashlen (int);
-extern int alg_ipsec_compdef_doi __P((int));
+extern int alg_ipsec_compdef_doi (int);
-extern int alg_oakley_dhdef_doi __P((int));
-extern int alg_oakley_dhdef_ok __P((int));
-extern struct dhgroup *alg_oakley_dhdef_group __P((int));
+extern int alg_oakley_dhdef_doi (int);
+extern int alg_oakley_dhdef_ok (int);
+extern struct dhgroup *alg_oakley_dhdef_group (int);
-extern int alg_oakley_authdef_doi __P((int));
+extern int alg_oakley_authdef_doi (int);
-extern int default_keylen __P((int, int));
-extern int check_keylen __P((int, int, int));
-extern int algtype2doi __P((int, int));
-extern int algclass2doi __P((int));
+extern int default_keylen (int, int);
+extern int check_keylen (int, int, int);
+extern int algtype2doi (int, int);
+extern int algclass2doi (int);
+
+extern const char *alg_oakley_encdef_name (int);
+extern const char *alg_oakley_hashdef_name (int);
+extern const char *alg_oakley_dhdef_name (int);
+extern const char *alg_oakley_authdef_name (int);
-extern const char *alg_oakley_encdef_name __P((int));
-extern const char *alg_oakley_hashdef_name __P((int));
-extern const char *alg_oakley_dhdef_name __P((int));
-extern const char *alg_oakley_authdef_name __P((int));
#endif /* _ALGORITHM_H */