Dear Pablo,
getaddrinfo does not work for the combination of AF_INET, SOCK_RAW
and IPPROTO_GRE. I have attached an example application that can be
compiled with:
$ gcc -o fr fr.c `pkg-config --cflags --libs libosmocore libosmogb`
this prints:
getaddrinfo returned NULL: Success
FAILED
gettadrinfo returns -8 which should be this:
# define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */
I am not sure what is the most clever way to resolve this. Make SOCK_RAW
branch out early and do the socket/bind(/listen) manually, use getaddrinfo
twice with some more unspefici options, just deal with SOCK_RAW differently
now? The attached code has the benefit of at least handling INET and INET6
inside the getaddrinfo result.
any ideas?
holger
Attachments:
- fr.c
(text/x-csrc — 461 bytes)
- foo.diff
(text/x-diff — 990 bytes)