summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-12-06 17:55:26 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-12-06 17:55:26 +0000
commit3c36bb29ca67d459ef9d8c1961415d77efc20e55 (patch)
treee0cbbfcb54bdf089c1ca30c9ccc38d301ae6fd33 /packet.c
parentf8f065bc752ca0a448eb90fc8d60516f486dc4ff (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.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/packet.c b/packet.c
index 7b94169a3..441f87ac0 100644
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: packet.c,v 1.72 2001/11/10 13:37:20 markus Exp $"); 40RCSID("$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
149int 149int
150packet_connection_is_on_socket() 150packet_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
175int 175int
176packet_connection_is_ipv4() 176packet_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
191void 191void
192packet_set_nonblocking() 192packet_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
206int 206int
207packet_get_connection_in() 207packet_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
214int 214int
215packet_get_connection_out() 215packet_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
222void 222void
223packet_close() 223packet_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
255u_int 255u_int
256packet_get_protocol_flags() 256packet_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
596void 596void
597packet_send() 597packet_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
966u_int 966u_int
967packet_get_char() 967packet_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
976u_int 976u_int
977packet_get_int() 977packet_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
1113void 1113void
1114packet_write_poll() 1114packet_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
1134void 1134void
1135packet_write_wait() 1135packet_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
1156int 1156int
1157packet_have_data_to_write() 1157packet_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
1164int 1164int
1165packet_not_very_much_data_to_write() 1165packet_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
1229int 1229int
1230packet_is_interactive() 1230packet_is_interactive(void)
1231{ 1231{
1232 return interactive_mode; 1232 return interactive_mode;
1233} 1233}