Skip to content

Instantly share code, notes, and snippets.

@rickyzhang-cn
rickyzhang-cn / simpletun.c
Created April 27, 2015 09:08
一个简单的使用tun/tap建立tunnel的示例代码
/**************************************************************************
* simpletun.c *
* *
* A simplistic, simple-minded, naive tunnelling program using tun/tap *
* interfaces and TCP. Handles (badly) IPv4 for tun, ARP and IPv4 for *
* tap. DO NOT USE THIS PROGRAM FOR SERIOUS PURPOSES. *
* *
* You have been warned. *
* *
* (C) 2009 Davide Brini. *