Darren Tucker | b7b17be | 2010-01-08 16:49:52 +1100 | [diff] [blame] | 1 | /* $OpenBSD: roaming.h,v 1.5 2009/10/24 11:11:58 andreas Exp $ */ |
Darren Tucker | c5564e1 | 2009-06-21 18:53:53 +1000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2004-2009 AppGate Network Security AB |
| 4 | * |
| 5 | * Permission to use, copy, modify, and distribute this software for any |
| 6 | * purpose with or without fee is hereby granted, provided that the above |
| 7 | * copyright notice and this permission notice appear in all copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | */ |
| 17 | |
| 18 | #ifndef ROAMING_H |
| 19 | #define ROAMING_H |
| 20 | |
Darren Tucker | 466df21 | 2009-07-06 07:11:52 +1000 | [diff] [blame] | 21 | #define DEFAULT_ROAMBUF 65536 |
Darren Tucker | b7b17be | 2010-01-08 16:49:52 +1100 | [diff] [blame] | 22 | #define ROAMING_REQUEST "roaming@appgate.com" |
Darren Tucker | 466df21 | 2009-07-06 07:11:52 +1000 | [diff] [blame] | 23 | |
Darren Tucker | b7b17be | 2010-01-08 16:49:52 +1100 | [diff] [blame] | 24 | extern int roaming_enabled; |
Darren Tucker | c5564e1 | 2009-06-21 18:53:53 +1000 | [diff] [blame] | 25 | extern int resume_in_progress; |
| 26 | |
Darren Tucker | b7b17be | 2010-01-08 16:49:52 +1100 | [diff] [blame] | 27 | void request_roaming(void); |
Darren Tucker | 466df21 | 2009-07-06 07:11:52 +1000 | [diff] [blame] | 28 | int get_snd_buf_size(void); |
| 29 | int get_recv_buf_size(void); |
Darren Tucker | c5564e1 | 2009-06-21 18:53:53 +1000 | [diff] [blame] | 30 | void add_recv_bytes(u_int64_t); |
Darren Tucker | b7b17be | 2010-01-08 16:49:52 +1100 | [diff] [blame] | 31 | int wait_for_roaming_reconnect(void); |
| 32 | void roaming_reply(int, u_int32_t, void *); |
Darren Tucker | 466df21 | 2009-07-06 07:11:52 +1000 | [diff] [blame] | 33 | void set_out_buffer_size(size_t); |
Darren Tucker | c5564e1 | 2009-06-21 18:53:53 +1000 | [diff] [blame] | 34 | ssize_t roaming_write(int, const void *, size_t, int *); |
| 35 | ssize_t roaming_read(int, void *, size_t, int *); |
Darren Tucker | e6b590e | 2009-06-21 19:08:48 +1000 | [diff] [blame] | 36 | size_t roaming_atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t); |
Darren Tucker | c5564e1 | 2009-06-21 18:53:53 +1000 | [diff] [blame] | 37 | u_int64_t get_recv_bytes(void); |
| 38 | u_int64_t get_sent_bytes(void); |
| 39 | void roam_set_bytes(u_int64_t, u_int64_t); |
Darren Tucker | 466df21 | 2009-07-06 07:11:52 +1000 | [diff] [blame] | 40 | void resend_bytes(int, u_int64_t *); |
Darren Tucker | b7b17be | 2010-01-08 16:49:52 +1100 | [diff] [blame] | 41 | void calculate_new_key(u_int64_t *, u_int64_t, u_int64_t); |
Darren Tucker | c5564e1 | 2009-06-21 18:53:53 +1000 | [diff] [blame] | 42 | int resume_kex(void); |
| 43 | |
| 44 | #endif /* ROAMING */ |