commit | fec645892d75353b1eac2a3ab7bcf103b3bfa25b | [log] [tgz] |
---|---|---|
author | rubenbrunk <rubenbrunk@google.com> | Wed Jul 25 10:12:58 2018 -0700 |
committer | rubenbrunk <rubenbrunk@google.com> | Tue Jul 31 19:11:48 2018 -0700 |
tree | f40ea7f78c2c848376c5d74f62b92ed324dec7f6 | |
parent | edfbb1b67d8c386803a844e132bdd6cbe385eef6 [diff] |
[netstack] Update tcpip nic to allow address removal. - Adds remove methods for addresses and subnets. - Adds capability to query the "main" address to show the user for a given NIC when multiple are configured in the stack. - Fixes string formatting bugs several tcpip objects. Corresponding changes to netstack in: Change-Id: Ib0bf3b8739e178bc489424de4fccb2972558b2d0 NET-1160 Test: manual test of adding/removing addresses via ifconfig. Change-Id: Iccbadebec2fb3d5ad60b354e161be796a39dd306
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>
We would love to accept contributions, but we have not yet worked out how to handle them. Please contact us before sending any pull requests.
Whatever we do decide on will require signing the Google Contributor License. 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.