Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys XNS5.2: define sa_family_t and use it where specified by...
details: https://anonhg.NetBSD.org/src/rev/d03c8b233369
branches: trunk
changeset: 493880:d03c8b233369
user: kleink <kleink%NetBSD.org@localhost>
date: Mon Jun 26 15:48:19 2000 +0000
description:
XNS5.2: define sa_family_t and use it where specified by the standard.
diffstat:
sys/netinet/in.h | 19 +++++++++++++------
sys/netinet6/in6.h | 4 ++--
sys/sys/socket.h | 24 +++++++++++++++---------
sys/sys/un.h | 11 +++++++++--
4 files changed, 39 insertions(+), 19 deletions(-)
diffs (140 lines):
diff -r 02db67feaee7 -r d03c8b233369 sys/netinet/in.h
--- a/sys/netinet/in.h Mon Jun 26 15:46:03 2000 +0000
+++ b/sys/netinet/in.h Mon Jun 26 15:48:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.h,v 1.47 2000/03/10 15:30:55 itojun Exp $ */
+/* $NetBSD: in.h,v 1.48 2000/06/26 15:48:19 kleink Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -43,6 +43,13 @@
#ifndef _NETINET_IN_H_
#define _NETINET_IN_H_
+#include <sys/ansi.h>
+
+#ifndef sa_family_t
+typedef __sa_family_t sa_family_t;
+#define sa_family_t sa_family_t
+#endif
+
/*
* Protocols
*/
@@ -193,11 +200,11 @@
* Socket address, internet style.
*/
struct sockaddr_in {
- u_int8_t sin_len;
- u_int8_t sin_family;
- u_int16_t sin_port;
- struct in_addr sin_addr;
- int8_t sin_zero[8];
+ u_int8_t sin_len;
+ sa_family_t sin_family;
+ u_int16_t sin_port;
+ struct in_addr sin_addr;
+ int8_t sin_zero[8];
};
#define INET_ADDRSTRLEN 16
diff -r 02db67feaee7 -r d03c8b233369 sys/netinet6/in6.h
--- a/sys/netinet6/in6.h Mon Jun 26 15:46:03 2000 +0000
+++ b/sys/netinet6/in6.h Mon Jun 26 15:48:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6.h,v 1.15 2000/06/08 19:01:44 danw Exp $ */
+/* $NetBSD: in6.h,v 1.16 2000/06/26 15:48:20 kleink Exp $ */
/* $KAME: in6.h,v 1.44 2000/05/24 08:50:17 itojun Exp $ */
/*
@@ -144,7 +144,7 @@
#endif
struct sockaddr_in6 {
u_int8_t sin6_len; /* length of this struct(sa_family_t)*/
- u_int8_t sin6_family; /* AF_INET6 (sa_family_t) */
+ sa_family_t sin6_family; /* AF_INET6 (sa_family_t) */
u_int16_t sin6_port; /* Transport layer port # (in_port_t)*/
u_int32_t sin6_flowinfo; /* IP6 flow information */
struct in6_addr sin6_addr; /* IP6 address */
diff -r 02db67feaee7 -r d03c8b233369 sys/sys/socket.h
--- a/sys/sys/socket.h Mon Jun 26 15:46:03 2000 +0000
+++ b/sys/sys/socket.h Mon Jun 26 15:48:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: socket.h,v 1.55 2000/06/04 08:50:28 itojun Exp $ */
+/* $NetBSD: socket.h,v 1.56 2000/06/26 15:48:21 kleink Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -75,6 +75,12 @@
* Data types.
*/
#include <sys/ansi.h>
+
+#ifndef sa_family_t
+typedef __sa_family_t sa_family_t;
+#define sa_family_t sa_family_t
+#endif
+
#ifndef socklen_t
typedef __socklen_t socklen_t;
#define socklen_t socklen_t
@@ -183,9 +189,9 @@
* addresses.
*/
struct sockaddr {
- u_char sa_len; /* total length */
- u_char sa_family; /* address family */
- char sa_data[14]; /* actually longer; address value */
+ u_char sa_len; /* total length */
+ sa_family_t sa_family; /* address family */
+ char sa_data[14]; /* actually longer; address value */
};
#if defined(_KERNEL)
@@ -211,11 +217,11 @@
#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500
struct sockaddr_storage {
- u_char ss_len; /* address length */
- u_char ss_family; /* address family */
- char __ss_pad1[_SS_PAD1SIZE];
- int64_t __ss_align; /* force desired structure storage alignment */
- char __ss_pad2[_SS_PAD2SIZE];
+ u_char ss_len; /* address length */
+ sa_family_t ss_family; /* address family */
+ char __ss_pad1[_SS_PAD1SIZE];
+ int64_t __ss_align;/* force desired structure storage alignment */
+ char __ss_pad2[_SS_PAD2SIZE];
};
#endif /* !_XOPEN_SOURCE || ... */
#endif /* 1 */
diff -r 02db67feaee7 -r d03c8b233369 sys/sys/un.h
--- a/sys/sys/un.h Mon Jun 26 15:46:03 2000 +0000
+++ b/sys/sys/un.h Mon Jun 26 15:48:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: un.h,v 1.23 2000/06/08 19:01:45 danw Exp $ */
+/* $NetBSD: un.h,v 1.24 2000/06/26 15:48:21 kleink Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -38,12 +38,19 @@
#ifndef _SYS_UN_H_
#define _SYS_UN_H_
+#include <sys/ansi.h>
+
+#ifndef sa_family_t
+typedef __sa_family_t sa_family_t;
+#define sa_family_t sa_family_t
+#endif
+
/*
* Definitions for UNIX IPC domain.
*/
struct sockaddr_un {
u_int8_t sun_len; /* total sockaddr length */
- u_int8_t sun_family; /* AF_LOCAL */
+ sa_family_t sun_family; /* AF_LOCAL */
char sun_path[104]; /* path name (gag) */
};
Home |
Main Index |
Thread Index |
Old Index