]>
Commit | Line | Data |
---|---|---|
d98f6a46 SS |
1 | /********************************************************** |
2 | SixXS - Automatic IPv6 Connectivity Configuration Utility | |
3 | *********************************************************** | |
4 | Copyright 2003-2005 SixXS - http://www.sixxs.net | |
5 | *********************************************************** | |
6 | common/tun.h - Tunnel Device Handling | |
7 | *********************************************************** | |
8 | $Author: jeroen $ | |
9 | $Id: tun.h,v 1.3 2006-07-13 19:33:39 jeroen Exp $ | |
10 | $Date: 2006-07-13 19:33:39 $ | |
11 | **********************************************************/ | |
12 | ||
13 | #ifndef TUN_H | |
14 | #define TUN_H "H5K7:W3NDY5UU5N1K1N1C0l3" | |
15 | ||
16 | #include "common.h" | |
17 | ||
18 | #ifdef _WIN32 | |
19 | /* Windows writev() support */ | |
20 | struct iovec | |
21 | { | |
22 | u_long iov_len; | |
23 | char *iov_base; | |
24 | }; | |
25 | ||
26 | int writev(SOCKET sock, const struct iovec *vector, DWORD count); | |
27 | void tun_list_tap_adapters(void); | |
28 | #endif | |
29 | ||
30 | #ifndef _WIN32 | |
31 | typedef void (*TUN_PROCESS)(char *, unsigned int); | |
32 | #else | |
33 | typedef void (*TUN_PROCESS)(char *, unsigned int); | |
34 | #endif | |
35 | ||
36 | struct tun_reader | |
37 | { | |
38 | TUN_PROCESS function; | |
39 | }; | |
40 | ||
41 | void tun_write(char *buf, unsigned int length); | |
42 | bool tun_start(struct tun_reader *tun); | |
43 | ||
44 | #endif /* TUN_H */ | |
45 |