Deleted Added
full compact
uipc_sockbuf.c (126411) uipc_sockbuf.c (126425)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993
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

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

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 * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
34 */
35
36#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993
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

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

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 * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
34 */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/kern/uipc_sockbuf.c 126411 2004-02-29 17:54:05Z rwatson $");
37__FBSDID("$FreeBSD: head/sys/kern/uipc_sockbuf.c 126425 2004-03-01 03:14:23Z rwatson $");
38
39#include "opt_mac.h"
40#include "opt_param.h"
41
42#include <sys/param.h>
43#include <sys/aio.h> /* for aio_swake proto */
44#include <sys/domain.h>
45#include <sys/event.h>

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

1056{
1057
1058}
1059
1060/*
1061 * Make a copy of a sockaddr in a malloced buffer of type M_SONAME.
1062 */
1063struct sockaddr *
38
39#include "opt_mac.h"
40#include "opt_param.h"
41
42#include <sys/param.h>
43#include <sys/aio.h> /* for aio_swake proto */
44#include <sys/domain.h>
45#include <sys/event.h>

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

1056{
1057
1058}
1059
1060/*
1061 * Make a copy of a sockaddr in a malloced buffer of type M_SONAME.
1062 */
1063struct sockaddr *
1064dup_sockaddr(sa, canwait)
1065 struct sockaddr *sa;
1066 int canwait;
1064sodupsockaddr(const struct sockaddr *sa, int mflags)
1067{
1068 struct sockaddr *sa2;
1069
1065{
1066 struct sockaddr *sa2;
1067
1070 MALLOC(sa2, struct sockaddr *, sa->sa_len, M_SONAME,
1071 canwait ? M_WAITOK : M_NOWAIT);
1068 sa2 = malloc(sa->sa_len, M_SONAME, mflags);
1072 if (sa2)
1073 bcopy(sa, sa2, sa->sa_len);
1074 return sa2;
1075}
1076
1077/*
1078 * Create an external-format (``xsocket'') structure using the information
1079 * in the kernel-format socket structure pointed to by so. This is done

--- 72 unchanged lines hidden ---
1069 if (sa2)
1070 bcopy(sa, sa2, sa->sa_len);
1071 return sa2;
1072}
1073
1074/*
1075 * Create an external-format (``xsocket'') structure using the information
1076 * in the kernel-format socket structure pointed to by so. This is done

--- 72 unchanged lines hidden ---