Skip to content

Add functions for converting IP to int and back #24618

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

Closed
wants to merge 1 commit into from
Closed

Add functions for converting IP to int and back #24618

wants to merge 1 commit into from

Conversation

achanda
Copy link
Contributor

@achanda achanda commented Apr 20, 2015

Still haven't figured out how to do this for IPv6 properly

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@nagisa
Copy link
Member

nagisa commented Apr 20, 2015

This impl won’t work for Windows.

@Diggsey
Copy link
Contributor

Diggsey commented Apr 20, 2015

What about just providing an iterator over bytes? That will work seamlessly for both IPv4/IPv6 and seems to be what other libraries do (eg. .net)

@alexcrichton
Copy link
Member

Could you expand on the rationale for this a bit as well? For example this should be possible via the existing constructors/octets method.

@achanda
Copy link
Contributor Author

achanda commented Apr 20, 2015

@alexcrichton I do not have anything very concrete, this looks like a bad idea in hindsight. I will work on using the octets to do this.

@alexcrichton
Copy link
Member

Ok, thanks for the PR anyway @achanda!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants