sctp_output.c (235414) | sctp_output.c (235416) |
---|---|
1/*- 2 * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. 4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * --- 19 unchanged lines hidden (view full) --- 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33/* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. 3 * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. 4 * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * --- 19 unchanged lines hidden (view full) --- 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33/* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 235414 2012-05-13 17:36:04Z tuexen $"); | 36__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 235416 2012-05-13 19:32:49Z tuexen $"); |
37 38#include <netinet/sctp_os.h> 39#include <sys/proc.h> 40#include <netinet/sctp_var.h> 41#include <netinet/sctp_sysctl.h> 42#include <netinet/sctp_header.h> 43#include <netinet/sctp_pcb.h> 44#include <netinet/sctputil.h> --- 6041 unchanged lines hidden (view full) --- 6086 * and NOT retransmit it. 6087 */ 6088 if (chk->data) { 6089 /* 6090 * We release the book_size 6091 * if the mbuf is here 6092 */ 6093 int ret_spc; | 37 38#include <netinet/sctp_os.h> 39#include <sys/proc.h> 40#include <netinet/sctp_var.h> 41#include <netinet/sctp_sysctl.h> 42#include <netinet/sctp_header.h> 43#include <netinet/sctp_pcb.h> 44#include <netinet/sctputil.h> --- 6041 unchanged lines hidden (view full) --- 6086 * and NOT retransmit it. 6087 */ 6088 if (chk->data) { 6089 /* 6090 * We release the book_size 6091 * if the mbuf is here 6092 */ 6093 int ret_spc; |
6094 int cause; | 6094 uint8_t sent; |
6095 6096 if (chk->sent > SCTP_DATAGRAM_UNSENT) | 6095 6096 if (chk->sent > SCTP_DATAGRAM_UNSENT) |
6097 cause = SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT; | 6097 sent = 1; |
6098 else | 6098 else |
6099 cause = SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_UNSENT; | 6099 sent = 0; |
6100 ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, | 6100 ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, |
6101 cause, | 6101 sent, |
6102 SCTP_SO_LOCKED); 6103 freed_spc += ret_spc; 6104 if (freed_spc >= dataout) { 6105 return; 6106 } 6107 } /* if chunk was present */ 6108 } /* if of sufficent priority */ 6109 } /* if chunk has enabled */ --- 6 unchanged lines hidden (view full) --- 6116 if (chk->data) { 6117 /* 6118 * We release the book_size 6119 * if the mbuf is here 6120 */ 6121 int ret_spc; 6122 6123 ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, | 6102 SCTP_SO_LOCKED); 6103 freed_spc += ret_spc; 6104 if (freed_spc >= dataout) { 6105 return; 6106 } 6107 } /* if chunk was present */ 6108 } /* if of sufficent priority */ 6109 } /* if chunk has enabled */ --- 6 unchanged lines hidden (view full) --- 6116 if (chk->data) { 6117 /* 6118 * We release the book_size 6119 * if the mbuf is here 6120 */ 6121 int ret_spc; 6122 6123 ret_spc = sctp_release_pr_sctp_chunk(stcb, chk, |
6124 SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_UNSENT, 6125 SCTP_SO_LOCKED); | 6124 0, SCTP_SO_LOCKED); |
6126 6127 freed_spc += ret_spc; 6128 if (freed_spc >= dataout) { 6129 return; 6130 } 6131 } /* end if chk->data */ 6132 } /* end if right class */ 6133 } /* end if chk pr-sctp */ --- 7860 unchanged lines hidden --- | 6125 6126 freed_spc += ret_spc; 6127 if (freed_spc >= dataout) { 6128 return; 6129 } 6130 } /* end if chk->data */ 6131 } /* end if right class */ 6132 } /* end if chk pr-sctp */ --- 7860 unchanged lines hidden --- |