This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

getaddrinfo() problems with IPPROTO_SCTP


Hello.

This is my first message to the list. I hope it is the correct list,
please forgive me if this is not the case.

I am having problems calling getaddrinfo(). We are implementing a c++
library of SctpSockets that work in linux,
solaris and hopefully windows. But it seems that getaddrinfo refuses
to resolve addresses and ports with IPPROTO_SCTP.
This problems shows in linux only, in solaris it works ok.

I made a small test program that tries all combination of:
  - hints.ai_family: 0, AF_INET and AF_INET6
  - hints.ai_socktype: 0, SOCK_STREAM, SOCK_SEQPACKET
  - hints.ai_protocol: 0, IPPROTO_UDP, IPPROTO_TCP, IPPROTO_SCTP

With:
  - addr=aries, port=m3ua, hint.ai_flags=AI_PASSIVE|AI_V4MAPPED
  - addr=aries, port=m3ua, hint.ai_flags=AI_V4MAPPED
  - addr=127.0.0.1 port=10329,
hint.ai_flags=AI_PASSIVE|AI_V4MAPPED|AI_NUMERICHOST|AI_NUMERICSERV
  - addr=127.0.0.1 port=10329,
hint.ai_flags=AI_V4MAPPED|AI_NUMERICHOST|AI_NUMERICSERV

Note: aries resolves correctly to 172.16.96.2 in my intranet.

The results are expresed in the followin table.

   family   socktype       protocol      Result
1)   *      SOCK_SEQPACKET   *           -7 ai_socktype not supported
2)   *      SOCK_STREAM    IPPROTO_UDP   -7 ai_socktype not supported
3)   *      SOCK_STREAM    IPPROTO_SCTP  -7 ai_socktype not supported
4)   *         0           IPPROTO_SCTP  -8 Servname not supported for
ai_socktype
5)  ### all other combinations ###       ok

Note: '*' stands for all the possibilities.

I am obviously concerned with numrer (3) and (4). I thing (2) is the
correct behaviour.

Anyone out there can help/explain me what is wrong?

Thanks


-- 
  Juan Carlos Franzoy
Licenciado en Sistemas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]