Deleted Added
full compact
sctp_var.h (189790) sctp_var.h (206137)
1/*-
2 * Copyright (c) 2001-2008, 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-2008, 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 189790 2009-03-14 13:42:13Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_var.h 206137 2010-04-03 15:40:14Z tuexen $");
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) || defined(__Userspace__)
42

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

103 } \
104}
105
106#define sctp_free_a_chunk(_stcb, _chk) { \
107 if ((_chk)->holds_key_ref) {\
108 sctp_auth_key_release((_stcb), (_chk)->auth_keyid); \
109 (_chk)->holds_key_ref = 0; \
110 } \
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) || defined(__Userspace__)
42

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

103 } \
104}
105
106#define sctp_free_a_chunk(_stcb, _chk) { \
107 if ((_chk)->holds_key_ref) {\
108 sctp_auth_key_release((_stcb), (_chk)->auth_keyid); \
109 (_chk)->holds_key_ref = 0; \
110 } \
111 if(_stcb) { \
111 if (_stcb) { \
112 SCTP_TCB_LOCK_ASSERT((_stcb)); \
113 if ((_chk)->whoTo) { \
114 sctp_free_remote_addr((_chk)->whoTo); \
115 (_chk)->whoTo = NULL; \
116 } \
117 if (((_stcb)->asoc.free_chunk_cnt > SCTP_BASE_SYSCTL(sctp_asoc_free_resc_limit)) || \
118 (SCTP_BASE_INFO(ipi_free_chunks) > SCTP_BASE_SYSCTL(sctp_system_free_resc_limit))) { \
119 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), (_chk)); \

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

226} while (0)
227
228#define sctp_flight_size_increase(tp1) do { \
229 (tp1)->whoTo->flight_size += (tp1)->book_size; \
230} while (0)
231
232#ifdef SCTP_FS_SPEC_LOG
233#define sctp_total_flight_decrease(stcb, tp1) do { \
112 SCTP_TCB_LOCK_ASSERT((_stcb)); \
113 if ((_chk)->whoTo) { \
114 sctp_free_remote_addr((_chk)->whoTo); \
115 (_chk)->whoTo = NULL; \
116 } \
117 if (((_stcb)->asoc.free_chunk_cnt > SCTP_BASE_SYSCTL(sctp_asoc_free_resc_limit)) || \
118 (SCTP_BASE_INFO(ipi_free_chunks) > SCTP_BASE_SYSCTL(sctp_system_free_resc_limit))) { \
119 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), (_chk)); \

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

226} while (0)
227
228#define sctp_flight_size_increase(tp1) do { \
229 (tp1)->whoTo->flight_size += (tp1)->book_size; \
230} while (0)
231
232#ifdef SCTP_FS_SPEC_LOG
233#define sctp_total_flight_decrease(stcb, tp1) do { \
234 if(stcb->asoc.fs_index > SCTP_FS_SPEC_LOG_SIZE) \
234 if (stcb->asoc.fs_index > SCTP_FS_SPEC_LOG_SIZE) \
235 stcb->asoc.fs_index = 0;\
236 stcb->asoc.fslog[stcb->asoc.fs_index].total_flight = stcb->asoc.total_flight; \
237 stcb->asoc.fslog[stcb->asoc.fs_index].tsn = tp1->rec.data.TSN_seq; \
238 stcb->asoc.fslog[stcb->asoc.fs_index].book = tp1->book_size; \
239 stcb->asoc.fslog[stcb->asoc.fs_index].sent = tp1->sent; \
240 stcb->asoc.fslog[stcb->asoc.fs_index].incr = 0; \
241 stcb->asoc.fslog[stcb->asoc.fs_index].decr = 1; \
242 stcb->asoc.fs_index++; \

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

247 stcb->asoc.total_flight_count--; \
248 } else { \
249 stcb->asoc.total_flight = 0; \
250 stcb->asoc.total_flight_count = 0; \
251 } \
252} while (0)
253
254#define sctp_total_flight_increase(stcb, tp1) do { \
235 stcb->asoc.fs_index = 0;\
236 stcb->asoc.fslog[stcb->asoc.fs_index].total_flight = stcb->asoc.total_flight; \
237 stcb->asoc.fslog[stcb->asoc.fs_index].tsn = tp1->rec.data.TSN_seq; \
238 stcb->asoc.fslog[stcb->asoc.fs_index].book = tp1->book_size; \
239 stcb->asoc.fslog[stcb->asoc.fs_index].sent = tp1->sent; \
240 stcb->asoc.fslog[stcb->asoc.fs_index].incr = 0; \
241 stcb->asoc.fslog[stcb->asoc.fs_index].decr = 1; \
242 stcb->asoc.fs_index++; \

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

247 stcb->asoc.total_flight_count--; \
248 } else { \
249 stcb->asoc.total_flight = 0; \
250 stcb->asoc.total_flight_count = 0; \
251 } \
252} while (0)
253
254#define sctp_total_flight_increase(stcb, tp1) do { \
255 if(stcb->asoc.fs_index > SCTP_FS_SPEC_LOG_SIZE) \
255 if (stcb->asoc.fs_index > SCTP_FS_SPEC_LOG_SIZE) \
256 stcb->asoc.fs_index = 0;\
257 stcb->asoc.fslog[stcb->asoc.fs_index].total_flight = stcb->asoc.total_flight; \
258 stcb->asoc.fslog[stcb->asoc.fs_index].tsn = tp1->rec.data.TSN_seq; \
259 stcb->asoc.fslog[stcb->asoc.fs_index].book = tp1->book_size; \
260 stcb->asoc.fslog[stcb->asoc.fs_index].sent = tp1->sent; \
261 stcb->asoc.fslog[stcb->asoc.fs_index].incr = 1; \
262 stcb->asoc.fslog[stcb->asoc.fs_index].decr = 0; \
263 stcb->asoc.fs_index++; \

--- 73 unchanged lines hidden ---
256 stcb->asoc.fs_index = 0;\
257 stcb->asoc.fslog[stcb->asoc.fs_index].total_flight = stcb->asoc.total_flight; \
258 stcb->asoc.fslog[stcb->asoc.fs_index].tsn = tp1->rec.data.TSN_seq; \
259 stcb->asoc.fslog[stcb->asoc.fs_index].book = tp1->book_size; \
260 stcb->asoc.fslog[stcb->asoc.fs_index].sent = tp1->sent; \
261 stcb->asoc.fslog[stcb->asoc.fs_index].incr = 1; \
262 stcb->asoc.fslog[stcb->asoc.fs_index].decr = 0; \
263 stcb->asoc.fs_index++; \

--- 73 unchanged lines hidden ---