Skip to content

Implement ToSocketAddr for SockaddrIn, SockaddrIn6, SockaddrStorage and InterfaceAddress#2734

Open
tarka wants to merge 6 commits intonix-rust:masterfrom
tarka:sockaddrstorage-tosockaddrs
Open

Implement ToSocketAddr for SockaddrIn, SockaddrIn6, SockaddrStorage and InterfaceAddress#2734
tarka wants to merge 6 commits intonix-rust:masterfrom
tarka:sockaddrstorage-tosockaddrs

Conversation

@tarka
Copy link

@tarka tarka commented Jan 31, 2026

What does this PR do

This implements the ToSocketAddrs for the following structs:

This allows convenient conversions from nix system calls to rust standard SocketAddr, e.g. the returned values of getifaddrs.

(I don't believe this requires a changelog as it doesn't directly change the API, just implements an existing std trait. I can provide one if this is not the case.)

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@tarka tarka changed the title Implement ToSocketAddr for SockaddrIn, SockaddrIn6 and SockaddrStorage Implement ToSocketAddr for SockaddrIn, SockaddrIn6, SockaddrStorage and InterfaceAddress Feb 1, 2026
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.

1 participant