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

add struct hostent and related functions #200

Merged
merged 2 commits into from
Jul 1, 2021
Merged

Conversation

ahgamut
Copy link
Collaborator

@ahgamut ahgamut commented Jul 1, 2021

gethostbyname internally calls getaddrinfo to fill out the struct hostent details.
gethostbyaddr internally calls getnameinfo to fill out the struct hostent details.

sethostent, gethostent, and endhostent are stubs in the musl source, so stubbed here as well.

also added h_errno, herror, and h_strerror for completeness.

ahgamut added 2 commits July 1, 2021 05:42
gethostbyname, gethostbyaddr follow simple implementations: they
internally call getaddrinfo and getnameinfo respectively, and fill out
the minimum details. remaining functions are stubs.
Copy link
Owner

@jart jart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thank you!

@jart jart merged commit 3fe7b95 into jart:master Jul 1, 2021
@ahgamut ahgamut deleted the hostent-impl branch July 3, 2021 23:54
@ahgamut ahgamut mentioned this pull request Jul 12, 2021
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.

2 participants