Deleted Added
full compact
sctp_usrreq.c (168709) sctp_usrreq.c (168859)
1/*-
2 * Copyright (c) 2001-2007, Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

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

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_usrreq.c,v 1.48 2005/03/07 23:26:08 itojun Exp $ */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2007, Cisco Systems, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * a) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.

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

26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31/* $KAME: sctp_usrreq.c,v 1.48 2005/03/07 23:26:08 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 168709 2007-04-14 09:44:09Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 168859 2007-04-19 11:28:43Z rrs $");
35#include <netinet/sctp_os.h>
36#include <sys/proc.h>
37#include <netinet/sctp_pcb.h>
38#include <netinet/sctp_header.h>
39#include <netinet/sctp_var.h>
40#if defined(INET6)
41#include <netinet6/sctp6_var.h>
42#endif

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

1717 }
1718 break;
1719 case SCTP_MAXSEG:
1720 {
1721 struct sctp_assoc_value *av;
1722 int ovh;
1723
1724 SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, *optsize);
35#include <netinet/sctp_os.h>
36#include <sys/proc.h>
37#include <netinet/sctp_pcb.h>
38#include <netinet/sctp_header.h>
39#include <netinet/sctp_var.h>
40#if defined(INET6)
41#include <netinet6/sctp6_var.h>
42#endif

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

1717 }
1718 break;
1719 case SCTP_MAXSEG:
1720 {
1721 struct sctp_assoc_value *av;
1722 int ovh;
1723
1724 SCTP_CHECK_AND_CAST(av, optval, struct sctp_assoc_value, *optsize);
1725 SCTP_FIND_STCB(inp, stcb, av->assoc_id);
1725 if (av->assoc_id) {
1726 SCTP_FIND_STCB(inp, stcb, av->assoc_id);
1727 } else {
1728 stcb = NULL;
1729 }
1726
1727 if (stcb) {
1728 av->assoc_value = sctp_get_frag_point(stcb, &stcb->asoc);
1729 SCTP_TCB_UNLOCK(stcb);
1730 } else {
1731 SCTP_INP_RLOCK(inp);
1732 if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) {
1733 ovh = SCTP_MED_OVERHEAD;

--- 2194 unchanged lines hidden ---
1730
1731 if (stcb) {
1732 av->assoc_value = sctp_get_frag_point(stcb, &stcb->asoc);
1733 SCTP_TCB_UNLOCK(stcb);
1734 } else {
1735 SCTP_INP_RLOCK(inp);
1736 if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) {
1737 ovh = SCTP_MED_OVERHEAD;

--- 2194 unchanged lines hidden ---