This is the mail archive of the libc-alpha@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]

[PATCH] Allow getaddrinfo() to accept SCTP socket types in hints


The following patch fixes getaddrinfo() to accept SCTP socket-type/protocol
to be specified in hints.
SCTP has been supported in linux kernel for quite some time and the
2 styles of SCTP sockets are defined in the following SCTP sockets API
extension draft.
  http://www.ietf.org/internet-drafts/draft-ietf-tsvwg-sctpsocket-13.txt

Thanks
Sridhar

=======================


diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index dd5a57d..5182f53 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -117,6 +117,8 @@ static const struct gaih_typeproto gaih_
   { 0, 0, "", 0 },
   { SOCK_STREAM, IPPROTO_TCP, "tcp", 0 },
   { SOCK_DGRAM, IPPROTO_UDP, "udp", 0 },
+  { SOCK_STREAM, IPPROTO_SCTP, "sctp", 0 },
+  { SOCK_SEQPACKET, IPPROTO_SCTP, "sctp", 0 },
   { SOCK_RAW, 0, "raw", GAI_PROTO_PROTOANY|GAI_PROTO_NOSERVICE },
   { 0, 0, "", 0 }
 };





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