summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--atomicio.h4
-rw-r--r--auth-options.h5
-rw-r--r--auth.h56
-rw-r--r--authfd.h34
-rw-r--r--authfile.h15
-rw-r--r--bufaux.h28
-rw-r--r--buffer.h24
-rw-r--r--canohost.h14
-rw-r--r--channels.h103
-rw-r--r--cipher.h23
-rw-r--r--clientloop.h4
-rw-r--r--compat.h8
-rw-r--r--compress.h8
-rw-r--r--crc32.h4
-rw-r--r--deattack.h4
-rw-r--r--dh.h8
-rw-r--r--dispatch.h12
-rw-r--r--groupaccess.h6
-rw-r--r--hostfile.h9
-rw-r--r--kex.h20
-rw-r--r--key.h46
-rw-r--r--log.h28
-rw-r--r--mac.h8
-rw-r--r--match.h12
-rw-r--r--misc.h22
-rw-r--r--mpaux.h7
-rw-r--r--packet.h25
-rw-r--r--radix.h6
-rw-r--r--readconf.h19
-rw-r--r--readpass.h4
-rw-r--r--rsa.h8
32 files changed, 278 insertions, 307 deletions
diff --git a/ChangeLog b/ChangeLog
index 492d00c5e..19552da12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,15 @@
38 - markus@cvs.openbsd.org 2001/06/26 05:50:11 38 - markus@cvs.openbsd.org 2001/06/26 05:50:11
39 [auth2.c] 39 [auth2.c]
40 new interface for secure_filename() 40 new interface for secure_filename()
41 - itojun@cvs.openbsd.org 2001/06/26 06:32:58
42 [atomicio.h authfd.h authfile.h auth.h auth-options.h bufaux.h
43 buffer.h canohost.h channels.h cipher.h clientloop.h compat.h
44 compress.h crc32.h deattack.h dh.h dispatch.h groupaccess.h
45 hostfile.h kex.h key.h log.h mac.h match.h misc.h mpaux.h packet.h
46 radix.h readconf.h readpass.h rsa.h]
47 prototype pedant. not very creative...
48 - () -> (void)
49 - no variable names
41 50
4220010629 5120010629
43 - (bal) Removed net_aton() since we don't use it any more 52 - (bal) Removed net_aton() since we don't use it any more
@@ -5865,4 +5874,4 @@
5865 - Wrote replacements for strlcpy and mkdtemp 5874 - Wrote replacements for strlcpy and mkdtemp
5866 - Released 1.0pre1 5875 - Released 1.0pre1
5867 5876
5868$Id: ChangeLog,v 1.1355 2001/07/04 03:56:56 mouring Exp $ 5877$Id: ChangeLog,v 1.1356 2001/07/04 04:02:36 mouring Exp $
diff --git a/atomicio.h b/atomicio.h
index d878687d6..e569d38c6 100644
--- a/atomicio.h
+++ b/atomicio.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: atomicio.h,v 1.3 2001/03/02 18:54:30 deraadt Exp $ */ 1/* $OpenBSD: atomicio.h,v 1.4 2001/06/26 06:32:46 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. 4 * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved.
@@ -28,4 +28,4 @@
28/* 28/*
29 * Ensure all of data on socket comes through. f==read || f==write 29 * Ensure all of data on socket comes through. f==read || f==write
30 */ 30 */
31ssize_t atomicio(ssize_t (*f)(), int fd, void *s, size_t n); 31ssize_t atomicio(ssize_t (*)(), int, void *, size_t);
diff --git a/auth-options.h b/auth-options.h
index 8ee269491..db0e6e8fb 100644
--- a/auth-options.h
+++ b/auth-options.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* $OpenBSD: auth-options.h,v 1.8 2001/01/21 19:05:42 markus Exp $ */ 14/* $OpenBSD: auth-options.h,v 1.9 2001/06/26 06:32:47 itojun Exp $ */
15 15
16#ifndef AUTH_OPTIONS_H 16#ifndef AUTH_OPTIONS_H
17#define AUTH_OPTIONS_H 17#define AUTH_OPTIONS_H
@@ -35,8 +35,7 @@ extern struct envstring *custom_environment;
35 * side effect: sets key option flags 35 * side effect: sets key option flags
36 */ 36 */
37int 37int
38auth_parse_options(struct passwd *pw, char *options, char *file, 38auth_parse_options(struct passwd *, char *, char *, u_long);
39 u_long linenum);
40 39
41/* reset options flags */ 40/* reset options flags */
42void auth_clear_options(void); 41void auth_clear_options(void);
diff --git a/auth.h b/auth.h
index 415967c2c..a29944113 100644
--- a/auth.h
+++ b/auth.h
@@ -21,7 +21,7 @@
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 * 23 *
24 * $OpenBSD: auth.h,v 1.19 2001/06/25 17:54:49 provos Exp $ 24 * $OpenBSD: auth.h,v 1.20 2001/06/26 06:32:47 itojun Exp $
25 */ 25 */
26#ifndef AUTH_H 26#ifndef AUTH_H
27#define AUTH_H 27#define AUTH_H
@@ -79,45 +79,44 @@ struct KbdintDevice
79 * authentication succeeds. If ignore_rhosts is non-zero, this will not 79 * authentication succeeds. If ignore_rhosts is non-zero, this will not
80 * consider .rhosts and .shosts (/etc/hosts.equiv will still be used). 80 * consider .rhosts and .shosts (/etc/hosts.equiv will still be used).
81 */ 81 */
82int auth_rhosts(struct passwd * pw, const char *client_user); 82int auth_rhosts(struct passwd *, const char *);
83 83
84/* extended interface similar to auth_rhosts() */ 84/* extended interface similar to auth_rhosts() */
85int 85int
86auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, 86auth_rhosts2(struct passwd *, const char *, const char *, const char *);
87 const char *ipaddr);
88 87
89/* 88/*
90 * Tries to authenticate the user using the .rhosts file and the host using 89 * Tries to authenticate the user using the .rhosts file and the host using
91 * its host key. Returns true if authentication succeeds. 90 * its host key. Returns true if authentication succeeds.
92 */ 91 */
93int 92int
94auth_rhosts_rsa(struct passwd * pw, const char *client_user, RSA* client_host_key); 93auth_rhosts_rsa(struct passwd *, const char *, RSA *);
95 94
96/* 95/*
97 * Tries to authenticate the user using password. Returns true if 96 * Tries to authenticate the user using password. Returns true if
98 * authentication succeeds. 97 * authentication succeeds.
99 */ 98 */
100int auth_password(Authctxt *authctxt, const char *password); 99int auth_password(Authctxt *, const char *);
101 100
102/* 101/*
103 * Performs the RSA authentication dialog with the client. This returns 0 if 102 * Performs the RSA authentication dialog with the client. This returns 0 if
104 * the client could not be authenticated, and 1 if authentication was 103 * the client could not be authenticated, and 1 if authentication was
105 * successful. This may exit if there is a serious protocol violation. 104 * successful. This may exit if there is a serious protocol violation.
106 */ 105 */
107int auth_rsa(struct passwd * pw, BIGNUM * client_n); 106int auth_rsa(struct passwd *, BIGNUM *);
108 107
109/* 108/*
110 * Parses an RSA key (number of bits, e, n) from a string. Moves the pointer 109 * Parses an RSA key (number of bits, e, n) from a string. Moves the pointer
111 * over the key. Skips any whitespace at the beginning and at end. 110 * over the key. Skips any whitespace at the beginning and at end.
112 */ 111 */
113int auth_rsa_read_key(char **cpp, u_int *bitsp, BIGNUM * e, BIGNUM * n); 112int auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *);
114 113
115/* 114/*
116 * Performs the RSA authentication challenge-response dialog with the client, 115 * Performs the RSA authentication challenge-response dialog with the client,
117 * and returns true (non-zero) if the client gave the correct answer to our 116 * and returns true (non-zero) if the client gave the correct answer to our
118 * challenge; returns zero if the client gives a wrong answer. 117 * challenge; returns zero if the client gives a wrong answer.
119 */ 118 */
120int auth_rsa_challenge_dialog(RSA *pk); 119int auth_rsa_challenge_dialog(RSA *);
121 120
122#ifdef KRB4 121#ifdef KRB4
123#include <krb.h> 122#include <krb.h>
@@ -126,17 +125,17 @@ int auth_rsa_challenge_dialog(RSA *pk);
126 * if the client could not be authenticated, and 1 if authentication was 125 * if the client could not be authenticated, and 1 if authentication was
127 * successful. This may exit if there is a serious protocol violation. 126 * successful. This may exit if there is a serious protocol violation.
128 */ 127 */
129int auth_krb4(const char *server_user, KTEXT auth, char **client); 128int auth_krb4(const char *, KTEXT, char **);
130int krb4_init(uid_t uid); 129int krb4_init(uid_t);
131void krb4_cleanup_proc(void *ignore); 130void krb4_cleanup_proc(void *);
132int auth_krb4_password(struct passwd * pw, const char *password); 131int auth_krb4_password(struct passwd *, const char *);
133 132
134#ifdef AFS 133#ifdef AFS
135#include <kafs.h> 134#include <kafs.h>
136 135
137/* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */ 136/* Accept passed Kerberos v4 ticket-granting ticket and AFS tokens. */
138int auth_kerberos_tgt(struct passwd * pw, const char *string); 137int auth_kerberos_tgt(struct passwd *, const char *);
139int auth_afs_token(struct passwd * pw, const char *token_string); 138int auth_afs_token(struct passwd *, const char *);
140#endif /* AFS */ 139#endif /* AFS */
141 140
142#endif /* KRB4 */ 141#endif /* KRB4 */
@@ -148,33 +147,32 @@ void do_authentication(void);
148void do_authentication2(void); 147void do_authentication2(void);
149 148
150Authctxt *authctxt_new(void); 149Authctxt *authctxt_new(void);
151void auth_log(Authctxt *authctxt, int authenticated, char *method, char *info); 150void auth_log(Authctxt *, int, char *, char *);
152void userauth_finish(Authctxt *authctxt, int authenticated, char *method); 151void userauth_finish(Authctxt *, int, char *);
153int auth_root_allowed(char *method); 152int auth_root_allowed(char *);
154 153
155int auth2_challenge(Authctxt *authctxt, char *devs); 154int auth2_challenge(Authctxt *, char *);
156 155
157int allowed_user(struct passwd * pw); 156int allowed_user(struct passwd *);
158 157
159char *get_challenge(Authctxt *authctxt); 158char *get_challenge(Authctxt *);
160int verify_response(Authctxt *authctxt, const char *response); 159int verify_response(Authctxt *, const char *);
161 160
162struct passwd * auth_get_user(void); 161struct passwd * auth_get_user(void);
163 162
164/* expand a filename - return buffer is allocated by xmalloc */ 163/* expand a filename - return buffer is allocated by xmalloc */
165char *expand_filename(const char *template, struct passwd *pw); 164char *expand_filename(const char *, struct passwd *);
166char *authorized_keys_file(struct passwd *pw); 165char *authorized_keys_file(struct passwd *);
167char *authorized_keys_file2(struct passwd *pw); 166char *authorized_keys_file2(struct passwd *);
168 167
169/* check a file and the path to it */ 168/* check a file and the path to it */
170int 169int
171secure_filename(FILE *f, const char *file, struct passwd *pw, 170secure_filename(FILE *, const char *, struct passwd *, char *, size_t);
172 char *err, size_t errlen);
173 171
174/* helper for hostbased auth */ 172/* helper for hostbased auth */
175HostStatus 173HostStatus
176check_key_in_hostfiles(struct passwd *pw, Key *key, const char *host, 174check_key_in_hostfiles(struct passwd *, Key *, const char *,
177 const char *sysfile, const char *userfile); 175 const char *, const char *);
178 176
179#define AUTH_FAIL_MAX 6 177#define AUTH_FAIL_MAX 6
180#define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2) 178#define AUTH_FAIL_LOG (AUTH_FAIL_MAX/2)
diff --git a/authfd.h b/authfd.h
index 04439fd07..4fe35aff8 100644
--- a/authfd.h
+++ b/authfd.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* RCSID("$OpenBSD: authfd.h,v 1.17 2001/06/26 04:59:59 markus Exp $"); */ 14/* RCSID("$OpenBSD: authfd.h,v 1.18 2001/06/26 06:32:47 itojun Exp $"); */
15 15
16#ifndef AUTHFD_H 16#ifndef AUTHFD_H
17#define AUTHFD_H 17#define AUTHFD_H
@@ -62,7 +62,7 @@ int ssh_get_authentication_socket(void);
62 * ssh_get_authentication_socket(). Depending on the way the descriptor was 62 * ssh_get_authentication_socket(). Depending on the way the descriptor was
63 * obtained, this may close the descriptor. 63 * obtained, this may close the descriptor.
64 */ 64 */
65void ssh_close_authentication_socket(int authfd); 65void ssh_close_authentication_socket(int);
66 66
67/* 67/*
68 * Opens and connects a private socket for communication with the 68 * Opens and connects a private socket for communication with the
@@ -76,19 +76,19 @@ AuthenticationConnection *ssh_get_authentication_connection(void);
76 * Closes the connection to the authentication agent and frees any associated 76 * Closes the connection to the authentication agent and frees any associated
77 * memory. 77 * memory.
78 */ 78 */
79void ssh_close_authentication_connection(AuthenticationConnection *auth); 79void ssh_close_authentication_connection(AuthenticationConnection *);
80 80
81/* 81/*
82 * Returns the number authentication identity held by the agent. 82 * Returns the number authentication identity held by the agent.
83 */ 83 */
84int ssh_get_num_identities(AuthenticationConnection *auth, int version); 84int ssh_get_num_identities(AuthenticationConnection *, int);
85 85
86/* 86/*
87 * Returns the first authentication identity held by the agent or NULL if 87 * Returns the first authentication identity held by the agent or NULL if
88 * no identies are available. Caller must free comment and key. 88 * no identies are available. Caller must free comment and key.
89 * Note that you cannot mix calls with different versions. 89 * Note that you cannot mix calls with different versions.
90 */ 90 */
91Key *ssh_get_first_identity(AuthenticationConnection *auth, char **comment, int version); 91Key *ssh_get_first_identity(AuthenticationConnection *, char **, int);
92 92
93/* 93/*
94 * Returns the next authentication identity for the agent. Other functions 94 * Returns the next authentication identity for the agent. Other functions
@@ -96,25 +96,20 @@ Key *ssh_get_first_identity(AuthenticationConnection *auth, char **comment, int
96 * function. This returns NULL if there are no more identities. The caller 96 * function. This returns NULL if there are no more identities. The caller
97 * must free key and comment after a successful return. 97 * must free key and comment after a successful return.
98 */ 98 */
99Key *ssh_get_next_identity(AuthenticationConnection *auth, char **comment, int version); 99Key *ssh_get_next_identity(AuthenticationConnection *, char **, int);
100 100
101/* 101/*
102 * Requests the agent to decrypt the given challenge. Returns true if the 102 * Requests the agent to decrypt the given challenge. Returns true if the
103 * agent claims it was able to decrypt it. 103 * agent claims it was able to decrypt it.
104 */ 104 */
105int 105int
106ssh_decrypt_challenge(AuthenticationConnection *auth, 106ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16],
107 Key *key, BIGNUM * challenge, 107 u_int, u_char[16]);
108 u_char session_id[16],
109 u_int response_type,
110 u_char response[16]);
111 108
112/* Requests the agent to sign data using key */ 109/* Requests the agent to sign data using key */
113int 110int
114ssh_agent_sign(AuthenticationConnection *auth, 111ssh_agent_sign(AuthenticationConnection *, Key *, u_char **, int *,
115 Key *key, 112 u_char *, int);
116 u_char **sigp, int *lenp,
117 u_char *data, int datalen);
118 113
119/* 114/*
120 * Adds an identity to the authentication server. This call is not meant to 115 * Adds an identity to the authentication server. This call is not meant to
@@ -122,23 +117,22 @@ ssh_agent_sign(AuthenticationConnection *auth,
122 * successfully added. 117 * successfully added.
123 */ 118 */
124int 119int
125ssh_add_identity(AuthenticationConnection *auth, Key *key, 120ssh_add_identity(AuthenticationConnection *, Key *, const char *);
126 const char *comment);
127 121
128/* 122/*
129 * Removes the identity from the authentication server. This call is not 123 * Removes the identity from the authentication server. This call is not
130 * meant to be used by normal applications. This returns true if the 124 * meant to be used by normal applications. This returns true if the
131 * identity was successfully added. 125 * identity was successfully added.
132 */ 126 */
133int ssh_remove_identity(AuthenticationConnection *auth, Key *key); 127int ssh_remove_identity(AuthenticationConnection *, Key *);
134 128
135/* 129/*
136 * Removes all identities from the authentication agent. This call is not 130 * Removes all identities from the authentication agent. This call is not
137 * meant to be used by normal applications. This returns true if the 131 * meant to be used by normal applications. This returns true if the
138 * operation was successful. 132 * operation was successful.
139 */ 133 */
140int ssh_remove_all_identities(AuthenticationConnection *auth, int version); 134int ssh_remove_all_identities(AuthenticationConnection *, int);
141 135
142int ssh_update_card(AuthenticationConnection *auth, int add, int reader_id); 136int ssh_update_card(AuthenticationConnection *, int, int);
143 137
144#endif /* AUTHFD_H */ 138#endif /* AUTHFD_H */
diff --git a/authfile.h b/authfile.h
index da90cd913..982645d50 100644
--- a/authfile.h
+++ b/authfile.h
@@ -10,27 +10,24 @@
10 * called by a name other than "ssh" or "Secure Shell". 10 * called by a name other than "ssh" or "Secure Shell".
11 */ 11 */
12 12
13/* $OpenBSD: authfile.h,v 1.6 2001/03/26 08:07:08 markus Exp $ */ 13/* $OpenBSD: authfile.h,v 1.7 2001/06/26 06:32:48 itojun Exp $ */
14 14
15#ifndef AUTHFILE_H 15#ifndef AUTHFILE_H
16#define AUTHFILE_H 16#define AUTHFILE_H
17 17
18int 18int
19key_save_private(Key *key, const char *filename, const char *passphrase, 19key_save_private(Key *, const char *, const char *, const char *);
20 const char *comment);
21 20
22Key * 21Key *
23key_load_public(const char *filename, char **commentp); 22key_load_public(const char *, char **);
24 23
25Key * 24Key *
26key_load_public_type(int type, const char *filename, char **commentp); 25key_load_public_type(int, const char *, char **);
27 26
28Key * 27Key *
29key_load_private(const char *filename, const char *passphrase, 28key_load_private(const char *, const char *, char **);
30 char **commentp);
31 29
32Key * 30Key *
33key_load_private_type(int type, const char *filename, const char *passphrase, 31key_load_private_type(int, const char *, const char *, char **);
34 char **commentp);
35 32
36#endif 33#endif
diff --git a/bufaux.h b/bufaux.h
index c0182da13..765ee5e79 100644
--- a/bufaux.h
+++ b/bufaux.h
@@ -10,7 +10,7 @@
10 * called by a name other than "ssh" or "Secure Shell". 10 * called by a name other than "ssh" or "Secure Shell".
11 */ 11 */
12 12
13/* RCSID("$OpenBSD: bufaux.h,v 1.11 2001/01/21 19:05:45 markus Exp $"); */ 13/* RCSID("$OpenBSD: bufaux.h,v 1.12 2001/06/26 06:32:48 itojun Exp $"); */
14 14
15#ifndef BUFAUX_H 15#ifndef BUFAUX_H
16#define BUFAUX_H 16#define BUFAUX_H
@@ -22,30 +22,30 @@
22 * Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed 22 * Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed
23 * by (bits+7)/8 bytes of binary data, msb first. 23 * by (bits+7)/8 bytes of binary data, msb first.
24 */ 24 */
25void buffer_put_bignum(Buffer * buffer, BIGNUM * value); 25void buffer_put_bignum(Buffer *, BIGNUM *);
26void buffer_put_bignum2(Buffer * buffer, BIGNUM * value); 26void buffer_put_bignum2(Buffer *, BIGNUM *);
27 27
28/* Retrieves an BIGNUM from the buffer. */ 28/* Retrieves an BIGNUM from the buffer. */
29int buffer_get_bignum(Buffer * buffer, BIGNUM * value); 29int buffer_get_bignum(Buffer *, BIGNUM *);
30int buffer_get_bignum2(Buffer *buffer, BIGNUM * value); 30int buffer_get_bignum2(Buffer *, BIGNUM *);
31 31
32/* Returns an integer from the buffer (4 bytes, msb first). */ 32/* Returns an integer from the buffer (4 bytes, msb first). */
33u_int buffer_get_int(Buffer * buffer); 33u_int buffer_get_int(Buffer *);
34#ifdef HAVE_U_INT64_T 34#ifdef HAVE_U_INT64_T
35u_int64_t buffer_get_int64(Buffer *buffer); 35u_int64_t buffer_get_int64(Buffer *);
36#endif 36#endif
37 37
38/* Stores an integer in the buffer in 4 bytes, msb first. */ 38/* Stores an integer in the buffer in 4 bytes, msb first. */
39void buffer_put_int(Buffer * buffer, u_int value); 39void buffer_put_int(Buffer *, u_int);
40#ifdef HAVE_U_INT64_T 40#ifdef HAVE_U_INT64_T
41void buffer_put_int64(Buffer *buffer, u_int64_t value); 41void buffer_put_int64(Buffer *, u_int64_t);
42#endif 42#endif
43 43
44/* Returns a character from the buffer (0 - 255). */ 44/* Returns a character from the buffer (0 - 255). */
45int buffer_get_char(Buffer * buffer); 45int buffer_get_char(Buffer *);
46 46
47/* Stores a character in the buffer. */ 47/* Stores a character in the buffer. */
48void buffer_put_char(Buffer * buffer, int value); 48void buffer_put_char(Buffer *, int);
49 49
50/* 50/*
51 * Returns an arbitrary binary string from the buffer. The string cannot be 51 * Returns an arbitrary binary string from the buffer. The string cannot be
@@ -55,10 +55,10 @@ void buffer_put_char(Buffer * buffer, int value);
55 * stored there. A null character will be automatically appended to the 55 * stored there. A null character will be automatically appended to the
56 * returned string, and is not counted in length. 56 * returned string, and is not counted in length.
57 */ 57 */
58char *buffer_get_string(Buffer * buffer, u_int *length_ptr); 58char *buffer_get_string(Buffer *, u_int *);
59 59
60/* Stores and arbitrary binary string in the buffer. */ 60/* Stores and arbitrary binary string in the buffer. */
61void buffer_put_string(Buffer * buffer, const void *buf, u_int len); 61void buffer_put_string(Buffer *, const void *, u_int);
62void buffer_put_cstring(Buffer *buffer, const char *s); 62void buffer_put_cstring(Buffer *, const char *);
63 63
64#endif /* BUFAUX_H */ 64#endif /* BUFAUX_H */
diff --git a/buffer.h b/buffer.h
index f3c509dfa..5e9fc278d 100644
--- a/buffer.h
+++ b/buffer.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* RCSID("$OpenBSD: buffer.h,v 1.7 2000/12/19 23:17:55 markus Exp $"); */ 14/* RCSID("$OpenBSD: buffer.h,v 1.8 2001/06/26 06:32:48 itojun Exp $"); */
15 15
16#ifndef BUFFER_H 16#ifndef BUFFER_H
17#define BUFFER_H 17#define BUFFER_H
@@ -23,44 +23,44 @@ typedef struct {
23 u_int end; /* Offset of last byte containing data. */ 23 u_int end; /* Offset of last byte containing data. */
24} Buffer; 24} Buffer;
25/* Initializes the buffer structure. */ 25/* Initializes the buffer structure. */
26void buffer_init(Buffer * buffer); 26void buffer_init(Buffer *);
27 27
28/* Frees any memory used for the buffer. */ 28/* Frees any memory used for the buffer. */
29void buffer_free(Buffer * buffer); 29void buffer_free(Buffer *);
30 30
31/* Clears any data from the buffer, making it empty. This does not actually 31/* Clears any data from the buffer, making it empty. This does not actually
32 zero the memory. */ 32 zero the memory. */
33void buffer_clear(Buffer * buffer); 33void buffer_clear(Buffer *);
34 34
35/* Appends data to the buffer, expanding it if necessary. */ 35/* Appends data to the buffer, expanding it if necessary. */
36void buffer_append(Buffer * buffer, const char *data, u_int len); 36void buffer_append(Buffer *, const char *, u_int);
37 37
38/* 38/*
39 * Appends space to the buffer, expanding the buffer if necessary. This does 39 * Appends space to the buffer, expanding the buffer if necessary. This does
40 * not actually copy the data into the buffer, but instead returns a pointer 40 * not actually copy the data into the buffer, but instead returns a pointer
41 * to the allocated region. 41 * to the allocated region.
42 */ 42 */
43void buffer_append_space(Buffer * buffer, char **datap, u_int len); 43void buffer_append_space(Buffer *, char **, u_int);
44 44
45/* Returns the number of bytes of data in the buffer. */ 45/* Returns the number of bytes of data in the buffer. */
46u_int buffer_len(Buffer * buffer); 46u_int buffer_len(Buffer *);
47 47
48/* Gets data from the beginning of the buffer. */ 48/* Gets data from the beginning of the buffer. */
49void buffer_get(Buffer * buffer, char *buf, u_int len); 49void buffer_get(Buffer *, char *, u_int);
50 50
51/* Consumes the given number of bytes from the beginning of the buffer. */ 51/* Consumes the given number of bytes from the beginning of the buffer. */
52void buffer_consume(Buffer * buffer, u_int bytes); 52void buffer_consume(Buffer *, u_int);
53 53
54/* Consumes the given number of bytes from the end of the buffer. */ 54/* Consumes the given number of bytes from the end of the buffer. */
55void buffer_consume_end(Buffer * buffer, u_int bytes); 55void buffer_consume_end(Buffer *, u_int);
56 56
57/* Returns a pointer to the first used byte in the buffer. */ 57/* Returns a pointer to the first used byte in the buffer. */
58char *buffer_ptr(Buffer * buffer); 58char *buffer_ptr(Buffer *);
59 59
60/* 60/*
61 * Dumps the contents of the buffer to stderr in hex. This intended for 61 * Dumps the contents of the buffer to stderr in hex. This intended for
62 * debugging purposes only. 62 * debugging purposes only.
63 */ 63 */
64void buffer_dump(Buffer * buffer); 64void buffer_dump(Buffer *);
65 65
66#endif /* BUFFER_H */ 66#endif /* BUFFER_H */
diff --git a/canohost.h b/canohost.h
index 36fb345a1..66e64d506 100644
--- a/canohost.h
+++ b/canohost.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: canohost.h,v 1.6 2001/04/12 19:15:24 markus Exp $ */ 1/* $OpenBSD: canohost.h,v 1.7 2001/06/26 06:32:49 itojun Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -17,7 +17,7 @@
17 * connection (as returned by packet_get_connection). The host name is 17 * connection (as returned by packet_get_connection). The host name is
18 * cached, so it is efficient to call this several times. 18 * cached, so it is efficient to call this several times.
19 */ 19 */
20const char *get_canonical_hostname(int reverse_mapping_check); 20const char *get_canonical_hostname(int);
21 21
22/* 22/*
23 * Returns the IP-address of the remote host as a string. The returned 23 * Returns the IP-address of the remote host as a string. The returned
@@ -25,13 +25,13 @@ const char *get_canonical_hostname(int reverse_mapping_check);
25 */ 25 */
26const char *get_remote_ipaddr(void); 26const char *get_remote_ipaddr(void);
27 27
28const char *get_remote_name_or_ip(u_int utmp_len, int reverse_mapping_check); 28const char *get_remote_name_or_ip(u_int, int);
29 29
30/* Returns the ipaddr/port number of the peer of the socket. */ 30/* Returns the ipaddr/port number of the peer of the socket. */
31char * get_peer_ipaddr(int socket); 31char * get_peer_ipaddr(int);
32int get_peer_port(int sock); 32int get_peer_port(int);
33char * get_local_ipaddr(int socket); 33char * get_local_ipaddr(int);
34char * get_local_name(int socket); 34char * get_local_name(int);
35 35
36/* Returns the port number of the remote/local host. */ 36/* Returns the port number of the remote/local host. */
37int get_remote_port(void); 37int get_remote_port(void);
diff --git a/channels.h b/channels.h
index 0ce8372bd..3a114e070 100644
--- a/channels.h
+++ b/channels.h
@@ -32,7 +32,7 @@
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35/* RCSID("$OpenBSD: channels.h,v 1.40 2001/06/25 08:25:36 markus Exp $"); */ 35/* RCSID("$OpenBSD: channels.h,v 1.41 2001/06/26 06:32:49 itojun Exp $"); */
36 36
37#ifndef CHANNEL_H 37#ifndef CHANNEL_H
38#define CHANNEL_H 38#define CHANNEL_H
@@ -65,8 +65,8 @@
65struct Channel; 65struct Channel;
66typedef struct Channel Channel; 66typedef struct Channel Channel;
67 67
68typedef void channel_callback_fn(int id, void *arg); 68typedef void channel_callback_fn(int, void *);
69typedef int channel_filter_fn(struct Channel *c, char *buf, int len); 69typedef int channel_filter_fn(struct Channel *, char *, int);
70 70
71struct Channel { 71struct Channel {
72 int type; /* channel type/state */ 72 int type; /* channel type/state */
@@ -142,44 +142,39 @@ struct Channel {
142 142
143/* channel management */ 143/* channel management */
144 144
145Channel *channel_lookup(int id); 145Channel *channel_lookup(int);
146Channel * 146Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int);
147channel_new(char *ctype, int type, int rfd, int wfd, int efd, 147void channel_set_fds(int, int, int, int, int, int);
148 int window, int maxpack, int extusage, char *remote_name, int nonblock); 148void channel_free(Channel *);
149void
150channel_set_fds(int id, int rfd, int wfd, int efd,
151 int extusage, int nonblock);
152void channel_free(Channel *c);
153void channel_free_all(void); 149void channel_free_all(void);
154 150
155void channel_send_open(int id); 151void channel_send_open(int);
156void channel_request(int id, char *service, int wantconfirm); 152void channel_request(int, char *, int);
157void channel_request_start(int id, char *service, int wantconfirm); 153void channel_request_start(int, char *, int);
158void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); 154void channel_register_callback(int, int mtype, channel_callback_fn *, void *);
159void channel_register_cleanup(int id, channel_callback_fn *fn); 155void channel_register_cleanup(int, channel_callback_fn *);
160void channel_register_filter(int id, channel_filter_fn *fn); 156void channel_register_filter(int, channel_filter_fn *);
161void channel_cancel_cleanup(int id); 157void channel_cancel_cleanup(int);
162 158
163/* protocol handler */ 159/* protocol handler */
164 160
165void channel_input_channel_request(int type, int plen, void *ctxt); 161void channel_input_channel_request(int, int, void *);
166void channel_input_close(int type, int plen, void *ctxt); 162void channel_input_close(int, int, void *);
167void channel_input_close_confirmation(int type, int plen, void *ctxt); 163void channel_input_close_confirmation(int, int, void *);
168void channel_input_data(int type, int plen, void *ctxt); 164void channel_input_data(int, int, void *);
169void channel_input_extended_data(int type, int plen, void *ctxt); 165void channel_input_extended_data(int, int, void *);
170void channel_input_ieof(int type, int plen, void *ctxt); 166void channel_input_ieof(int, int, void *);
171void channel_input_oclose(int type, int plen, void *ctxt); 167void channel_input_oclose(int, int, void *);
172void channel_input_open_confirmation(int type, int plen, void *ctxt); 168void channel_input_open_confirmation(int, int, void *);
173void channel_input_open_failure(int type, int plen, void *ctxt); 169void channel_input_open_failure(int, int, void *);
174void channel_input_port_open(int type, int plen, void *ctxt); 170void channel_input_port_open(int, int, void *);
175void channel_input_window_adjust(int type, int plen, void *ctxt); 171void channel_input_window_adjust(int, int, void *);
176 172
177/* file descriptor handling (read/write) */ 173/* file descriptor handling (read/write) */
178 174
179void 175void
180channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, 176channel_prepare_select(fd_set **, fd_set **, int *, int);
181 int rekeying); 177void channel_after_select(fd_set *, fd_set *);
182void channel_after_select(fd_set * readset, fd_set * writeset);
183void channel_output_poll(void); 178void channel_output_poll(void);
184 179
185int channel_not_very_much_buffered_data(void); 180int channel_not_very_much_buffered_data(void);
@@ -191,45 +186,41 @@ int channel_find_open(void);
191 186
192/* channel_tcpfwd.c */ 187/* channel_tcpfwd.c */
193int 188int
194channel_request_local_forwarding(u_short listen_port, 189channel_request_local_forwarding(u_short, const char *, u_short, int);
195 const char *host_to_connect, u_short port_to_connect, int gateway_ports);
196int 190int
197channel_request_forwarding(const char *listen_address, u_short listen_port, 191channel_request_forwarding(const char *, u_short, const char *, u_short, int,
198 const char *host_to_connect, u_short port_to_connect, int gateway_ports, 192 int);
199 int remote_fwd);
200void 193void
201channel_request_remote_forwarding(u_short port, const char *host, 194channel_request_remote_forwarding(u_short, const char *, u_short);
202 u_short remote_port);
203void channel_permit_all_opens(void); 195void channel_permit_all_opens(void);
204void channel_add_permitted_opens(char *host, int port); 196void channel_add_permitted_opens(char *, int);
205void channel_clear_permitted_opens(void); 197void channel_clear_permitted_opens(void);
206void channel_input_port_forward_request(int is_root, int gateway_ports); 198void channel_input_port_forward_request(int, int);
207int channel_connect_to(const char *host, u_short host_port); 199int channel_connect_to(const char *, u_short);
208int channel_connect_by_listen_adress(u_short listen_port); 200int channel_connect_by_listen_adress(u_short);
209 201
210/* x11 forwarding */ 202/* x11 forwarding */
211 203
212int x11_connect_display(void); 204int x11_connect_display(void);
213char *x11_create_display(int screen); 205char *x11_create_display(int);
214char *x11_create_display_inet(int screen, int x11_display_offset); 206char *x11_create_display_inet(int, int);
215void x11_input_open(int type, int plen, void *ctxt); 207void x11_input_open(int, int, void *);
216void x11_request_forwarding(void); 208void x11_request_forwarding(void);
217void 209void
218x11_request_forwarding_with_spoofing(int client_session_id, 210x11_request_forwarding_with_spoofing(int, const char *, const char *);
219 const char *proto, const char *data); 211void deny_input_open(int, int, void *);
220void deny_input_open(int type, int plen, void *ctxt);
221 212
222/* agent forwarding */ 213/* agent forwarding */
223 214
224void auth_request_forwarding(void); 215void auth_request_forwarding(void);
225char *auth_get_socket_name(void); 216char *auth_get_socket_name(void);
226void auth_sock_cleanup_proc(void *pw); 217void auth_sock_cleanup_proc(void *);
227int auth_input_request_forwarding(struct passwd * pw); 218int auth_input_request_forwarding(struct passwd *);
228void auth_input_open_request(int type, int plen, void *ctxt); 219void auth_input_open_request(int, int, void *);
229 220
230/* channel close */ 221/* channel close */
231 222
232typedef void chan_event_fn(Channel * c); 223typedef void chan_event_fn(Channel *);
233 224
234/* for the input state */ 225/* for the input state */
235extern chan_event_fn *chan_rcvd_oclose; 226extern chan_event_fn *chan_rcvd_oclose;
@@ -241,9 +232,9 @@ extern chan_event_fn *chan_rcvd_ieof;
241extern chan_event_fn *chan_write_failed; 232extern chan_event_fn *chan_write_failed;
242extern chan_event_fn *chan_obuf_empty; 233extern chan_event_fn *chan_obuf_empty;
243 234
244int chan_is_dead(Channel * c); 235int chan_is_dead(Channel *);
245void chan_mark_dead(Channel * c); 236void chan_mark_dead(Channel *);
246void chan_init_iostates(Channel * c); 237void chan_init_iostates(Channel *);
247void chan_init(void); 238void chan_init(void);
248 239
249#endif 240#endif
diff --git a/cipher.h b/cipher.h
index 2ad4979c2..16dd06230 100644
--- a/cipher.h
+++ b/cipher.h
@@ -32,7 +32,7 @@
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/* RCSID("$OpenBSD: cipher.h,v 1.26 2001/05/28 22:51:11 markus Exp $"); */ 35/* RCSID("$OpenBSD: cipher.h,v 1.27 2001/06/26 06:32:49 itojun Exp $"); */
36 36
37#ifndef CIPHER_H 37#ifndef CIPHER_H
38#define CIPHER_H 38#define CIPHER_H
@@ -104,15 +104,16 @@ struct Cipher {
104 void (*decrypt)(CipherContext *, u_char *, const u_char *, u_int); 104 void (*decrypt)(CipherContext *, u_char *, const u_char *, u_int);
105}; 105};
106 106
107u_int cipher_mask_ssh1(int client); 107u_int cipher_mask_ssh1(int);
108Cipher *cipher_by_name(const char *name); 108Cipher *cipher_by_name(const char *);
109Cipher *cipher_by_number(int id); 109Cipher *cipher_by_number(int);
110int cipher_number(const char *name); 110int cipher_number(const char *);
111char *cipher_name(int id); 111char *cipher_name(int);
112int ciphers_valid(const char *names); 112int ciphers_valid(const char *);
113void cipher_init(CipherContext *, Cipher *, const u_char *, u_int, const u_char *, u_int); 113void cipher_init(CipherContext *, Cipher *, const u_char *, u_int,
114void cipher_encrypt(CipherContext *context, u_char *dest, const u_char *src, u_int len); 114 const u_char *, u_int);
115void cipher_decrypt(CipherContext *context, u_char *dest, const u_char *src, u_int len); 115void cipher_encrypt(CipherContext *, u_char *, const u_char *, u_int);
116void cipher_set_key_string(CipherContext *context, Cipher *cipher, const char *passphrase); 116void cipher_decrypt(CipherContext *, u_char *, const u_char *, u_int);
117void cipher_set_key_string(CipherContext *, Cipher *, const char *);
117 118
118#endif /* CIPHER_H */ 119#endif /* CIPHER_H */
diff --git a/clientloop.h b/clientloop.h
index ee40d87ea..b7f48aa86 100644
--- a/clientloop.h
+++ b/clientloop.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.h,v 1.4 2001/02/06 22:43:02 markus Exp $ */ 1/* $OpenBSD: clientloop.h,v 1.5 2001/06/26 06:32:50 itojun Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -36,4 +36,4 @@
36 */ 36 */
37 37
38/* Client side main loop for the interactive session. */ 38/* Client side main loop for the interactive session. */
39int client_loop(int have_pty, int escape_char, int id); 39int client_loop(int, int, int);
diff --git a/compat.h b/compat.h
index 33eb7c1e8..a44f321ce 100644
--- a/compat.h
+++ b/compat.h
@@ -21,7 +21,7 @@
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 23 */
24/* RCSID("$OpenBSD: compat.h,v 1.26 2001/06/25 08:25:37 markus Exp $"); */ 24/* RCSID("$OpenBSD: compat.h,v 1.27 2001/06/26 06:32:50 itojun Exp $"); */
25 25
26#ifndef COMPAT_H 26#ifndef COMPAT_H
27#define COMPAT_H 27#define COMPAT_H
@@ -53,9 +53,9 @@
53 53
54void enable_compat13(void); 54void enable_compat13(void);
55void enable_compat20(void); 55void enable_compat20(void);
56void compat_datafellows(const char *s); 56void compat_datafellows(const char *);
57int proto_spec(const char *spec); 57int proto_spec(const char *);
58char *compat_cipher_proposal(char *cipher_prop); 58char *compat_cipher_proposal(char *);
59extern int compat13; 59extern int compat13;
60extern int compat20; 60extern int compat20;
61extern int datafellows; 61extern int datafellows;
diff --git a/compress.h b/compress.h
index f90932a6f..a9d06fc05 100644
--- a/compress.h
+++ b/compress.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* RCSID("$OpenBSD: compress.h,v 1.8 2001/04/05 10:39:02 markus Exp $"); */ 14/* RCSID("$OpenBSD: compress.h,v 1.9 2001/06/26 06:32:50 itojun Exp $"); */
15 15
16#ifndef COMPRESS_H 16#ifndef COMPRESS_H
17#define COMPRESS_H 17#define COMPRESS_H
@@ -20,7 +20,7 @@
20 * Initializes compression; level is compression level from 1 to 9 (as in 20 * Initializes compression; level is compression level from 1 to 9 (as in
21 * gzip). 21 * gzip).
22 */ 22 */
23void buffer_compress_init_send(int level); 23void buffer_compress_init_send(int);
24void buffer_compress_init_recv(void); 24void buffer_compress_init_recv(void);
25 25
26/* Frees any data structures allocated by buffer_compress_init. */ 26/* Frees any data structures allocated by buffer_compress_init. */
@@ -34,7 +34,7 @@ void buffer_compress_uninit(void);
34 * order since they together form a single compression stream) by the 34 * order since they together form a single compression stream) by the
35 * receiver. This appends the compressed data to the output buffer. 35 * receiver. This appends the compressed data to the output buffer.
36 */ 36 */
37void buffer_compress(Buffer * input_buffer, Buffer * output_buffer); 37void buffer_compress(Buffer *, Buffer *);
38 38
39/* 39/*
40 * Uncompresses the contents of input_buffer into output_buffer. All packets 40 * Uncompresses the contents of input_buffer into output_buffer. All packets
@@ -44,6 +44,6 @@ void buffer_compress(Buffer * input_buffer, Buffer * output_buffer);
44 * buffer_compress was called, and in the same order that buffers compressed 44 * buffer_compress was called, and in the same order that buffers compressed
45 * with that. This appends the uncompressed data to the output buffer. 45 * with that. This appends the uncompressed data to the output buffer.
46 */ 46 */
47void buffer_uncompress(Buffer * input_buffer, Buffer * output_buffer); 47void buffer_uncompress(Buffer *, Buffer *);
48 48
49#endif /* COMPRESS_H */ 49#endif /* COMPRESS_H */
diff --git a/crc32.h b/crc32.h
index c469a90fe..4cd933390 100644
--- a/crc32.h
+++ b/crc32.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* RCSID("$OpenBSD: crc32.h,v 1.10 2001/03/02 18:54:31 deraadt Exp $"); */ 14/* RCSID("$OpenBSD: crc32.h,v 1.11 2001/06/26 06:32:51 itojun Exp $"); */
15 15
16#ifndef CRC32_H 16#ifndef CRC32_H
17#define CRC32_H 17#define CRC32_H
@@ -20,6 +20,6 @@
20 * This computes a 32 bit CRC of the data in the buffer, and returns the CRC. 20 * This computes a 32 bit CRC of the data in the buffer, and returns the CRC.
21 * The polynomial used is 0xedb88320. 21 * The polynomial used is 0xedb88320.
22 */ 22 */
23u_int ssh_crc32(const u_char *buf, u_int len); 23u_int ssh_crc32(const u_char *, u_int);
24 24
25#endif /* CRC32_H */ 25#endif /* CRC32_H */
diff --git a/deattack.h b/deattack.h
index 3907159b4..24d3957a6 100644
--- a/deattack.h
+++ b/deattack.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: deattack.h,v 1.5 2001/01/29 01:58:15 niklas Exp $ */ 1/* $OpenBSD: deattack.h,v 1.6 2001/06/26 06:32:51 itojun Exp $ */
2 2
3/* 3/*
4 * Cryptographic attack detector for ssh - Header file 4 * Cryptographic attack detector for ssh - Header file
@@ -26,5 +26,5 @@
26#define DEATTACK_OK 0 26#define DEATTACK_OK 0
27#define DEATTACK_DETECTED 1 27#define DEATTACK_DETECTED 1
28 28
29int detect_attack(u_char *buf, u_int32_t len, u_char IV[8]); 29int detect_attack(u_char *, u_int32_t, u_char[8]);
30#endif 30#endif
diff --git a/dh.h b/dh.h
index e8b2944ce..fd90fab5a 100644
--- a/dh.h
+++ b/dh.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh.h,v 1.5 2001/04/03 19:53:29 markus Exp $ */ 1/* $OpenBSD: dh.h,v 1.6 2001/06/26 06:32:52 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Niels Provos. All rights reserved. 4 * Copyright (c) 2000 Niels Provos. All rights reserved.
@@ -32,15 +32,15 @@ struct dhgroup {
32 BIGNUM *p; 32 BIGNUM *p;
33}; 33};
34 34
35DH *choose_dh(int min, int nbits, int max); 35DH *choose_dh(int, int, int);
36DH *dh_new_group_asc(const char *, const char *); 36DH *dh_new_group_asc(const char *, const char *);
37DH *dh_new_group(BIGNUM *, BIGNUM *); 37DH *dh_new_group(BIGNUM *, BIGNUM *);
38DH *dh_new_group1(void); 38DH *dh_new_group1(void);
39 39
40void dh_gen_key(DH *, int); 40void dh_gen_key(DH *, int);
41int dh_pub_is_valid(DH *dh, BIGNUM *dh_pub); 41int dh_pub_is_valid(DH *, BIGNUM *);
42 42
43int dh_estimate(int bits); 43int dh_estimate(int);
44 44
45#define DH_GRP_MIN 1024 45#define DH_GRP_MIN 1024
46#define DH_GRP_MAX 8192 46#define DH_GRP_MAX 8192
diff --git a/dispatch.h b/dispatch.h
index 0bee03b2b..f796705a2 100644
--- a/dispatch.h
+++ b/dispatch.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dispatch.h,v 1.4 2001/01/29 01:58:15 niklas Exp $ */ 1/* $OpenBSD: dispatch.h,v 1.5 2001/06/26 06:32:52 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -28,9 +28,9 @@ enum {
28 DISPATCH_NONBLOCK 28 DISPATCH_NONBLOCK
29}; 29};
30 30
31typedef void dispatch_fn(int type, int plen, void *ctxt); 31typedef void dispatch_fn(int, int, void *);
32 32
33void dispatch_init(dispatch_fn *dflt); 33void dispatch_init(dispatch_fn *);
34void dispatch_set(int type, dispatch_fn *fn); 34void dispatch_set(int, dispatch_fn *);
35void dispatch_run(int mode, int *done, void *ctxt); 35void dispatch_run(int, int *, void *);
36void dispatch_protocol_error(int type, int plen, void *ctxt); 36void dispatch_protocol_error(int, int, void *);
diff --git a/groupaccess.h b/groupaccess.h
index b4e5e42fc..01e394f69 100644
--- a/groupaccess.h
+++ b/groupaccess.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: groupaccess.h,v 1.2 2001/01/29 01:58:15 niklas Exp $ */ 1/* $OpenBSD: groupaccess.h,v 1.3 2001/06/26 06:32:52 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Kevin Steves. All rights reserved. 4 * Copyright (c) 2001 Kevin Steves. All rights reserved.
@@ -33,13 +33,13 @@
33 * Initialize group access list for user with primary (base) and 33 * Initialize group access list for user with primary (base) and
34 * supplementary groups. Return the number of groups in the list. 34 * supplementary groups. Return the number of groups in the list.
35 */ 35 */
36int ga_init(const char *user, gid_t base); 36int ga_init(const char *, gid_t);
37 37
38/* 38/*
39 * Return 1 if one of user's groups is contained in groups. 39 * Return 1 if one of user's groups is contained in groups.
40 * Return 0 otherwise. Use match_pattern() for string comparison. 40 * Return 0 otherwise. Use match_pattern() for string comparison.
41 */ 41 */
42int ga_match(char * const *groups, int ngroups); 42int ga_match(char * const *, int);
43 43
44/* 44/*
45 * Free memory allocated for group access list. 45 * Free memory allocated for group access list.
diff --git a/hostfile.h b/hostfile.h
index 346bcd9ba..b83b77008 100644
--- a/hostfile.h
+++ b/hostfile.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: hostfile.h,v 1.7 2001/02/08 19:30:51 itojun Exp $ */ 1/* $OpenBSD: hostfile.h,v 1.8 2001/06/26 06:32:53 itojun Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -15,7 +15,7 @@
15#define HOSTFILE_H 15#define HOSTFILE_H
16 16
17int 17int
18auth_rsa_read_key(char **cpp, u_int *bitsp, BIGNUM * e, BIGNUM * n); 18auth_rsa_read_key(char **, u_int *, BIGNUM *, BIGNUM *);
19 19
20/* 20/*
21 * Checks whether the given host is already in the list of our known hosts. 21 * Checks whether the given host is already in the list of our known hosts.
@@ -28,13 +28,12 @@ typedef enum {
28} HostStatus; 28} HostStatus;
29 29
30HostStatus 30HostStatus
31check_host_in_hostfile(const char *filename, const char *host, Key *key, 31check_host_in_hostfile(const char *, const char *, Key *, Key *, int *);
32 Key *found, int *line);
33 32
34/* 33/*
35 * Appends an entry to the host file. Returns false if the entry could not 34 * Appends an entry to the host file. Returns false if the entry could not
36 * be appended. 35 * be appended.
37 */ 36 */
38int add_host_to_hostfile(const char *filename, const char *host, Key *key); 37int add_host_to_hostfile(const char *, const char *, Key *);
39 38
40#endif 39#endif
diff --git a/kex.h b/kex.h
index ac7ad33f7..80ce31cef 100644
--- a/kex.h
+++ b/kex.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: kex.h,v 1.24 2001/06/25 08:25:37 markus Exp $ */ 1/* $OpenBSD: kex.h,v 1.25 2001/06/26 06:32:53 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -107,24 +107,24 @@ struct Kex {
107 int flags; 107 int flags;
108 char *client_version_string; 108 char *client_version_string;
109 char *server_version_string; 109 char *server_version_string;
110 int (*verify_host_key)(Key *hostkey); 110 int (*verify_host_key)(Key *);
111 Key *(*load_host_key)(int type); 111 Key *(*load_host_key)(int);
112}; 112};
113 113
114Kex *kex_setup(char *proposal[PROPOSAL_MAX]); 114Kex *kex_setup(char *[PROPOSAL_MAX]);
115void kex_finish(Kex *kex); 115void kex_finish(Kex *);
116 116
117void kex_send_kexinit(Kex *kex); 117void kex_send_kexinit(Kex *);
118void kex_input_kexinit(int type, int plen, void *ctxt); 118void kex_input_kexinit(int, int, void *);
119void kex_derive_keys(Kex *k, u_char *hash, BIGNUM *shared_secret); 119void kex_derive_keys(Kex *, u_char *, BIGNUM *);
120 120
121void kexdh(Kex *); 121void kexdh(Kex *);
122void kexgex(Kex *); 122void kexgex(Kex *);
123 123
124Newkeys *kex_get_newkeys(int mode); 124Newkeys *kex_get_newkeys(int);
125 125
126#if defined(DEBUG_KEX) || defined(DEBUG_KEXDH) 126#if defined(DEBUG_KEX) || defined(DEBUG_KEXDH)
127void dump_digest(char *msg, u_char *digest, int len); 127void dump_digest(char *, u_char *, int);
128#endif 128#endif
129 129
130#endif 130#endif
diff --git a/key.h b/key.h
index 7f4e5f017..db2dd324c 100644
--- a/key.h
+++ b/key.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.h,v 1.13 2001/06/25 08:25:38 markus Exp $ */ 1/* $OpenBSD: key.h,v 1.14 2001/06/26 06:32:54 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -50,35 +50,27 @@ struct Key {
50 DSA *dsa; 50 DSA *dsa;
51}; 51};
52 52
53Key *key_new(int type); 53Key *key_new(int);
54Key *key_new_private(int type); 54Key *key_new_private(int);
55void key_free(Key *k); 55void key_free(Key *);
56int key_equal(Key *a, Key *b); 56int key_equal(Key *, Key *);
57char *key_fingerprint(Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep); 57char *key_fingerprint(Key *, enum fp_type, enum fp_rep);
58char *key_type(Key *k); 58char *key_type(Key *);
59int key_write(Key *key, FILE *f); 59int key_write(Key *, FILE *);
60int key_read(Key *key, char **cpp); 60int key_read(Key *, char **);
61u_int key_size(Key *k); 61u_int key_size(Key *);
62 62
63Key *key_generate(int type, u_int bits); 63Key *key_generate(int, u_int);
64Key *key_from_private(Key *k); 64Key *key_from_private(Key *);
65int key_type_from_name(char *name); 65int key_type_from_name(char *);
66 66
67Key *key_from_blob(char *blob, int blen); 67Key *key_from_blob(char *, int);
68int key_to_blob(Key *key, u_char **blobp, u_int *lenp); 68int key_to_blob(Key *, u_char **, u_int *);
69char *key_ssh_name(Key *k); 69char *key_ssh_name(Key *);
70int key_names_valid2(const char *names); 70int key_names_valid2(const char *);
71 71
72int 72int key_sign(Key *, u_char **, int *, u_char *, int);
73key_sign(
74 Key *key,
75 u_char **sigp, int *lenp,
76 u_char *data, int datalen);
77 73
78int 74int key_verify(Key *, u_char *, int, u_char *, int);
79key_verify(
80 Key *key,
81 u_char *signature, int signaturelen,
82 u_char *data, int datalen);
83 75
84#endif 76#endif
diff --git a/log.h b/log.h
index 6da5bcc0b..95ec864f3 100644
--- a/log.h
+++ b/log.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: log.h,v 1.2 2001/01/29 01:58:16 niklas Exp $ */ 1/* $OpenBSD: log.h,v 1.3 2001/06/26 06:32:55 itojun Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -46,23 +46,23 @@ typedef enum {
46 SYSLOG_LEVEL_DEBUG3 46 SYSLOG_LEVEL_DEBUG3
47} LogLevel; 47} LogLevel;
48/* Initializes logging. */ 48/* Initializes logging. */
49void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr); 49void log_init(char *, LogLevel, SyslogFacility, int);
50 50
51/* Logging implementation, depending on server or client */ 51/* Logging implementation, depending on server or client */
52void do_log(LogLevel level, const char *fmt, va_list args); 52void do_log(LogLevel, const char *, va_list);
53 53
54/* name to facility/level */ 54/* name to facility/level */
55SyslogFacility log_facility_number(char *name); 55SyslogFacility log_facility_number(char *);
56LogLevel log_level_number(char *name); 56LogLevel log_level_number(char *);
57 57
58/* Output a message to syslog or stderr */ 58/* Output a message to syslog or stderr */
59void fatal(const char *fmt,...) __attribute__((format(printf, 1, 2))); 59void fatal(const char *, ...) __attribute__((format(printf, 1, 2)));
60void error(const char *fmt,...) __attribute__((format(printf, 1, 2))); 60void error(const char *, ...) __attribute__((format(printf, 1, 2)));
61void log(const char *fmt,...) __attribute__((format(printf, 1, 2))); 61void log(const char *, ...) __attribute__((format(printf, 1, 2)));
62void verbose(const char *fmt,...) __attribute__((format(printf, 1, 2))); 62void verbose(const char *, ...) __attribute__((format(printf, 1, 2)));
63void debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); 63void debug(const char *, ...) __attribute__((format(printf, 1, 2)));
64void debug2(const char *fmt,...) __attribute__((format(printf, 1, 2))); 64void debug2(const char *, ...) __attribute__((format(printf, 1, 2)));
65void debug3(const char *fmt,...) __attribute__((format(printf, 1, 2))); 65void debug3(const char *, ...) __attribute__((format(printf, 1, 2)));
66 66
67/* same as fatal() but w/o logging */ 67/* same as fatal() but w/o logging */
68void fatal_cleanup(void); 68void fatal_cleanup(void);
@@ -72,9 +72,9 @@ void fatal_cleanup(void);
72 * before exiting. It is permissible to call fatal_remove_cleanup for the 72 * before exiting. It is permissible to call fatal_remove_cleanup for the
73 * function itself from the function. 73 * function itself from the function.
74 */ 74 */
75void fatal_add_cleanup(void (*proc) (void *context), void *context); 75void fatal_add_cleanup(void (*) (void *), void *);
76 76
77/* Removes a cleanup function to be called at fatal(). */ 77/* Removes a cleanup function to be called at fatal(). */
78void fatal_remove_cleanup(void (*proc) (void *context), void *context); 78void fatal_remove_cleanup(void (*) (void *), void *);
79 79
80#endif 80#endif
diff --git a/mac.h b/mac.h
index 6173eaa66..67df3b605 100644
--- a/mac.h
+++ b/mac.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: mac.h,v 1.1 2001/02/11 12:59:24 markus Exp $ */ 1/* $OpenBSD: mac.h,v 1.2 2001/06/26 06:32:55 itojun Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -23,6 +23,6 @@
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26int mac_valid(const char *names); 26int mac_valid(const char *);
27int mac_init(Mac *mac, char *name); 27int mac_init(Mac *, char *);
28u_char *mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen); 28u_char *mac_compute(Mac *, u_int32_t, u_char *, int);
diff --git a/match.h b/match.h
index 5faf66819..f05fe9b37 100644
--- a/match.h
+++ b/match.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: match.h,v 1.8 2001/06/24 05:25:10 markus Exp $ */ 1/* $OpenBSD: match.h,v 1.9 2001/06/26 06:32:56 itojun Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -14,10 +14,10 @@
14#ifndef MATCH_H 14#ifndef MATCH_H
15#define MATCH_H 15#define MATCH_H
16 16
17int match_pattern(const char *s, const char *pattern); 17int match_pattern(const char *, const char *);
18int match_hostname(const char *host, const char *pattern, u_int len); 18int match_hostname(const char *, const char *, u_int);
19int match_host_and_ip(const char *host, const char *ip, const char *p); 19int match_host_and_ip(const char *, const char *, const char *);
20int match_user(const char *u, const char *h, const char *i, const char *p); 20int match_user(const char *, const char *, const char *, const char *);
21char *match_list(const char *client, const char *server, u_int *next); 21char *match_list(const char *, const char *, u_int *);
22 22
23#endif 23#endif
diff --git a/misc.h b/misc.h
index 086f98e0f..829208d29 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.h,v 1.8 2001/05/19 19:43:57 stevesk Exp $ */ 1/* $OpenBSD: misc.h,v 1.9 2001/06/26 06:32:56 itojun Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -12,27 +12,27 @@
12 * called by a name other than "ssh" or "Secure Shell". 12 * called by a name other than "ssh" or "Secure Shell".
13 */ 13 */
14/* remove newline at end of string */ 14/* remove newline at end of string */
15char *chop(char *s); 15char *chop(char *);
16 16
17/* return next token in configuration line */ 17/* return next token in configuration line */
18char *strdelim(char **s); 18char *strdelim(char **);
19 19
20/* set/unset filedescriptor to non-blocking */ 20/* set/unset filedescriptor to non-blocking */
21void set_nonblock(int fd); 21void set_nonblock(int);
22void unset_nonblock(int fd); 22void unset_nonblock(int);
23 23
24struct passwd * pwcopy(struct passwd *pw); 24struct passwd * pwcopy(struct passwd *);
25 25
26/* 26/*
27 * Convert ASCII string to TCP/IP port number. 27 * Convert ASCII string to TCP/IP port number.
28 * Port must be >0 and <=65535. 28 * Port must be >0 and <=65535.
29 * Return 0 if invalid. 29 * Return 0 if invalid.
30 */ 30 */
31int a2port(const char *s); 31int a2port(const char *);
32 32
33/* code from scp.c/rcp.c */ 33/* code from scp.c/rcp.c */
34char *cleanhostname(char *host); 34char *cleanhostname(char *);
35char *colon(char *cp); 35char *colon(char *);
36 36
37/* 37/*
38 * Convert a time string into seconds; format is 38 * Convert a time string into seconds; format is
@@ -56,7 +56,7 @@ char *colon(char *cp);
56 * Return -1 if time string is invalid. 56 * Return -1 if time string is invalid.
57 */ 57 */
58 58
59long convtime(const char *s); 59long convtime(const char *);
60 60
61/* function to assist building execv() arguments */ 61/* function to assist building execv() arguments */
62typedef struct arglist arglist; 62typedef struct arglist arglist;
@@ -66,7 +66,7 @@ struct arglist {
66 int nalloc; 66 int nalloc;
67}; 67};
68 68
69void addargs(arglist *args, char *fmt, ...) __attribute__((format(printf, 2, 3))); 69void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3)));
70 70
71/* wrapper for signal interface */ 71/* wrapper for signal interface */
72typedef void (*mysig_t)(int); 72typedef void (*mysig_t)(int);
diff --git a/mpaux.h b/mpaux.h
index b3f15e4a5..a4d324fca 100644
--- a/mpaux.h
+++ b/mpaux.h
@@ -12,7 +12,7 @@
12 * called by a name other than "ssh" or "Secure Shell". 12 * called by a name other than "ssh" or "Secure Shell".
13 */ 13 */
14 14
15/* RCSID("$OpenBSD: mpaux.h,v 1.9 2000/12/19 23:17:57 markus Exp $"); */ 15/* RCSID("$OpenBSD: mpaux.h,v 1.10 2001/06/26 06:32:57 itojun Exp $"); */
16 16
17#ifndef MPAUX_H 17#ifndef MPAUX_H
18#define MPAUX_H 18#define MPAUX_H
@@ -23,9 +23,6 @@
23 * representations of host_key_n, session_key_n, and the cookie. 23 * representations of host_key_n, session_key_n, and the cookie.
24 */ 24 */
25void 25void
26compute_session_id(u_char session_id[16], 26compute_session_id(u_char[16], u_char[8], BIGNUM *, BIGNUM *);
27 u_char cookie[8],
28 BIGNUM * host_key_n,
29 BIGNUM * session_key_n);
30 27
31#endif /* MPAUX_H */ 28#endif /* MPAUX_H */
diff --git a/packet.h b/packet.h
index 6430bb0be..97afbdf60 100644
--- a/packet.h
+++ b/packet.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* RCSID("$OpenBSD: packet.h,v 1.23 2001/05/28 23:58:35 markus Exp $"); */ 14/* RCSID("$OpenBSD: packet.h,v 1.24 2001/06/26 06:32:57 itojun Exp $"); */
15 15
16#ifndef PACKET_H 16#ifndef PACKET_H
17#define PACKET_H 17#define PACKET_H
@@ -23,7 +23,7 @@
23 * packet_set_encryption_key is called. It is permissible that fd_in and 23 * packet_set_encryption_key is called. It is permissible that fd_in and
24 * fd_out are the same descriptor; in that case it is assumed to be a socket. 24 * fd_out are the same descriptor; in that case it is assumed to be a socket.
25 */ 25 */
26void packet_set_connection(int fd_in, int fd_out); 26void packet_set_connection(int, int);
27 27
28/* Puts the connection file descriptors into non-blocking mode. */ 28/* Puts the connection file descriptors into non-blocking mode. */
29void packet_set_nonblocking(void); 29void packet_set_nonblocking(void);
@@ -46,32 +46,31 @@ void packet_close(void);
46 * encrypted independently of each other. Cipher types are defined in ssh.h. 46 * encrypted independently of each other. Cipher types are defined in ssh.h.
47 */ 47 */
48void 48void
49packet_set_encryption_key(const u_char *key, u_int keylen, 49packet_set_encryption_key(const u_char *, u_int, int);
50 int cipher_type);
51 50
52/* 51/*
53 * Sets remote side protocol flags for the current connection. This can be 52 * Sets remote side protocol flags for the current connection. This can be
54 * called at any time. 53 * called at any time.
55 */ 54 */
56void packet_set_protocol_flags(u_int flags); 55void packet_set_protocol_flags(u_int);
57 56
58/* Returns the remote protocol flags set earlier by the above function. */ 57/* Returns the remote protocol flags set earlier by the above function. */
59u_int packet_get_protocol_flags(void); 58u_int packet_get_protocol_flags(void);
60 59
61/* Enables compression in both directions starting from the next packet. */ 60/* Enables compression in both directions starting from the next packet. */
62void packet_start_compression(int level); 61void packet_start_compression(int);
63 62
64/* 63/*
65 * Informs that the current session is interactive. Sets IP flags for 64 * Informs that the current session is interactive. Sets IP flags for
66 * optimal performance in interactive use. 65 * optimal performance in interactive use.
67 */ 66 */
68void packet_set_interactive(int interactive); 67void packet_set_interactive(int);
69 68
70/* Returns true if the current connection is interactive. */ 69/* Returns true if the current connection is interactive. */
71int packet_is_interactive(void); 70int packet_is_interactive(void);
72 71
73/* Starts constructing a packet to send. */ 72/* Starts constructing a packet to send. */
74void packet_start(u_char type); 73void packet_start(u_char);
75 74
76/* Appends a character to the packet data. */ 75/* Appends a character to the packet data. */
77void packet_put_char(int ch); 76void packet_put_char(int ch);
@@ -175,14 +174,14 @@ int packet_not_very_much_data_to_write(void);
175 174
176/* maximum packet size, requested by client with SSH_CMSG_MAX_PACKET_SIZE */ 175/* maximum packet size, requested by client with SSH_CMSG_MAX_PACKET_SIZE */
177extern int max_packet_size; 176extern int max_packet_size;
178int packet_set_maxsize(int s); 177int packet_set_maxsize(int);
179#define packet_get_maxsize() max_packet_size 178#define packet_get_maxsize() max_packet_size
180 179
181/* Stores tty modes from the fd or tiop into current packet. */ 180/* Stores tty modes from the fd or tiop into current packet. */
182void tty_make_modes(int fd, struct termios *tiop); 181void tty_make_modes(int, struct termios *);
183 182
184/* Parses tty modes for the fd from the current packet. */ 183/* Parses tty modes for the fd from the current packet. */
185void tty_parse_modes(int fd, int *n_bytes_ptr); 184void tty_parse_modes(int, int *);
186 185
187#define packet_integrity_check(payload_len, expected_len, type) \ 186#define packet_integrity_check(payload_len, expected_len, type) \
188do { \ 187do { \
@@ -212,9 +211,9 @@ int packet_connection_is_ipv4(void);
212int packet_remaining(void); 211int packet_remaining(void);
213 212
214/* append an ignore message */ 213/* append an ignore message */
215void packet_send_ignore(int nbytes); 214void packet_send_ignore(int);
216 215
217/* add an ignore message and make sure size (current+ignore) = n*sumlen */ 216/* add an ignore message and make sure size (current+ignore) = n*sumlen */
218void packet_inject_ignore(int sumlen); 217void packet_inject_ignore(int);
219 218
220#endif /* PACKET_H */ 219#endif /* PACKET_H */
diff --git a/radix.h b/radix.h
index 57592d823..6f3428cd3 100644
--- a/radix.h
+++ b/radix.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: radix.h,v 1.2 2001/01/29 01:58:17 niklas Exp $ */ 1/* $OpenBSD: radix.h,v 1.3 2001/06/26 06:32:57 itojun Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999 Dug Song. All rights reserved. 4 * Copyright (c) 1999 Dug Song. All rights reserved.
@@ -24,5 +24,5 @@
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27int creds_to_radix(CREDENTIALS * creds, u_char *buf, size_t buflen); 27int creds_to_radix(CREDENTIALS *, u_char *, size_t);
28int radix_to_creds(const char *buf, CREDENTIALS * creds); 28int radix_to_creds(const char *, CREDENTIALS *);
diff --git a/readconf.h b/readconf.h
index 489ffc8c1..4b3be7615 100644
--- a/readconf.h
+++ b/readconf.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* RCSID("$OpenBSD: readconf.h,v 1.32 2001/05/18 14:13:29 markus Exp $"); */ 14/* RCSID("$OpenBSD: readconf.h,v 1.33 2001/06/26 06:32:58 itojun Exp $"); */
15 15
16#ifndef READCONF_H 16#ifndef READCONF_H
17#define READCONF_H 17#define READCONF_H
@@ -107,13 +107,13 @@ typedef struct {
107 * are processed in the following order: command line, user config file, 107 * are processed in the following order: command line, user config file,
108 * system config file. Last, fill_default_options is called. 108 * system config file. Last, fill_default_options is called.
109 */ 109 */
110void initialize_options(Options * options); 110void initialize_options(Options *);
111 111
112/* 112/*
113 * Called after processing other sources of option data, this fills those 113 * Called after processing other sources of option data, this fills those
114 * options for which no value has been specified with their default values. 114 * options for which no value has been specified with their default values.
115 */ 115 */
116void fill_default_options(Options * options); 116void fill_default_options(Options *);
117 117
118/* 118/*
119 * Processes a single option line as used in the configuration files. This 119 * Processes a single option line as used in the configuration files. This
@@ -121,9 +121,7 @@ void fill_default_options(Options * options);
121 * options 121 * options
122 */ 122 */
123int 123int
124process_config_line(Options * options, const char *host, 124process_config_line(Options *, const char *, char *, const char *, int, int *);
125 char *line, const char *filename, int linenum,
126 int *activep);
127 125
128/* 126/*
129 * Reads the config file and modifies the options accordingly. Options 127 * Reads the config file and modifies the options accordingly. Options
@@ -131,23 +129,20 @@ process_config_line(Options * options, const char *host,
131 * there is an error. If the file does not exist, this returns immediately. 129 * there is an error. If the file does not exist, this returns immediately.
132 */ 130 */
133void 131void
134read_config_file(const char *filename, const char *host, 132read_config_file(const char *, const char *, Options *);
135 Options * options);
136 133
137/* 134/*
138 * Adds a local TCP/IP port forward to options. Never returns if there is an 135 * Adds a local TCP/IP port forward to options. Never returns if there is an
139 * error. 136 * error.
140 */ 137 */
141void 138void
142add_local_forward(Options * options, u_short port, const char *host, 139add_local_forward(Options *, u_short, const char *, u_short);
143 u_short host_port);
144 140
145/* 141/*
146 * Adds a remote TCP/IP port forward to options. Never returns if there is 142 * Adds a remote TCP/IP port forward to options. Never returns if there is
147 * an error. 143 * an error.
148 */ 144 */
149void 145void
150add_remote_forward(Options * options, u_short port, const char *host, 146add_remote_forward(Options *, u_short, const char *, u_short);
151 u_short host_port);
152 147
153#endif /* READCONF_H */ 148#endif /* READCONF_H */
diff --git a/readpass.h b/readpass.h
index 37f85002b..da362ab41 100644
--- a/readpass.h
+++ b/readpass.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readpass.h,v 1.4 2001/06/24 05:35:33 markus Exp $ */ 1/* $OpenBSD: readpass.h,v 1.5 2001/06/26 06:32:58 itojun Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -14,4 +14,4 @@
14 14
15#define RP_ECHO 0x0001 15#define RP_ECHO 0x0001
16#define RP_ALLOW_STDIN 0x0002 16#define RP_ALLOW_STDIN 0x0002
17char *read_passphrase(const char *prompt, int flags); 17char *read_passphrase(const char *, int);
diff --git a/rsa.h b/rsa.h
index d3d2c9964..b803b3ad3 100644
--- a/rsa.h
+++ b/rsa.h
@@ -11,7 +11,7 @@
11 * called by a name other than "ssh" or "Secure Shell". 11 * called by a name other than "ssh" or "Secure Shell".
12 */ 12 */
13 13
14/* RCSID("$OpenBSD: rsa.h,v 1.11 2001/03/26 23:23:24 markus Exp $"); */ 14/* RCSID("$OpenBSD: rsa.h,v 1.12 2001/06/26 06:32:58 itojun Exp $"); */
15 15
16#ifndef RSA_H 16#ifndef RSA_H
17#define RSA_H 17#define RSA_H
@@ -19,9 +19,9 @@
19#include <openssl/bn.h> 19#include <openssl/bn.h>
20#include <openssl/rsa.h> 20#include <openssl/rsa.h>
21 21
22void rsa_public_encrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv)); 22void rsa_public_encrypt __P((BIGNUM *, BIGNUM *, RSA *));
23int rsa_private_decrypt __P((BIGNUM * out, BIGNUM * in, RSA * prv)); 23int rsa_private_decrypt __P((BIGNUM *, BIGNUM *, RSA *));
24 24
25void generate_additional_parameters __P((RSA *rsa)); 25void generate_additional_parameters __P((RSA *));
26 26
27#endif /* RSA_H */ 27#endif /* RSA_H */