Deleted Added
full compact
uipc_sockbuf.c (77900) uipc_sockbuf.c (78945)
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

--- 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 * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
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

--- 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 * @(#)uipc_socket2.c 8.1 (Berkeley) 6/10/93
34 * $FreeBSD: head/sys/kern/uipc_sockbuf.c 77900 2001-06-08 05:24:21Z peter $
34 * $FreeBSD: head/sys/kern/uipc_sockbuf.c 78945 2001-06-29 04:01:38Z jlemon $
35 */
36
37#include "opt_param.h"
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/domain.h>
41#include <sys/file.h> /* for maxfiles */
42#include <sys/kernel.h>

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

625sbappendaddr(sb, asa, m0, control)
626 register struct sockbuf *sb;
627 struct sockaddr *asa;
628 struct mbuf *m0, *control;
629{
630 register struct mbuf *m, *n;
631 int space = asa->sa_len;
632
35 */
36
37#include "opt_param.h"
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/domain.h>
41#include <sys/file.h> /* for maxfiles */
42#include <sys/kernel.h>

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

625sbappendaddr(sb, asa, m0, control)
626 register struct sockbuf *sb;
627 struct sockaddr *asa;
628 struct mbuf *m0, *control;
629{
630 register struct mbuf *m, *n;
631 int space = asa->sa_len;
632
633if (m0 && (m0->m_flags & M_PKTHDR) == 0)
634panic("sbappendaddr");
633 if (m0 && (m0->m_flags & M_PKTHDR) == 0)
634 panic("sbappendaddr");
635 if (m0)
636 space += m0->m_pkthdr.len;
637 for (n = control; n; n = n->m_next) {
638 space += n->m_len;
639 if (n->m_next == 0) /* keep pointer to last control buf */
640 break;
641 }
642 if (space > sbspace(sb))

--- 376 unchanged lines hidden ---
635 if (m0)
636 space += m0->m_pkthdr.len;
637 for (n = control; n; n = n->m_next) {
638 space += n->m_len;
639 if (n->m_next == 0) /* keep pointer to last control buf */
640 break;
641 }
642 if (space > sbspace(sb))

--- 376 unchanged lines hidden ---