commit | bd29f38290adc0480bbfa21405f73b8e1f3e7989 | [log] [tgz] |
---|---|---|
author | Chris Kuiper <ckuiper@google.com> | Wed Jul 24 13:40:52 2019 -0700 |
committer | gVisor bot <gvisor-bot@google.com> | Wed Jul 24 13:41:23 2019 -0700 |
tree | 2795ec9eb8abdccf0273c7ade10ac886c898c936 | |
parent | 19f8a636a0ec317b5ba2b9524802947f5d7182c9 [diff] |
Add support for a subnet prefix length on interface network addresses This allows the user code to add a network address with a subnet prefix length. The prefix length value is stored in the network endpoint and provided back to the user in the ProtocolAddress type. PiperOrigin-RevId: 259807693
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.