-
Notifications
You must be signed in to change notification settings - Fork 230
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
getaddrinfo POSIX problems #93
Comments
Hi Richard,
The code you pointed at happens after trying (and failing) to use strtoul to convert the ServiceName into a numeric value. What are you passing in to the second argument of getaddrinfo? I'm realizing now that I think I got the error code wrong. That quote wants EAI_NONAME, not EAI_SERVICE as I'm returning (though EAI_SERVICE still makes more sense to me, as it's the service that failed translation, not the name) Sorry my responses are a little delayed, I was travelling yesterday. I'm travelling a bit today too, but had some time this morning to peek at my email. My internet access might be slightly more sporadic for the next week or so. |
Sorry, I read the condition incorrectly. Looking more carefully, I now believe the problem is failure in getservbyname. This is another case where documentation (http://www.minocacorp.com/doc/1375/api/LIBC_API/element/362073/) describes something that does not exist. In os/apps/libc/dynamic/netent.c is: |
Yes, sorry about that. As a workaround until someone implements getservbyname you can pass the service name parameter as a port number string directly, ie "80" instead of "www". |
pkg/minoca/os/apps/libc/dynamic/gaddrinf.c contains:
POSIX says:
The ai_flags field to which the hints parameter points shall be set to zero or be the bitwise-inclusive OR of one or more of the values AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST, AI_NUMERICSERV, AI_V4MAPPED, AI_ALL, and AI_ADDRCONFIG.
Minoca defines AI_ADDRCONFIG in apps/libc/include/netdb.h and should support its use in the hints argument of getaddrinfo.
I have not looked at whether Minoca supports IP6, but that is not the issue here. Support for AI_ADDRCONFIG is needed so Minoca can run POSIX-compliant programs that want to adapt to whatever network facilities are available in the current platform.
The text was updated successfully, but these errors were encountered: