Deleted Added
full compact
sctp_var.h (172396) sctp_var.h (172703)
1/*-
2 * Copyright (c) 2001-2007, by 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_var.h,v 1.24 2005/03/06 16:04:19 itojun Exp $ */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001-2007, by 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_var.h,v 1.24 2005/03/06 16:04:19 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_var.h 172396 2007-10-01 03:22:29Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_var.h 172703 2007-10-16 14:05:51Z rrs $");
35
36#ifndef _NETINET_SCTP_VAR_H_
37#define _NETINET_SCTP_VAR_H_
38
39#include <netinet/sctp_uio.h>
40
41#if defined(_KERNEL)
42

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

51/* managing mobility_feature in inpcb (by micchie) */
52#define sctp_mobility_feature_on(inp, feature) (inp->sctp_mobility_features |= feature)
53#define sctp_mobility_feature_off(inp, feature) (inp->sctp_mobility_features &= ~feature)
54#define sctp_is_mobility_feature_on(inp, feature) (inp->sctp_mobility_features & feature)
55#define sctp_is_mobility_feature_off(inp, feature) ((inp->sctp_mobility_features & feature) == 0)
56
57#define sctp_maxspace(sb) (max((sb)->sb_hiwat,SCTP_MINIMAL_RWND))
58
35
36#ifndef _NETINET_SCTP_VAR_H_
37#define _NETINET_SCTP_VAR_H_
38
39#include <netinet/sctp_uio.h>
40
41#if defined(_KERNEL)
42

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

51/* managing mobility_feature in inpcb (by micchie) */
52#define sctp_mobility_feature_on(inp, feature) (inp->sctp_mobility_features |= feature)
53#define sctp_mobility_feature_off(inp, feature) (inp->sctp_mobility_features &= ~feature)
54#define sctp_is_mobility_feature_on(inp, feature) (inp->sctp_mobility_features & feature)
55#define sctp_is_mobility_feature_off(inp, feature) ((inp->sctp_mobility_features & feature) == 0)
56
57#define sctp_maxspace(sb) (max((sb)->sb_hiwat,SCTP_MINIMAL_RWND))
58
59#define sctp_sbspace(asoc, sb) ((long) (sctp_maxspace(sb) > (asoc)->sb_cc) ? (sctp_maxspace(sb) - (asoc)->sb_cc) : 0)
59#define sctp_sbspace(asoc, sb) ((long) ((sctp_maxspace(sb) > (asoc)->sb_cc) ? (sctp_maxspace(sb) - (asoc)->sb_cc) : 0))
60
61#define sctp_sbspace_failedmsgs(sb) ((long) ((sctp_maxspace(sb) > (sb)->sb_cc) ? (sctp_maxspace(sb) - (sb)->sb_cc) : 0))
62
63#define sctp_sbspace_sub(a,b) ((a > b) ? (a - b) : 0)
64
65/*
66 * I tried to cache the readq entries at one point. But the reality
67 * is that it did not add any performance since this meant we had to

--- 269 unchanged lines hidden ---
60
61#define sctp_sbspace_failedmsgs(sb) ((long) ((sctp_maxspace(sb) > (sb)->sb_cc) ? (sctp_maxspace(sb) - (sb)->sb_cc) : 0))
62
63#define sctp_sbspace_sub(a,b) ((a > b) ? (a - b) : 0)
64
65/*
66 * I tried to cache the readq entries at one point. But the reality
67 * is that it did not add any performance since this meant we had to

--- 269 unchanged lines hidden ---