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

Need C++ API to provide client address. #1132

Closed
fengli-google opened this issue Mar 25, 2015 · 4 comments
Closed

Need C++ API to provide client address. #1132

fengli-google opened this issue Mar 25, 2015 · 4 comments
Assignees
Milestone

Comments

@fengli-google
Copy link

Need C++ API to provide client ip/port for trusted ip checking, visibility checking, etc.
Also need API to get server ip/port for convenient.

@ctiller
Copy link
Member

ctiller commented Mar 26, 2015

We need to think carefully about what format we expose here - at some point I expect to need to support some form of non-IP based transport.

@pmarks-net
Copy link
Contributor

How does this new feature interact with dualstack sockets? Will users see an IPv4 address (1.2.3.4) or a mapped IPv6 address (::ffff:1.2.3.4)?

Mapped addresses are a private implementation detail of the socket API, which should never be leaked to an API user unless they have raw access to the file descriptor.

@pmarks-net pmarks-net reopened this Aug 3, 2015
@pmarks-net
Copy link
Contributor

Looks like ctiller@1b22b9d replaced the normalizing grpc_sockaddr_to_string(&addr_str, addr, 1); with the non-normalizing grpc_sockaddr_to_uri(addr) :-(

@ctiller ctiller assigned pmarks-net and unassigned yang-g Aug 3, 2015
@yang-g
Copy link
Member

yang-g commented Aug 4, 2015

FWIW, the user sees the mapped address now.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants