2 vnd.c -- virtual network device management
4 Copyright (C) 2003-2004 Guus Sliepen <guus@tinc-vpn.org>,
5 2003-2004 Ivo Timmermans <ivo@tinc-vpn.org>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 typedef enum vnd_mode{
34 typedef bool (*vnd_handler_t)(struct vnd *vnd, const void *buf, int len);
51 extern bool vnd_init(void);
52 extern bool vnd_exit(void);
53 extern struct vnd *vnd_new(void);
54 extern void vnd_free(struct vnd *vnd);
55 extern void vnd_set(struct vnd *vnd, char *device, char *interface, vnd_mode_t mode, vnd_handler_t recv);
56 extern bool vnd_open(struct vnd *vnd);
57 extern bool vnd_close(struct vnd *vnd);
59 #endif /* __VND_H__ */