BSP - Beratung, Schulung, Projekte


The Universal TUN/TAP device driver in SuSE 7.2 and 7.3

Michael Stiemke has reported that the procedure outlined below does also work for SuSE 7.3

This document is an extract of the document provided in /usr/src/linux/Documentation/networking/tuntap.txt of the SuSE 7.2 distribution

Copyright (C) 1999-2000 Maxim Krasnyansky

Linux, Solaris drivers
Copyright (C) 1999-2000 Maxim Krasnyansky

FreeBSD TAP driver
Copyright (c) 1999-2000 Maksim Yevmenkin

Description

TUN/TAP provides packet reception and transmission for user space programs. It can be viewed as a simple Point-to-Point or Ethernet device, which instead of receiving packets from a physical media, receives them from user space program and instead of sending packets via physical media writes them to the user space program.

When a program opens /dev/net/tun, driver creates and registers corresponding net device tunX or tapX. After a program closed above devices, driver will automatically delete tunXX or tapXX device and all routes corresponding to it.

This package ( http://vtun.sourceforge.net/tun) contains two simple example programs how to use tun and tap devices. Both programs works like bridge between two network interfaces. br_select.c - bridge based on select system call. br_sigio.c - bridge based on async io and SIGIO signal. However the best example is VTun http://vtun.sourceforge.net :))

Configuration

If you have questions, remarks, contributions, whatever, drop me a line.

Enjoy your private Hercules mainframe




BSP Beratung, Schulung, Projekte GmbH