Deleted Added
full compact
sctp_output.c (172157) sctp_output.c (172190)
1/*-
2 * Copyright (c) 2001-2007, 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_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, 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_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 172157 2007-09-13 14:43:54Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 172190 2007-09-15 19:07:42Z 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>

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

8048 shutdown_cp->cumulative_tsn_ack = htonl(stcb->asoc.cumulative_tsn);
8049 SCTP_BUF_LEN(m_shutdown) = chk->send_size;
8050 TAILQ_INSERT_TAIL(&chk->asoc->control_send_queue, chk, sctp_next);
8051 chk->asoc->ctrl_queue_cnt++;
8052 return;
8053}
8054
8055void
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>

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

8048 shutdown_cp->cumulative_tsn_ack = htonl(stcb->asoc.cumulative_tsn);
8049 SCTP_BUF_LEN(m_shutdown) = chk->send_size;
8050 TAILQ_INSERT_TAIL(&chk->asoc->control_send_queue, chk, sctp_next);
8051 chk->asoc->ctrl_queue_cnt++;
8052 return;
8053}
8054
8055void
8056sctp_send_asconf(struct sctp_tcb *stcb, struct sctp_nets *net)
8056sctp_send_asconf(struct sctp_tcb *stcb, struct sctp_nets *net, int addr_locked)
8057{
8058 /*
8059 * formulate and queue an ASCONF to the peer. ASCONF parameters
8060 * should be queued on the assoc queue.
8061 */
8062 struct sctp_tmit_chunk *chk;
8063 struct mbuf *m_asconf;
8064 struct sctp_asconf_chunk *acp;
8065 int len;
8066
8067 SCTP_TCB_LOCK_ASSERT(stcb);
8068 /* compose an ASCONF chunk, maximum length is PMTU */
8057{
8058 /*
8059 * formulate and queue an ASCONF to the peer. ASCONF parameters
8060 * should be queued on the assoc queue.
8061 */
8062 struct sctp_tmit_chunk *chk;
8063 struct mbuf *m_asconf;
8064 struct sctp_asconf_chunk *acp;
8065 int len;
8066
8067 SCTP_TCB_LOCK_ASSERT(stcb);
8068 /* compose an ASCONF chunk, maximum length is PMTU */
8069 m_asconf = sctp_compose_asconf(stcb, &len);
8069 m_asconf = sctp_compose_asconf(stcb, &len, addr_locked);
8070 if (m_asconf == NULL) {
8071 return;
8072 }
8073 acp = mtod(m_asconf, struct sctp_asconf_chunk *);
8074 sctp_alloc_a_chunk(stcb, chk);
8075 if (chk == NULL) {
8076 /* no memory */
8077 sctp_m_freem(m_asconf);

--- 4297 unchanged lines hidden ---
8070 if (m_asconf == NULL) {
8071 return;
8072 }
8073 acp = mtod(m_asconf, struct sctp_asconf_chunk *);
8074 sctp_alloc_a_chunk(stcb, chk);
8075 if (chk == NULL) {
8076 /* no memory */
8077 sctp_m_freem(m_asconf);

--- 4297 unchanged lines hidden ---