summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2014-04-07 01:53:03 +0000
committerkevlo <kevlo@FreeBSD.org>2014-04-07 01:53:03 +0000
commit45fcb795ff06a8693c03048461d7be0b2d43627d (patch)
tree69719bfe080899044cf9419591eebaf715aae2c3 /lib/libc
parent5f6d95139dc67a00b05a60789afb47ff42ad9122 (diff)
downloadFreeBSD-src-45fcb795ff06a8693c03048461d7be0b2d43627d.zip
FreeBSD-src-45fcb795ff06a8693c03048461d7be0b2d43627d.tar.gz
Add support for UDP-Lite protocol (RFC 3828) to IPv4 and IPv6 stacks.
Tested with vlc and a test suite [1]. [1] http://www.erg.abdn.ac.uk/~gerrit/udp-lite/files/udplite_linux.tar.gz Reviewed by: jhb, glebius, adrian
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/getaddrinfo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 495ebc1..00ab796 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -170,12 +170,14 @@ static const struct explore explore[] = {
{ PF_INET6, SOCK_STREAM, IPPROTO_TCP, 0x07 },
{ PF_INET6, SOCK_STREAM, IPPROTO_SCTP, 0x03 },
{ PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 },
+ { PF_INET6, SOCK_DGRAM, IPPROTO_UDPLITE, 0x03 },
{ PF_INET6, SOCK_RAW, ANY, 0x05 },
#endif
{ PF_INET, SOCK_DGRAM, IPPROTO_UDP, 0x07 },
{ PF_INET, SOCK_STREAM, IPPROTO_TCP, 0x07 },
{ PF_INET, SOCK_STREAM, IPPROTO_SCTP, 0x03 },
{ PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, 0x07 },
+ { PF_INET, SOCK_DGRAM, IPPROTO_UDPLITE, 0x03 },
{ PF_INET, SOCK_RAW, ANY, 0x05 },
{ -1, 0, 0, 0 },
};
@@ -1477,6 +1479,9 @@ get_port(struct addrinfo *ai, const char *servname, int matchonly)
case IPPROTO_SCTP:
proto = "sctp";
break;
+ case IPPROTO_UDPLITE:
+ proto = "udplite";
+ break;
default:
proto = NULL;
break;
OpenPOWER on IntegriCloud