Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys/unix: add TCP_CONNECTION_INFO #53330

Closed
hawkinsw opened this issue Jun 10, 2022 · 3 comments
Closed

x/sys/unix: add TCP_CONNECTION_INFO #53330

hawkinsw opened this issue Jun 10, 2022 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin
Milestone

Comments

@hawkinsw
Copy link
Contributor

Note I am only filing this as a precursor to submitting a patch to resolve this issue. I hope that this is the right place for it! I sincerely apologize if it is not. Go is an amazing community and language and I hope that the effort here helps!

What version of Go are you using (go version)?

$ go version
go version go1.18.1 darwin/arm64

Does this issue reproduce with the latest release?

Yes, tried compiling from source fb75c2da91b9cccf05ec6baad2636325c5d96751.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/hawkinsw/Library/Caches/go-build"
GOENV="/Users/hawkinsw/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/hawkinsw/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/hawkinsw/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/hawkinsw/Code/gosrc/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/hawkinsw/Code/gosrc/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="devel go1.19-fb75c2da91 Fri Jun 10 20:39:12 2022 +0000"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/hawkinsw/Code/gosrc/sys/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/k7/17rw_23d26s87k5swzmf8zm00000gn/T/go-build4090335576=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

(My mistake, of course, but) I tried to build code that called GetsockoptTCPInfo on a Darwin platform. Yes, of course, I now realize how silly that was. But, it got me thinking that ...

What did you expect to see?

... the x/sys package for Darwin should expose TCP_CONNECTION_INFO (the equivalent to TCP_INFO in Linux).

What did you see instead?

I saw build errors.

@gopherbot gopherbot added this to the Unreleased milestone Jun 10, 2022
@ianlancetaylor
Copy link
Contributor

Thanks. In general it's not necessary to open an issue for a simple change to x/sys. You can just send the change.

@hawkinsw
Copy link
Contributor Author

Thank you for that! Patch incoming now!

@gopherbot
Copy link

Change https://go.dev/cl/411734 mentions this issue: unix: Add support for TCP_CONNECTION_INFO on macOS

@seankhliao seankhliao changed the title x/sys: Linux supports TCP_INFO but Darwin does not support TCP_CONNECTION_INFO x/sys/unix: add TCP_CONNECTION_INFO Jun 11, 2022
@seankhliao seankhliao added OS-Darwin NeedsFix The path to resolution is known, but the work has not been done. labels Jun 11, 2022
@golang golang locked and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Darwin
Projects
None yet
Development

No branches or pull requests

4 participants