2 /* $OpenBSD: roaming.h,v 1.4 2009/06/27 09:32:43 andreas Exp $ */
4 * Copyright (c) 2004-2009 AppGate Network Security AB
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 #define DEFAULT_ROAMBUF 65536
24 extern int resume_in_progress
;
26 int get_snd_buf_size(void);
27 int get_recv_buf_size(void);
28 void add_recv_bytes(u_int64_t
);
29 void set_out_buffer_size(size_t);
30 ssize_t
roaming_write(int, const void *, size_t, int *);
31 ssize_t
roaming_read(int, void *, size_t, int *);
32 size_t roaming_atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
33 u_int64_t
get_recv_bytes(void);
34 u_int64_t
get_sent_bytes(void);
35 void roam_set_bytes(u_int64_t
, u_int64_t
);
36 void resend_bytes(int, u_int64_t
*);