From 801dc9e019310427d36c13469ad89b8869b2c94a Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 6 Jun 1999 23:19:09 +0000 Subject: sockaddr_storage; per rfc2553 --- sys/sys/socket.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/sys/socket.h b/sys/sys/socket.h index f11ceb712ba..8c71d6fb068 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -1,4 +1,4 @@ -/* $OpenBSD: socket.h,v 1.28 1999/02/25 03:31:34 deraadt Exp $ */ +/* $OpenBSD: socket.h,v 1.29 1999/06/06 23:19:08 deraadt Exp $ */ /* $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ */ /* @@ -141,6 +141,18 @@ struct sockaddr { char sa_data[14]; /* actually longer; address value */ }; +/* + * Sockaddr type which can hold any sockaddr type available + * in the system. + */ +struct sockaddr_storage { + u_int8_t ss_len; /* total length */ + sa_family_t ss_family; /* address family */ + u_char __ss_pad1[6]; /* align to quad */ + u_int64_t __ss_pad2; /* force alignment for stupid compilers */ + u_char __ss_pad3[240]; /* pad to a total of 256 bytes */ +}; + /* * Structure used by kernel to pass protocol * information in raw sockets. -- cgit v1.2.3