socket.h (83045) | socket.h (90135) |
---|---|
1/* 2 * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)socket.h 8.4 (Berkeley) 2/21/94 | 1/* 2 * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)socket.h 8.4 (Berkeley) 2/21/94 |
34 * $FreeBSD: head/sys/sys/socket.h 83045 2001-09-05 01:22:14Z obrien $ | 34 * $FreeBSD: head/sys/sys/socket.h 90135 2002-02-03 11:36:59Z markm $ |
35 */ 36 37#ifndef _SYS_SOCKET_H_ 38#define _SYS_SOCKET_H_ 39 40#include <machine/ansi.h> 41#define _NO_NAMESPACE_POLLUTION 42#include <machine/param.h> --- 131 unchanged lines hidden (view full) --- 174struct sockproto { 175 u_short sp_family; /* address family */ 176 u_short sp_protocol; /* protocol */ 177}; 178 179/* 180 * RFC 2553: protocol-independent placeholder for socket addresses 181 */ | 35 */ 36 37#ifndef _SYS_SOCKET_H_ 38#define _SYS_SOCKET_H_ 39 40#include <machine/ansi.h> 41#define _NO_NAMESPACE_POLLUTION 42#include <machine/param.h> --- 131 unchanged lines hidden (view full) --- 174struct sockproto { 175 u_short sp_family; /* address family */ 176 u_short sp_protocol; /* protocol */ 177}; 178 179/* 180 * RFC 2553: protocol-independent placeholder for socket addresses 181 */ |
182#define _SS_MAXSIZE 128 | 182#define _SS_MAXSIZE 128U |
183#define _SS_ALIGNSIZE (sizeof(int64_t)) 184#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) - sizeof(sa_family_t)) 185#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) - sizeof(sa_family_t) - \ 186 _SS_PAD1SIZE - _SS_ALIGNSIZE) 187 188struct sockaddr_storage { 189 u_char ss_len; /* address length */ 190 sa_family_t ss_family; /* address family */ --- 277 unchanged lines hidden --- | 183#define _SS_ALIGNSIZE (sizeof(int64_t)) 184#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_char) - sizeof(sa_family_t)) 185#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(u_char) - sizeof(sa_family_t) - \ 186 _SS_PAD1SIZE - _SS_ALIGNSIZE) 187 188struct sockaddr_storage { 189 u_char ss_len; /* address length */ 190 sa_family_t ss_family; /* address family */ --- 277 unchanged lines hidden --- |