sctp_output.c (170091) | sctp_output.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_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 170091 2007-05-29 09:29:03Z rrs $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.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_header.h> 41#include <netinet/sctp_pcb.h> 42#include <netinet/sctputil.h> --- 9481 unchanged lines hidden (view full) --- 9524 SCTP_BUF_RESV_UF(chk->data, SCTP_MIN_OVERHEAD); 9525 SCTP_BUF_LEN(chk->data) = chk->send_size; 9526 chk->sent = SCTP_DATAGRAM_UNSENT; 9527 chk->snd_count = 0; 9528 chk->whoTo = net; 9529 atomic_add_int(&chk->whoTo->ref_count, 1); 9530 /* Now we have a mbuf that we can fill in with the details */ 9531 hb = mtod(chk->data, struct sctp_heartbeat_chunk *); | 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> --- 9481 unchanged lines hidden (view full) --- 9524 SCTP_BUF_RESV_UF(chk->data, SCTP_MIN_OVERHEAD); 9525 SCTP_BUF_LEN(chk->data) = chk->send_size; 9526 chk->sent = SCTP_DATAGRAM_UNSENT; 9527 chk->snd_count = 0; 9528 chk->whoTo = net; 9529 atomic_add_int(&chk->whoTo->ref_count, 1); 9530 /* Now we have a mbuf that we can fill in with the details */ 9531 hb = mtod(chk->data, struct sctp_heartbeat_chunk *); |
9532 | 9532 memset(hb, 0, sizeof(struct sctp_heartbeat_chunk)); |
9533 /* fill out chunk header */ 9534 hb->ch.chunk_type = SCTP_HEARTBEAT_REQUEST; 9535 hb->ch.chunk_flags = 0; 9536 hb->ch.chunk_length = htons(chk->send_size); 9537 /* Fill out hb parameter */ 9538 hb->heartbeat.hb_info.ph.param_type = htons(SCTP_HEARTBEAT_INFO); 9539 hb->heartbeat.hb_info.ph.param_length = htons(sizeof(struct sctp_heartbeat_info_param)); 9540 hb->heartbeat.hb_info.time_value_1 = now.tv_sec; --- 2317 unchanged lines hidden --- | 9533 /* fill out chunk header */ 9534 hb->ch.chunk_type = SCTP_HEARTBEAT_REQUEST; 9535 hb->ch.chunk_flags = 0; 9536 hb->ch.chunk_length = htons(chk->send_size); 9537 /* Fill out hb parameter */ 9538 hb->heartbeat.hb_info.ph.param_type = htons(SCTP_HEARTBEAT_INFO); 9539 hb->heartbeat.hb_info.ph.param_length = htons(sizeof(struct sctp_heartbeat_info_param)); 9540 hb->heartbeat.hb_info.time_value_1 = now.tv_sec; --- 2317 unchanged lines hidden --- |