Imported Upstream version 20070115
[aiccu.git] / common / tun.h
blobe19f4e87c826e678fa56c7eb4ab7e5d25dc41641
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 **********************************************************/
13 #ifndef TUN_H
14 #define TUN_H "H5K7:W3NDY5UU5N1K1N1C0l3"
16 #include "common.h"
18 #ifdef _WIN32
19 /* Windows writev() support */
20 struct iovec
22 u_long iov_len;
23 char *iov_base;
26 int writev(SOCKET sock, const struct iovec *vector, DWORD count);
27 void tun_list_tap_adapters(void);
28 #endif
30 #ifndef _WIN32
31 typedef void (*TUN_PROCESS)(char *, unsigned int);
32 #else
33 typedef void (*TUN_PROCESS)(char *, unsigned int);
34 #endif
36 struct tun_reader
38 TUN_PROCESS function;
41 void tun_write(char *buf, unsigned int length);
42 bool tun_start(struct tun_reader *tun);
44 #endif /* TUN_H */