commit | c98312b0695950de5792905f3b897f6dd02dc682 | [log] [tgz] |
---|---|---|
author | Kevin Krakauer <krakauer@google.com> | Fri Jul 12 18:08:03 2019 -0700 |
committer | gVisor bot <gvisor-bot@google.com> | Fri Jul 12 18:08:30 2019 -0700 |
tree | 006aa3ae23ef2d65b993e1568645e817dfd42af6 | |
parent | f7c631ebfffe42f1df407bd18472bf833dd2e8d4 [diff] |
Add IPPROTO_RAW, which allows raw sockets to write IP headers. iptables also relies on IPPROTO_RAW in a way. It opens such a socket to manipulate the kernel's tables, but it doesn't actually use any of the functionality. Blegh. PiperOrigin-RevId: 257903078
Netstack is a network stack written in Go.
Try it out on Linux by installing the tun_tcp_echo demo:
go install github.com/google/netstack/tcpip/sample/tun_tcp_echo
Create a TUN device with:
[sudo] ip tuntap add user <username> mode tun <device-name> [sudo] ip link set <device-name> up [sudo] ip addr add <ipv4-address>/<mask-length> dev <device-name>
Then run with:
tun_tcp_echo <device-name> <ipv4-address> <port>
Please see CONTRIBUTING.md for more details.
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.