Skip to content

x/sys/unix: add TCP_CONNECTION_INFO #53330

@hawkinsw

Description

@hawkinsw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.OS-Darwin

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions