├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── apps ├── curl-poll │ ├── Makefile │ └── curl-poll.c └── curl │ ├── Makefile │ └── curl.c ├── doc ├── 01.md ├── 02.md ├── 03.md ├── 04.md ├── 05.md ├── development.md ├── net_topology.md ├── pdf │ └── 虚拟网卡 TUN&TAP 驱动程序设计原理.pdf ├── simpletunnel │ ├── Makefile │ ├── README │ └── simpletun.c ├── startup.md ├── tuntap.md └── tuntap_2.md ├── include ├── arp.h ├── basic.h ├── cli.h ├── dst.h ├── ethernet.h ├── icmpv4.h ├── inet.h ├── ip.h ├── ipc.h ├── list.h ├── netdev.h ├── route.h ├── skbuff.h ├── sock.h ├── socket.h ├── syshead.h ├── tcp.h ├── tcp_data.h ├── timer.h ├── tuntap_if.h ├── utils.h └── wait.h ├── src ├── arp.c ├── cli.c ├── dst.c ├── icmpv4.c ├── inet.c ├── ip_input.c ├── ip_output.c ├── ipc.c ├── main.c ├── netdev.c ├── route.c ├── skbuff.c ├── sock.c ├── socket.c ├── tcp.c ├── tcp_data.c ├── tcp_input.c ├── tcp_output.c ├── timer.c ├── tuntap_if.c └── utils.c ├── tests ├── README.md ├── suites │ ├── arp │ │ └── suite-arp │ ├── icmp │ │ └── suite-icmp │ └── tcp │ │ ├── curl-fixture.txt │ │ ├── env-delayed │ │ ├── env-duplication │ │ ├── env-lossy │ │ ├── env-normal │ │ ├── suite-curl │ │ ├── suite-packet-delay │ │ ├── suite-packet-duplication │ │ ├── suite-packet-loss │ │ └── tests ├── test-run-all └── utils │ └── common └── tools ├── Makefile ├── hf-ip ├── libhfip.c └── libhfip.h /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/README.md -------------------------------------------------------------------------------- /apps/curl-poll/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/apps/curl-poll/Makefile -------------------------------------------------------------------------------- /apps/curl-poll/curl-poll.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/apps/curl-poll/curl-poll.c -------------------------------------------------------------------------------- /apps/curl/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/apps/curl/Makefile -------------------------------------------------------------------------------- /apps/curl/curl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/apps/curl/curl.c -------------------------------------------------------------------------------- /doc/01.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/01.md -------------------------------------------------------------------------------- /doc/02.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/02.md -------------------------------------------------------------------------------- /doc/03.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/03.md -------------------------------------------------------------------------------- /doc/04.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/04.md -------------------------------------------------------------------------------- /doc/05.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/05.md -------------------------------------------------------------------------------- /doc/development.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/development.md -------------------------------------------------------------------------------- /doc/net_topology.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/net_topology.md -------------------------------------------------------------------------------- /doc/pdf/虚拟网卡 TUN&TAP 驱动程序设计原理.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/pdf/虚拟网卡 TUN&TAP 驱动程序设计原理.pdf -------------------------------------------------------------------------------- /doc/simpletunnel/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/simpletunnel/Makefile -------------------------------------------------------------------------------- /doc/simpletunnel/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/simpletunnel/README -------------------------------------------------------------------------------- /doc/simpletunnel/simpletun.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/simpletunnel/simpletun.c -------------------------------------------------------------------------------- /doc/startup.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/startup.md -------------------------------------------------------------------------------- /doc/tuntap.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/tuntap.md -------------------------------------------------------------------------------- /doc/tuntap_2.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/doc/tuntap_2.md -------------------------------------------------------------------------------- /include/arp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/arp.h -------------------------------------------------------------------------------- /include/basic.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/basic.h -------------------------------------------------------------------------------- /include/cli.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/cli.h -------------------------------------------------------------------------------- /include/dst.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/dst.h -------------------------------------------------------------------------------- /include/ethernet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/ethernet.h -------------------------------------------------------------------------------- /include/icmpv4.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/icmpv4.h -------------------------------------------------------------------------------- /include/inet.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/inet.h -------------------------------------------------------------------------------- /include/ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/ip.h -------------------------------------------------------------------------------- /include/ipc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/ipc.h -------------------------------------------------------------------------------- /include/list.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/list.h -------------------------------------------------------------------------------- /include/netdev.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/netdev.h -------------------------------------------------------------------------------- /include/route.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/route.h -------------------------------------------------------------------------------- /include/skbuff.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/skbuff.h -------------------------------------------------------------------------------- /include/sock.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/sock.h -------------------------------------------------------------------------------- /include/socket.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/socket.h -------------------------------------------------------------------------------- /include/syshead.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/syshead.h -------------------------------------------------------------------------------- /include/tcp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/tcp.h -------------------------------------------------------------------------------- /include/tcp_data.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/tcp_data.h -------------------------------------------------------------------------------- /include/timer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/timer.h -------------------------------------------------------------------------------- /include/tuntap_if.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/tuntap_if.h -------------------------------------------------------------------------------- /include/utils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/utils.h -------------------------------------------------------------------------------- /include/wait.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/include/wait.h -------------------------------------------------------------------------------- /src/arp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/arp.c -------------------------------------------------------------------------------- /src/cli.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/cli.c -------------------------------------------------------------------------------- /src/dst.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/dst.c -------------------------------------------------------------------------------- /src/icmpv4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/icmpv4.c -------------------------------------------------------------------------------- /src/inet.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/inet.c -------------------------------------------------------------------------------- /src/ip_input.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/ip_input.c -------------------------------------------------------------------------------- /src/ip_output.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/ip_output.c -------------------------------------------------------------------------------- /src/ipc.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/ipc.c -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/main.c -------------------------------------------------------------------------------- /src/netdev.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/netdev.c -------------------------------------------------------------------------------- /src/route.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/route.c -------------------------------------------------------------------------------- /src/skbuff.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/skbuff.c -------------------------------------------------------------------------------- /src/sock.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/sock.c -------------------------------------------------------------------------------- /src/socket.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/socket.c -------------------------------------------------------------------------------- /src/tcp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/tcp.c -------------------------------------------------------------------------------- /src/tcp_data.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/tcp_data.c -------------------------------------------------------------------------------- /src/tcp_input.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/tcp_input.c -------------------------------------------------------------------------------- /src/tcp_output.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/tcp_output.c -------------------------------------------------------------------------------- /src/timer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/timer.c -------------------------------------------------------------------------------- /src/tuntap_if.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/tuntap_if.c -------------------------------------------------------------------------------- /src/utils.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/src/utils.c -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/README.md -------------------------------------------------------------------------------- /tests/suites/arp/suite-arp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/arp/suite-arp -------------------------------------------------------------------------------- /tests/suites/icmp/suite-icmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/icmp/suite-icmp -------------------------------------------------------------------------------- /tests/suites/tcp/curl-fixture.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/curl-fixture.txt -------------------------------------------------------------------------------- /tests/suites/tcp/env-delayed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/env-delayed -------------------------------------------------------------------------------- /tests/suites/tcp/env-duplication: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/env-duplication -------------------------------------------------------------------------------- /tests/suites/tcp/env-lossy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/env-lossy -------------------------------------------------------------------------------- /tests/suites/tcp/env-normal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/env-normal -------------------------------------------------------------------------------- /tests/suites/tcp/suite-curl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/suite-curl -------------------------------------------------------------------------------- /tests/suites/tcp/suite-packet-delay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/suite-packet-delay -------------------------------------------------------------------------------- /tests/suites/tcp/suite-packet-duplication: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/suite-packet-duplication -------------------------------------------------------------------------------- /tests/suites/tcp/suite-packet-loss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/suite-packet-loss -------------------------------------------------------------------------------- /tests/suites/tcp/tests: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/suites/tcp/tests -------------------------------------------------------------------------------- /tests/test-run-all: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/test-run-all -------------------------------------------------------------------------------- /tests/utils/common: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tests/utils/common -------------------------------------------------------------------------------- /tools/Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tools/Makefile -------------------------------------------------------------------------------- /tools/hf-ip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tools/hf-ip -------------------------------------------------------------------------------- /tools/libhfip.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tools/libhfip.c -------------------------------------------------------------------------------- /tools/libhfip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/The-Dire/hf-ip/HEAD/tools/libhfip.h --------------------------------------------------------------------------------