From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20353 invoked by alias); 23 Nov 2007 10:00:09 -0000 Received: (qmail 20336 invoked by uid 22791); 23 Nov 2007 10:00:09 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.29.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 23 Nov 2007 09:59:58 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.8/8.13.8) with ESMTP id lAN9xtR6192046 for ; Fri, 23 Nov 2007 09:59:55 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id lAN9xtIK2941130 for ; Fri, 23 Nov 2007 10:59:55 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id lAN9xtBF018859 for ; Fri, 23 Nov 2007 10:59:55 +0100 Received: from [9.152.198.118] (dyn-9-152-198-118.boeblingen.de.ibm.com [9.152.198.118]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id lAN9xtiM018852 for ; Fri, 23 Nov 2007 10:59:55 +0100 Subject: [PATCH] iucv protocol (s390). From: Martin Schwidefsky Reply-To: schwidefsky@de.ibm.com To: Glibc hackers Content-Type: text/plain Date: Fri, 23 Nov 2007 10:00:00 -0000 Message-Id: <1195811995.29707.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00005.txt.bz2 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 * 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 +#include + +__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 #include #include +#include #include 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: