Deleted Added
full compact
sctp_constants.h (168124) sctp_constants.h (168299)
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_constants.h,v 1.17 2005/03/06 16:04:17 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_constants.h,v 1.17 2005/03/06 16:04:17 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_constants.h 168124 2007-03-31 11:47:30Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_constants.h 168299 2007-04-03 11:15:32Z rrs $");
35
36#ifndef __sctp_constants_h__
37#define __sctp_constants_h__
38
39/* Number of packets to get before sack sent by default */
40#define SCTP_DEFAULT_SACK_FREQ 2
41
42/* Address limit - This variable is calculated
35
36#ifndef __sctp_constants_h__
37#define __sctp_constants_h__
38
39/* Number of packets to get before sack sent by default */
40#define SCTP_DEFAULT_SACK_FREQ 2
41
42/* Address limit - This variable is calculated
43 * based on an 1500 byte mtu. We take out 100 bytes
43 * based on an 65535 byte max ip packet. We take out 100 bytes
44 * for the cookie, 40 bytes for a v6 header and 32
45 * bytes for the init structure. A second init structure
46 * for the init-ack and then finally a third one for the
47 * imbedded init. This yeilds 100+40+(3 * 32) = 236 bytes.
44 * for the cookie, 40 bytes for a v6 header and 32
45 * bytes for the init structure. A second init structure
46 * for the init-ack and then finally a third one for the
47 * imbedded init. This yeilds 100+40+(3 * 32) = 236 bytes.
48 * This leaves 1264 bytes for addresses. Now whatever we
49 * send in the INIT() we need to allow to get back in the
48 * This leaves 65299 bytes for addresses. We throw out the 299 bytes.
49 * Now whatever we send in the INIT() we need to allow to get back in the
50 * INIT-ACK plus all the values from INIT and INIT-ACK
51 * listed in the cookie. Plus we need some overhead for
52 * maybe copied parameters in the COOKIE. If we
50 * INIT-ACK plus all the values from INIT and INIT-ACK
51 * listed in the cookie. Plus we need some overhead for
52 * maybe copied parameters in the COOKIE. If we
53 * allow 20 addresses, and each side has 20 V6 addresses
54 * that will be 400 bytes. In the INIT-ACK we will
55 * see the INIT-ACK 400 + 800 in the cookie. This leaves
56 * 64 bytes slack for misc things in the cookie. Otherwise
57 * we need to allow IP fragmentation.. which I believe
58 * the INIT-ACK and COOKIE do, I don't think we do that
59 * to the INIT though. So the max you could make this
60 * value is 60 addresses.
53 * allow 1080 addresses, and each side has 1080 V6 addresses
54 * that will be 21600 bytes. In the INIT-ACK we will
55 * see the INIT-ACK 21600 + 43200 in the cookie. This leaves
56 * about 500 bytes slack for misc things in the cookie.
61 */
57 */
62#define SCTP_ADDRESS_LIMIT 20
58#define SCTP_ADDRESS_LIMIT 1080
63
64/* Number of addresses where we just skip the counting */
65#define SCTP_COUNT_LIMIT 40
66
67/* Number of ticks to delay before running
68 * iterator on an address change.
69 */
70#define SCTP_ADDRESS_TICK_DELAY 2

--- 957 unchanged lines hidden ---
59
60/* Number of addresses where we just skip the counting */
61#define SCTP_COUNT_LIMIT 40
62
63/* Number of ticks to delay before running
64 * iterator on an address change.
65 */
66#define SCTP_ADDRESS_TICK_DELAY 2

--- 957 unchanged lines hidden ---