sctp_output.c (168859) | sctp_output.c (168943) |
---|---|
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_output.c,v 1.46 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_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 168859 2007-04-19 11:28:43Z rrs $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 168943 2007-04-22 11:06:27Z rrs $"); |
35 36#include <netinet/sctp_os.h> 37#include <sys/proc.h> 38#include <netinet/sctp_var.h> 39#include <netinet/sctp_sysctl.h> 40#include <netinet/sctp_header.h> 41#include <netinet/sctp_pcb.h> 42#include <netinet/sctputil.h> --- 10831 unchanged lines hidden (view full) --- 10874 } 10875 } 10876 if ((SCTP_SO_IS_NBIO(so) 10877 || (flags & MSG_NBIO) 10878 )) { 10879 non_blocking = 1; 10880 } 10881 asoc = &stcb->asoc; | 35 36#include <netinet/sctp_os.h> 37#include <sys/proc.h> 38#include <netinet/sctp_var.h> 39#include <netinet/sctp_sysctl.h> 40#include <netinet/sctp_header.h> 41#include <netinet/sctp_pcb.h> 42#include <netinet/sctputil.h> --- 10831 unchanged lines hidden (view full) --- 10874 } 10875 } 10876 if ((SCTP_SO_IS_NBIO(so) 10877 || (flags & MSG_NBIO) 10878 )) { 10879 non_blocking = 1; 10880 } 10881 asoc = &stcb->asoc; |
10882 10883 if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_NO_FRAGMENT)) { 10884 if (sndlen > asoc->smallest_mtu) { 10885 error = EMSGSIZE; 10886 goto out_unlocked; 10887 } 10888 } |
|
10882 /* would we block? */ 10883 if (non_blocking) { 10884 if ((SCTP_SB_LIMIT_SND(so) < 10885 (sndlen + stcb->asoc.total_output_queue_size)) || 10886 (stcb->asoc.chunks_on_out_queue > 10887 sctp_max_chunks_on_queue)) { 10888 error = EWOULDBLOCK; 10889 atomic_add_int(&stcb->sctp_ep->total_nospaces, 1); --- 873 unchanged lines hidden --- | 10889 /* would we block? */ 10890 if (non_blocking) { 10891 if ((SCTP_SB_LIMIT_SND(so) < 10892 (sndlen + stcb->asoc.total_output_queue_size)) || 10893 (stcb->asoc.chunks_on_out_queue > 10894 sctp_max_chunks_on_queue)) { 10895 error = EWOULDBLOCK; 10896 atomic_add_int(&stcb->sctp_ep->total_nospaces, 1); --- 873 unchanged lines hidden --- |