net/portmapper: make PCP/PMP result codes stringers

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder
2021-11-23 14:43:04 -08:00
committed by Josh Bleecher Snyder
parent 38d90fa330
commit 40f11c50a1
4 changed files with 80 additions and 5 deletions

View File

@@ -564,6 +564,8 @@ func (c *Client) createOrGetMapping(ctx context.Context) (external netaddr.IPPor
}
}
//go:generate go run tailscale.com/cmd/addlicense -year 2021 -file pmpresultcode_string.go go run golang.org/x/tools/cmd/stringer -type=pmpResultCode -trimprefix=pmpCode
type pmpResultCode uint16
// NAT-PMP constants.