Deleted Added
full compact
sctp_pcb.c (170091) sctp_pcb.c (170138)
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_pcb.c,v 1.38 2005/03/06 16:04:18 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_pcb.c,v 1.38 2005/03/06 16:04:18 itojun Exp $ */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 170091 2007-05-29 09:29:03Z rrs $");
34__FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 170138 2007-05-30 17:39:45Z 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_pcb.h>
41#include <netinet/sctputil.h>
42#include <netinet/sctp.h>

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

3336
3337 bzero(stcb, sizeof(*stcb));
3338 asoc = &stcb->asoc;
3339 SCTP_TCB_LOCK_INIT(stcb);
3340 SCTP_TCB_SEND_LOCK_INIT(stcb);
3341 /* setup back pointer's */
3342 stcb->sctp_ep = inp;
3343 stcb->sctp_socket = inp->sctp_socket;
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_pcb.h>
41#include <netinet/sctputil.h>
42#include <netinet/sctp.h>

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

3336
3337 bzero(stcb, sizeof(*stcb));
3338 asoc = &stcb->asoc;
3339 SCTP_TCB_LOCK_INIT(stcb);
3340 SCTP_TCB_SEND_LOCK_INIT(stcb);
3341 /* setup back pointer's */
3342 stcb->sctp_ep = inp;
3343 stcb->sctp_socket = inp->sctp_socket;
3344 if ((err = sctp_init_asoc(inp, asoc, for_a_init, override_tag, vrf_id))) {
3344 if ((err = sctp_init_asoc(inp, stcb, for_a_init, override_tag, vrf_id))) {
3345 /* failed */
3346 SCTP_TCB_LOCK_DESTROY(stcb);
3347 SCTP_TCB_SEND_LOCK_DESTROY(stcb);
3348 SCTP_ZONE_FREE(sctppcbinfo.ipi_zone_asoc, stcb);
3349 SCTP_DECR_ASOC_COUNT();
3350 *error = err;
3351 return (NULL);
3352 }

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

4616 sctppcbinfo.ipi_count_strmoq = 0;
4617
4618 sctppcbinfo.ipi_free_strmoq = 0;
4619 sctppcbinfo.ipi_free_chunks = 0;
4620
4621 SCTP_OS_TIMER_INIT(&sctppcbinfo.addr_wq_timer.timer);
4622
4623 /* Init the TIMEWAIT list */
3345 /* failed */
3346 SCTP_TCB_LOCK_DESTROY(stcb);
3347 SCTP_TCB_SEND_LOCK_DESTROY(stcb);
3348 SCTP_ZONE_FREE(sctppcbinfo.ipi_zone_asoc, stcb);
3349 SCTP_DECR_ASOC_COUNT();
3350 *error = err;
3351 return (NULL);
3352 }

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

4616 sctppcbinfo.ipi_count_strmoq = 0;
4617
4618 sctppcbinfo.ipi_free_strmoq = 0;
4619 sctppcbinfo.ipi_free_chunks = 0;
4620
4621 SCTP_OS_TIMER_INIT(&sctppcbinfo.addr_wq_timer.timer);
4622
4623 /* Init the TIMEWAIT list */
4624 for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) {
4624 for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE_A; i++) {
4625 LIST_INIT(&sctppcbinfo.vtag_timewait[i]);
4626 }
4627
4628#if defined(SCTP_USE_THREAD_BASED_ITERATOR)
4629 sctppcbinfo.iterator_running = 0;
4630 sctp_startup_iterator();
4631#endif
4632

--- 988 unchanged lines hidden ---
4625 LIST_INIT(&sctppcbinfo.vtag_timewait[i]);
4626 }
4627
4628#if defined(SCTP_USE_THREAD_BASED_ITERATOR)
4629 sctppcbinfo.iterator_running = 0;
4630 sctp_startup_iterator();
4631#endif
4632

--- 988 unchanged lines hidden ---