Deleted Added
sdiff udiff text old ( 22975 ) new ( 24083 )
full compact
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 * $Id$
35 */
36
37#ifndef _SYS_SOCKET_H_
38#define _SYS_SOCKET_H_
39
40/*
41 * Definitions related to sockets: types, address families, options.
42 */

--- 241 unchanged lines hidden (view full) ---

284 */
285struct cmsghdr {
286 u_int cmsg_len; /* data byte count, including hdr */
287 int cmsg_level; /* originating protocol */
288 int cmsg_type; /* protocol-specific type */
289/* followed by u_char cmsg_data[]; */
290};
291
292/* given pointer to struct cmsghdr, return pointer to data */
293#define CMSG_DATA(cmsg) ((u_char *)((cmsg) + 1))
294
295/* given pointer to struct cmsghdr, return pointer to next cmsghdr */
296#define CMSG_NXTHDR(mhdr, cmsg) \
297 (((caddr_t)(cmsg) + (cmsg)->cmsg_len + sizeof(struct cmsghdr) > \
298 (mhdr)->msg_control + (mhdr)->msg_controllen) ? \
299 (struct cmsghdr *)NULL : \
300 (struct cmsghdr *)((caddr_t)(cmsg) + ALIGN((cmsg)->cmsg_len)))
301
302#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
303
304/* "Socket"-level control message types: */
305#define SCM_RIGHTS 0x01 /* access rights (array of int) */
306#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */
307
308/*
309 * 4.3 compat sockaddr, move to compat file later
310 */
311struct osockaddr {
312 u_short sa_family; /* address family */
313 char sa_data[14]; /* up to 14 bytes of direct address */
314};

--- 42 unchanged lines hidden ---