sctp_var.h (185694) | sctp_var.h (189790) |
---|---|
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 185694 2008-12-06 13:19:54Z rrs $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/sctp_var.h 189790 2009-03-14 13:42:13Z 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) || defined(__Userspace__) 42 --- 48 unchanged lines hidden (view full) --- 91 (_strmoq)->holds_key_ref = 0; \ 92 } \ 93 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_strmoq), (_strmoq)); \ 94 SCTP_DECR_STRMOQ_COUNT(); \ 95} 96 97#define sctp_alloc_a_strmoq(_stcb, _strmoq) { \ 98 (_strmoq) = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_strmoq), struct sctp_stream_queue_pending); \ | 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 --- 48 unchanged lines hidden (view full) --- 91 (_strmoq)->holds_key_ref = 0; \ 92 } \ 93 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_strmoq), (_strmoq)); \ 94 SCTP_DECR_STRMOQ_COUNT(); \ 95} 96 97#define sctp_alloc_a_strmoq(_stcb, _strmoq) { \ 98 (_strmoq) = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_strmoq), struct sctp_stream_queue_pending); \ |
99 if ((_strmoq)) { \ | 99 if ((_strmoq)) { \ 100 memset(_strmoq, 0, sizeof(struct sctp_stream_queue_pending)); \ |
100 SCTP_INCR_STRMOQ_COUNT(); \ 101 (_strmoq)->holds_key_ref = 0; \ 102 } \ 103} 104 105#define sctp_free_a_chunk(_stcb, _chk) { \ 106 if ((_chk)->holds_key_ref) {\ 107 sctp_auth_key_release((_stcb), (_chk)->auth_keyid); \ --- 154 unchanged lines hidden (view full) --- 262 stcb->asoc.fs_index++; \ 263 (stcb)->asoc.total_flight_count++; \ 264 (stcb)->asoc.total_flight += (tp1)->book_size; \ 265} while (0) 266 267#else 268 269#define sctp_total_flight_decrease(stcb, tp1) do { \ | 101 SCTP_INCR_STRMOQ_COUNT(); \ 102 (_strmoq)->holds_key_ref = 0; \ 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); \ --- 154 unchanged lines hidden (view full) --- 263 stcb->asoc.fs_index++; \ 264 (stcb)->asoc.total_flight_count++; \ 265 (stcb)->asoc.total_flight += (tp1)->book_size; \ 266} while (0) 267 268#else 269 270#define sctp_total_flight_decrease(stcb, tp1) do { \ |
271 tp1->window_probe = 0; \ |
|
270 if (stcb->asoc.total_flight >= tp1->book_size) { \ 271 stcb->asoc.total_flight -= tp1->book_size; \ 272 if (stcb->asoc.total_flight_count > 0) \ 273 stcb->asoc.total_flight_count--; \ 274 } else { \ 275 stcb->asoc.total_flight = 0; \ 276 stcb->asoc.total_flight_count = 0; \ 277 } \ --- 57 unchanged lines hidden --- | 272 if (stcb->asoc.total_flight >= tp1->book_size) { \ 273 stcb->asoc.total_flight -= tp1->book_size; \ 274 if (stcb->asoc.total_flight_count > 0) \ 275 stcb->asoc.total_flight_count--; \ 276 } else { \ 277 stcb->asoc.total_flight = 0; \ 278 stcb->asoc.total_flight_count = 0; \ 279 } \ --- 57 unchanged lines hidden --- |