From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] iucv protocol (s390).
Date: Fri, 23 Nov 2007 10:00:00 -0000 [thread overview]
Message-ID: <1195811995.29707.3.camel@localhost> (raw)
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:
next reply other threads:[~2007-11-23 10:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-23 10:00 Martin Schwidefsky [this message]
2007-11-23 15:20 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1195811995.29707.3.camel@localhost \
--to=schwidefsky@de.ibm.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).