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

net: flesh out LookupPort static services for nacl, etc #17045

Closed
bradfitz opened this issue Sep 9, 2016 · 1 comment
Closed

net: flesh out LookupPort static services for nacl, etc #17045

bradfitz opened this issue Sep 9, 2016 · 1 comment
Assignees
Milestone

Comments

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Sep 9, 2016

Note that this program,

https://play.golang.org/p/zBvrVFM6M7

func port(name string) {
    num, err := net.LookupPort("tcp", name)
    log.Printf("Port(%q) = %v, %v", name, num, err)
}

func main() {
    port("http")
    port("https")
    port("ftp")
    port("ssh")
}

Prints this on the playground:

2009/11/10 23:00:00 Port("http") = 0, Protocol not available
2009/11/10 23:00:00 Port("https") = 0, Protocol not available
2009/11/10 23:00:00 Port("ftp") = 0, Protocol not available
2009/11/10 23:00:00 Port("ssh") = 0, Protocol not available

We should probably bake in a more complete /etc/services for nacl and other places without /etc/services on their filesystem.

The list is small and changes very infrequently.

/cc @ianlancetaylor @mikioh

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Sep 9, 2016

CL https://golang.org/cl/28951 mentions this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.