diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-12-06 17:55:26 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-12-06 17:55:26 +0000 |
commit | 3c36bb29ca67d459ef9d8c1961415d77efc20e55 (patch) | |
tree | e0cbbfcb54bdf089c1ca30c9ccc38d301ae6fd33 /packet.c | |
parent | f8f065bc752ca0a448eb90fc8d60516f486dc4ff (diff) |
- itojun@cvs.openbsd.org 2001/12/05 03:56:39
[auth1.c auth2.c canohost.c channels.c deattack.c packet.c scp.c
sshconnect2.c]
make it compile with more strict prototype checking
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.72 2001/11/10 13:37:20 markus Exp $"); | 40 | RCSID("$OpenBSD: packet.c,v 1.73 2001/12/05 03:56:39 itojun Exp $"); |
41 | 41 | ||
42 | #include "xmalloc.h" | 42 | #include "xmalloc.h" |
43 | #include "buffer.h" | 43 | #include "buffer.h" |
@@ -147,7 +147,7 @@ packet_set_connection(int fd_in, int fd_out) | |||
147 | /* Returns 1 if remote host is connected via socket, 0 if not. */ | 147 | /* Returns 1 if remote host is connected via socket, 0 if not. */ |
148 | 148 | ||
149 | int | 149 | int |
150 | packet_connection_is_on_socket() | 150 | packet_connection_is_on_socket(void) |
151 | { | 151 | { |
152 | struct sockaddr_storage from, to; | 152 | struct sockaddr_storage from, to; |
153 | socklen_t fromlen, tolen; | 153 | socklen_t fromlen, tolen; |
@@ -173,7 +173,7 @@ packet_connection_is_on_socket() | |||
173 | /* returns 1 if connection is via ipv4 */ | 173 | /* returns 1 if connection is via ipv4 */ |
174 | 174 | ||
175 | int | 175 | int |
176 | packet_connection_is_ipv4() | 176 | packet_connection_is_ipv4(void) |
177 | { | 177 | { |
178 | struct sockaddr_storage to; | 178 | struct sockaddr_storage to; |
179 | socklen_t tolen = sizeof(to); | 179 | socklen_t tolen = sizeof(to); |
@@ -189,7 +189,7 @@ packet_connection_is_ipv4() | |||
189 | /* Sets the connection into non-blocking mode. */ | 189 | /* Sets the connection into non-blocking mode. */ |
190 | 190 | ||
191 | void | 191 | void |
192 | packet_set_nonblocking() | 192 | packet_set_nonblocking(void) |
193 | { | 193 | { |
194 | /* Set the socket into non-blocking mode. */ | 194 | /* Set the socket into non-blocking mode. */ |
195 | if (fcntl(connection_in, F_SETFL, O_NONBLOCK) < 0) | 195 | if (fcntl(connection_in, F_SETFL, O_NONBLOCK) < 0) |
@@ -204,7 +204,7 @@ packet_set_nonblocking() | |||
204 | /* Returns the socket used for reading. */ | 204 | /* Returns the socket used for reading. */ |
205 | 205 | ||
206 | int | 206 | int |
207 | packet_get_connection_in() | 207 | packet_get_connection_in(void) |
208 | { | 208 | { |
209 | return connection_in; | 209 | return connection_in; |
210 | } | 210 | } |
@@ -212,7 +212,7 @@ packet_get_connection_in() | |||
212 | /* Returns the descriptor used for writing. */ | 212 | /* Returns the descriptor used for writing. */ |
213 | 213 | ||
214 | int | 214 | int |
215 | packet_get_connection_out() | 215 | packet_get_connection_out(void) |
216 | { | 216 | { |
217 | return connection_out; | 217 | return connection_out; |
218 | } | 218 | } |
@@ -220,7 +220,7 @@ packet_get_connection_out() | |||
220 | /* Closes the connection and clears and frees internal data structures. */ | 220 | /* Closes the connection and clears and frees internal data structures. */ |
221 | 221 | ||
222 | void | 222 | void |
223 | packet_close() | 223 | packet_close(void) |
224 | { | 224 | { |
225 | if (!initialized) | 225 | if (!initialized) |
226 | return; | 226 | return; |
@@ -253,7 +253,7 @@ packet_set_protocol_flags(u_int protocol_flags) | |||
253 | /* Returns the remote protocol flags set earlier by the above function. */ | 253 | /* Returns the remote protocol flags set earlier by the above function. */ |
254 | 254 | ||
255 | u_int | 255 | u_int |
256 | packet_get_protocol_flags() | 256 | packet_get_protocol_flags(void) |
257 | { | 257 | { |
258 | return remote_protocol_flags; | 258 | return remote_protocol_flags; |
259 | } | 259 | } |
@@ -594,7 +594,7 @@ packet_send2(void) | |||
594 | } | 594 | } |
595 | 595 | ||
596 | void | 596 | void |
597 | packet_send() | 597 | packet_send(void) |
598 | { | 598 | { |
599 | if (compat20) | 599 | if (compat20) |
600 | packet_send2(); | 600 | packet_send2(); |
@@ -964,7 +964,7 @@ packet_process_incoming(const char *buf, u_int len) | |||
964 | /* Returns a character from the packet. */ | 964 | /* Returns a character from the packet. */ |
965 | 965 | ||
966 | u_int | 966 | u_int |
967 | packet_get_char() | 967 | packet_get_char(void) |
968 | { | 968 | { |
969 | char ch; | 969 | char ch; |
970 | buffer_get(&incoming_packet, &ch, 1); | 970 | buffer_get(&incoming_packet, &ch, 1); |
@@ -974,7 +974,7 @@ packet_get_char() | |||
974 | /* Returns an integer from the packet data. */ | 974 | /* Returns an integer from the packet data. */ |
975 | 975 | ||
976 | u_int | 976 | u_int |
977 | packet_get_int() | 977 | packet_get_int(void) |
978 | { | 978 | { |
979 | return buffer_get_int(&incoming_packet); | 979 | return buffer_get_int(&incoming_packet); |
980 | } | 980 | } |
@@ -1111,7 +1111,7 @@ packet_disconnect(const char *fmt,...) | |||
1111 | /* Checks if there is any buffered output, and tries to write some of the output. */ | 1111 | /* Checks if there is any buffered output, and tries to write some of the output. */ |
1112 | 1112 | ||
1113 | void | 1113 | void |
1114 | packet_write_poll() | 1114 | packet_write_poll(void) |
1115 | { | 1115 | { |
1116 | int len = buffer_len(&output); | 1116 | int len = buffer_len(&output); |
1117 | if (len > 0) { | 1117 | if (len > 0) { |
@@ -1132,7 +1132,7 @@ packet_write_poll() | |||
1132 | */ | 1132 | */ |
1133 | 1133 | ||
1134 | void | 1134 | void |
1135 | packet_write_wait() | 1135 | packet_write_wait(void) |
1136 | { | 1136 | { |
1137 | fd_set *setp; | 1137 | fd_set *setp; |
1138 | 1138 | ||
@@ -1154,7 +1154,7 @@ packet_write_wait() | |||
1154 | /* Returns true if there is buffered data to write to the connection. */ | 1154 | /* Returns true if there is buffered data to write to the connection. */ |
1155 | 1155 | ||
1156 | int | 1156 | int |
1157 | packet_have_data_to_write() | 1157 | packet_have_data_to_write(void) |
1158 | { | 1158 | { |
1159 | return buffer_len(&output) != 0; | 1159 | return buffer_len(&output) != 0; |
1160 | } | 1160 | } |
@@ -1162,7 +1162,7 @@ packet_have_data_to_write() | |||
1162 | /* Returns true if there is not too much data to write to the connection. */ | 1162 | /* Returns true if there is not too much data to write to the connection. */ |
1163 | 1163 | ||
1164 | int | 1164 | int |
1165 | packet_not_very_much_data_to_write() | 1165 | packet_not_very_much_data_to_write(void) |
1166 | { | 1166 | { |
1167 | if (interactive_mode) | 1167 | if (interactive_mode) |
1168 | return buffer_len(&output) < 16384; | 1168 | return buffer_len(&output) < 16384; |
@@ -1227,7 +1227,7 @@ packet_set_interactive(int interactive) | |||
1227 | /* Returns true if the current connection is interactive. */ | 1227 | /* Returns true if the current connection is interactive. */ |
1228 | 1228 | ||
1229 | int | 1229 | int |
1230 | packet_is_interactive() | 1230 | packet_is_interactive(void) |
1231 | { | 1231 | { |
1232 | return interactive_mode; | 1232 | return interactive_mode; |
1233 | } | 1233 | } |