sctp_output.c (170463) | sctp_output.c (170606) |
---|---|
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 170463 2007-06-09 13:53:27Z rrs $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 170606 2007-06-12 11:21:00Z 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> --- 3072 unchanged lines hidden (view full) --- 3115 ph = mtod(mret, struct sctp_paramhdr *); 3116 SCTP_BUF_LEN(mret) = sizeof(struct sctp_state_cookie) + 3117 sizeof(struct sctp_paramhdr); 3118 stc = (struct sctp_state_cookie *)((caddr_t)ph + 3119 sizeof(struct sctp_paramhdr)); 3120 ph->param_type = htons(SCTP_STATE_COOKIE); 3121 ph->param_length = 0; /* fill in at the end */ 3122 /* Fill in the stc cookie data */ | 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> --- 3072 unchanged lines hidden (view full) --- 3115 ph = mtod(mret, struct sctp_paramhdr *); 3116 SCTP_BUF_LEN(mret) = sizeof(struct sctp_state_cookie) + 3117 sizeof(struct sctp_paramhdr); 3118 stc = (struct sctp_state_cookie *)((caddr_t)ph + 3119 sizeof(struct sctp_paramhdr)); 3120 ph->param_type = htons(SCTP_STATE_COOKIE); 3121 ph->param_length = 0; /* fill in at the end */ 3122 /* Fill in the stc cookie data */ |
3123 *stc = *stc_in; | 3123 memcpy(stc, stc_in, sizeof(struct sctp_state_cookie)); |
3124 3125 /* tack the INIT and then the INIT-ACK onto the chain */ 3126 cookie_sz = 0; 3127 m_at = mret; 3128 for (m_at = mret; m_at; m_at = SCTP_BUF_NEXT(m_at)) { 3129 cookie_sz += SCTP_BUF_LEN(m_at); 3130 if (SCTP_BUF_NEXT(m_at) == NULL) { 3131 SCTP_BUF_NEXT(m_at) = copy_init; --- 8704 unchanged lines hidden --- | 3124 3125 /* tack the INIT and then the INIT-ACK onto the chain */ 3126 cookie_sz = 0; 3127 m_at = mret; 3128 for (m_at = mret; m_at; m_at = SCTP_BUF_NEXT(m_at)) { 3129 cookie_sz += SCTP_BUF_LEN(m_at); 3130 if (SCTP_BUF_NEXT(m_at) == NULL) { 3131 SCTP_BUF_NEXT(m_at) = copy_init; --- 8704 unchanged lines hidden --- |