File: tun.h

package info (click to toggle)
libdumbnet 1.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,768 kB
  • sloc: ansic: 11,563; sh: 4,203; python: 261; makefile: 92
file content (25 lines) | stat: -rw-r--r-- 515 bytes parent folder | download | duplicates (12)
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
/*
 * tun.h
 *
 * Network tunnel device.
 *
 * Copyright (c) 2001 Dug Song <dugsong@monkey.org>
 *
 * $Id$
 */

#ifndef DNET_TUN_H
#define DNET_TUN_H

typedef struct tun	tun_t;

__BEGIN_DECLS
tun_t	   *tun_open(struct addr *src, struct addr *dst, int mtu);
int	    tun_fileno(tun_t *tun);
const char *tun_name(tun_t *tun);
ssize_t	    tun_send(tun_t *tun, const void *buf, size_t size);
ssize_t	    tun_recv(tun_t *tun, void *buf, size_t size);
tun_t	   *tun_close(tun_t *tun);
__END_DECLS

#endif /* DNET_TUN_H */