This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
forked from twosigma/nsncd
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We used to rely on the wrong operation under the hood to implement the gethostbyaddr operation. We FFI to the proper glibc function. This is a mixed bag. These's some good news and some bad news. Good news: we can finally get rid of the serialize_host and its associated hardcoded headers. These do not make much sense, they're only present in glibc for the very edge case where we're running out of memory. We were using them wrong here. Bad news: the IpAddr type coming from the Rust stdlib is not really convenient for this use case. There's no straightforward way to extract the V6 variant into a u8 slice. Even though it's internally encoded as a 16-bytes u8 slice… But it's not publicly exposed. We had to come up with our own LibcIp type. That's not great.
- Loading branch information
Showing
3 changed files
with
101 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters