mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
* sysdeps/posix/getaddrinfo.c: Implement handling of DCCP and
UDPlite. * nss/getent.c (ahosts_keys_int): Handle all known socket types. * inet/netinet/in.h (IPPIPPROTO_DCCP, IPPROTO_UDPLITE): Define. * sysdeps/unix/sysv/linux/bits/socket.h (SOCK_DCCP): Define.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2008-05-14 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/posix/getaddrinfo.c: Implement handling of DCCP and
|
||||||
|
UDPlite.
|
||||||
|
|
||||||
|
* nss/getent.c (ahosts_keys_int): Handle all known socket types.
|
||||||
|
|
||||||
|
* inet/netinet/in.h (IPPIPPROTO_DCCP, IPPROTO_UDPLITE): Define.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/bits/socket.h (SOCK_DCCP): Define.
|
||||||
|
|
||||||
2008-05-13 Ulrich Drepper <drepper@redhat.com>
|
2008-05-13 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* po/lt.po: New file. From Lituanian translation team.
|
* po/lt.po: New file. From Lituanian translation team.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007
|
/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
@ -53,6 +53,8 @@ enum
|
|||||||
#define IPPROTO_IDP IPPROTO_IDP
|
#define IPPROTO_IDP IPPROTO_IDP
|
||||||
IPPROTO_TP = 29, /* SO Transport Protocol Class 4. */
|
IPPROTO_TP = 29, /* SO Transport Protocol Class 4. */
|
||||||
#define IPPROTO_TP IPPROTO_TP
|
#define IPPROTO_TP IPPROTO_TP
|
||||||
|
IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol. */
|
||||||
|
#define IPPROTO_DCCP IPPROTO_DCCP
|
||||||
IPPROTO_IPV6 = 41, /* IPv6 header. */
|
IPPROTO_IPV6 = 41, /* IPv6 header. */
|
||||||
#define IPPROTO_IPV6 IPPROTO_IPV6
|
#define IPPROTO_IPV6 IPPROTO_IPV6
|
||||||
IPPROTO_ROUTING = 43, /* IPv6 routing header. */
|
IPPROTO_ROUTING = 43, /* IPv6 routing header. */
|
||||||
@ -83,6 +85,8 @@ enum
|
|||||||
#define IPPROTO_COMP IPPROTO_COMP
|
#define IPPROTO_COMP IPPROTO_COMP
|
||||||
IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */
|
IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */
|
||||||
#define IPPROTO_SCTP IPPROTO_SCTP
|
#define IPPROTO_SCTP IPPROTO_SCTP
|
||||||
|
IPPROTO_UDPLITE = 136, /* UDP-Lite protocol. */
|
||||||
|
#define IPPROTO_UDPLITE IPPROTO_UDPLITE
|
||||||
IPPROTO_RAW = 255, /* Raw IP packets. */
|
IPPROTO_RAW = 255, /* Raw IP packets. */
|
||||||
#define IPPROTO_RAW IPPROTO_RAW
|
#define IPPROTO_RAW IPPROTO_RAW
|
||||||
IPPROTO_MAX
|
IPPROTO_MAX
|
||||||
|
16
nss/getent.c
16
nss/getent.c
@ -337,6 +337,22 @@ ahosts_keys_int (int af, int xflags, int number, char *key[])
|
|||||||
sockstr = "DGRAM";
|
sockstr = "DGRAM";
|
||||||
else if (runp->ai_socktype == SOCK_RAW)
|
else if (runp->ai_socktype == SOCK_RAW)
|
||||||
sockstr = "RAW";
|
sockstr = "RAW";
|
||||||
|
#ifdef SOCK_SEQPACKET
|
||||||
|
else if (runp->ai_socktype == SOCK_SEQPACKET)
|
||||||
|
sockstr = "SEQPACKET";
|
||||||
|
#endif
|
||||||
|
#ifdef SOCK_RDM
|
||||||
|
else if (runp->ai_socktype == SOCK_RDM)
|
||||||
|
sockstr = "RDM";
|
||||||
|
#endif
|
||||||
|
#ifdef SOCK_DCCP
|
||||||
|
else if (runp->ai_socktype == SOCK_DCCP)
|
||||||
|
sockstr = "DCCP";
|
||||||
|
#endif
|
||||||
|
#ifdef SOCK_PACKET
|
||||||
|
else if (runp->ai_socktype == SOCK_PACKET)
|
||||||
|
sockstr = "PACKET";
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf (sockbuf, sizeof (sockbuf), "%d",
|
snprintf (sockbuf, sizeof (sockbuf), "%d",
|
||||||
|
@ -97,8 +97,9 @@ struct gaih_typeproto
|
|||||||
{
|
{
|
||||||
int socktype;
|
int socktype;
|
||||||
int protocol;
|
int protocol;
|
||||||
char name[4];
|
uint8_t protoflag;
|
||||||
int protoflag;
|
bool defaultflag;
|
||||||
|
char name[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Values for `protoflag'. */
|
/* Values for `protoflag'. */
|
||||||
@ -107,11 +108,17 @@ struct gaih_typeproto
|
|||||||
|
|
||||||
static const struct gaih_typeproto gaih_inet_typeproto[] =
|
static const struct gaih_typeproto gaih_inet_typeproto[] =
|
||||||
{
|
{
|
||||||
{ 0, 0, "", 0 },
|
{ 0, 0, 0, false, "" },
|
||||||
{ SOCK_STREAM, IPPROTO_TCP, "tcp", 0 },
|
{ SOCK_STREAM, IPPROTO_TCP, 0, true, "tcp" },
|
||||||
{ SOCK_DGRAM, IPPROTO_UDP, "udp", 0 },
|
{ SOCK_DGRAM, IPPROTO_UDP, 0, true, "udp" },
|
||||||
{ SOCK_RAW, 0, "raw", GAI_PROTO_PROTOANY|GAI_PROTO_NOSERVICE },
|
#if defined SOCK_DCCP && defined IPPROTO_DCCP
|
||||||
{ 0, 0, "", 0 }
|
{ SOCK_DCCP, IPPROTO_DCCP, 0, false, "dccp" },
|
||||||
|
#endif
|
||||||
|
#ifdef IPPROTO_UDPLITE
|
||||||
|
{ SOCK_DGRAM, IPPROTO_UDPLITE, 0, false, "udplite" },
|
||||||
|
#endif
|
||||||
|
{ SOCK_RAW, 0, GAI_PROTO_PROTOANY|GAI_PROTO_NOSERVICE, true, "raw" },
|
||||||
|
{ 0, 0, 0, false, "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct gaih
|
struct gaih
|
||||||
@ -363,18 +370,19 @@ gaih_inet (const char *name, const struct gaih_service *service,
|
|||||||
we know about. */
|
we know about. */
|
||||||
struct gaih_servtuple **lastp = &st;
|
struct gaih_servtuple **lastp = &st;
|
||||||
for (++tp; tp->name[0]; ++tp)
|
for (++tp; tp->name[0]; ++tp)
|
||||||
{
|
if (tp->defaultflag)
|
||||||
struct gaih_servtuple *newp;
|
{
|
||||||
|
struct gaih_servtuple *newp;
|
||||||
|
|
||||||
newp = __alloca (sizeof (struct gaih_servtuple));
|
newp = __alloca (sizeof (struct gaih_servtuple));
|
||||||
newp->next = NULL;
|
newp->next = NULL;
|
||||||
newp->socktype = tp->socktype;
|
newp->socktype = tp->socktype;
|
||||||
newp->protocol = tp->protocol;
|
newp->protocol = tp->protocol;
|
||||||
newp->port = port;
|
newp->port = port;
|
||||||
|
|
||||||
*lastp = newp;
|
*lastp = newp;
|
||||||
lastp = &newp->next;
|
lastp = &newp->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* System-specific socket constants and types. Linux version.
|
/* System-specific socket constants and types. Linux version.
|
||||||
Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007
|
Copyright (C) 1991, 1992, 1994-2001, 2004, 2006, 2007, 2008
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
@ -52,6 +52,8 @@ enum __socket_type
|
|||||||
SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
|
SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
|
||||||
datagrams of fixed maximum length. */
|
datagrams of fixed maximum length. */
|
||||||
#define SOCK_SEQPACKET SOCK_SEQPACKET
|
#define SOCK_SEQPACKET SOCK_SEQPACKET
|
||||||
|
SOCK_DCCP = 6,
|
||||||
|
#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
|
||||||
SOCK_PACKET = 10 /* Linux specific way of getting packets
|
SOCK_PACKET = 10 /* Linux specific way of getting packets
|
||||||
at the dev level. For writing rarp and
|
at the dev level. For writing rarp and
|
||||||
other similar things on the user level. */
|
other similar things on the user level. */
|
||||||
|
Reference in New Issue
Block a user