File: tun.h

package info (click to toggle)
aiccu 20070115-9
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 540 kB
  • ctags: 616
  • sloc: ansic: 4,660; sh: 442; makefile: 367
file content (45 lines) | stat: -rwxr-xr-x 1,121 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**********************************************************
 SixXS - Automatic IPv6 Connectivity Configuration Utility
***********************************************************
 Copyright 2003-2005 SixXS - http://www.sixxs.net
***********************************************************
 common/tun.h - Tunnel Device Handling
***********************************************************
 $Author: jeroen $
 $Id: tun.h,v 1.3 2006-07-13 19:33:39 jeroen Exp $
 $Date: 2006-07-13 19:33:39 $
**********************************************************/

#ifndef TUN_H
#define TUN_H "H5K7:W3NDY5UU5N1K1N1C0l3"

#include "common.h"

#ifdef _WIN32
/* Windows writev() support */
struct iovec
{
	u_long	iov_len;
	char	*iov_base;
};

int writev(SOCKET sock, const struct iovec *vector, DWORD count);
void tun_list_tap_adapters(void);
#endif

#ifndef _WIN32
	typedef void (*TUN_PROCESS)(char *, unsigned int);
#else
	typedef void (*TUN_PROCESS)(char *, unsigned int);
#endif

struct tun_reader
{
	TUN_PROCESS	function;
};

void tun_write(char *buf, unsigned int length);
bool tun_start(struct tun_reader *tun);

#endif /* TUN_H */