This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, this patch adds the iucv header containing the sockaddr_iucv definition and adds the protocol to __opensock and __libc_sa_len. I'm not 100% sure about the whole thing, since it adds the protocol to every architecture. I doubt that we'll ever see AF_IUCV on anything else than a s390 machine. Please advise. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. --- 2007-11-23 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/unix/sysv/linux/Makefile [subdir=inet] (sysdep_headers): Add netiucv/iucv.h. * sysdeps/unix/sysv/linux/netiucv/iucv.h: New file. * sysdeps/unix/sysv/linux/opensock.c (__opensock): Add AF_IUCV protocol. * sysdeps/unix/sysv/linux/sa_len.c (__libc_sa_len): Likewise. diff -urpN libc/sysdeps/unix/sysv/linux/Makefile libc-s390/sysdeps/unix/sysv/linux/Makefile --- libc/sysdeps/unix/sysv/linux/Makefile 2007-11-21 14:50:48.000000000 +0100 +++ libc-s390/sysdeps/unix/sysv/linux/Makefile 2007-11-23 10:17:42.000000000 +0100 @@ -122,7 +122,7 @@ ifeq ($(subdir),inet) sysdep_headers += netinet/if_fddi.h netinet/if_tr.h \ netipx/ipx.h netash/ash.h netax25/ax25.h netatalk/at.h \ netrom/netrom.h netpacket/packet.h netrose/rose.h \ - neteconet/ec.h + neteconet/ec.h netiucv/iucv.h endif # Don't compile the ctype glue code, since there is no old non-GNU C library. diff -urpN libc/sysdeps/unix/sysv/linux/netiucv/iucv.h libc-s390/sysdeps/unix/sysv/linux/netiucv/iucv.h --- libc/sysdeps/unix/sysv/linux/netiucv/iucv.h 1970-01-01 01:00:00.000000000 +0100 +++ libc-s390/sysdeps/unix/sysv/linux/netiucv/iucv.h 2007-11-23 10:33:08.000000000 +0100 @@ -0,0 +1,39 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef __NETIUCV_IUCV_H +#define __NETIUCV_IUCV_H 1 + +#include <features.h> +#include <bits/sockaddr.h> + +__BEGIN_DECLS + +struct sockaddr_iucv + { + __SOCKADDR_COMMON (siucv_); + unsigned short siucv_port; /* Reserved */ + unsigned int siucv_addr; /* Reserved */ + char siucv_nodeid[8]; /* Reserved */ + char siucv_user_id[8]; /* Guest User Id */ + char siucv_name[8]; /* Application Name */ + }; + +__END_DECLS + +#endif diff -urpN libc/sysdeps/unix/sysv/linux/opensock.c libc-s390/sysdeps/unix/sysv/linux/opensock.c --- libc/sysdeps/unix/sysv/linux/opensock.c 2007-11-09 16:39:51.000000000 +0100 +++ libc-s390/sysdeps/unix/sysv/linux/opensock.c 2007-11-23 10:28:31.000000000 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2001, 2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -53,7 +53,8 @@ __opensock (void) { AF_APPLETALK, "net/appletalk" }, { AF_ECONET, "sys/net/econet" }, { AF_ASH, "sys/net/ash" }, - { AF_X25, "net/x25" } + { AF_X25, "net/x25" }, + { AF_IUCV, "net/iucv" } }; #define nafs (sizeof (afs) / sizeof (afs[0])) char fname[sizeof "/proc/" + 14]; diff -urpN libc/sysdeps/unix/sysv/linux/sa_len.c libc-s390/sysdeps/unix/sysv/linux/sa_len.c --- libc/sysdeps/unix/sysv/linux/sa_len.c 2007-11-09 16:39:38.000000000 +0100 +++ libc-s390/sysdeps/unix/sysv/linux/sa_len.c 2007-11-23 10:29:06.000000000 +0100 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,6 +26,7 @@ #include <netipx/ipx.h> #include <netpacket/packet.h> #include <netrose/rose.h> +#include <netiucv/iucv.h> #include <sys/un.h> int @@ -47,6 +48,8 @@ __libc_sa_len (sa_family_t af) return sizeof (struct sockaddr_in6); case AF_IPX: return sizeof (struct sockaddr_ipx); + case AF_IUCV: + return sizeof (struct sockaddr_iucv); case AF_LOCAL: return sizeof (struct sockaddr_un); case AF_PACKET:
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |