7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER START
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The contents of this file are subject to the terms of the
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Common Development and Distribution License (the "License").
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * You may not use this file except in compliance with the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * See the License for the specific language governing permissions
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * and limitations under the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * When distributing Covered Code, include this CDDL HEADER in each
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * If applicable, add the following below this CDDL HEADER, with the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * fields enclosed by brackets "[]" replaced with your own identifying
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * information: Portions Copyright [yyyy] [name of copyright owner]
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER END
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindisctp_return_heartbeat(sctp_t *sctp, sctp_chunk_hdr_t *hbcp, mblk_t *mp)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* Update the faddr for the src addr */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* If the source address is bogus we silently drop the packet */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ("sctp_return_heartbeat: %p bogus hb from %x:%x:%x:%x\n",
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi dprint(3, ("sctp_return_heartbeat: %p got hb from %x:%x:%x:%x\n",
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * XXX It's really tempting to reuse the heartbeat mblk. But
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * this complicates processing in sctp_dispatch (i.e. it will
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * screw up sctp_next_chunk since we will set the chunk
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * header's length into network byte-order), and if we ever
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * encounter a heartbeat bundled with other chunks...
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * So we take the slower-but-safe route.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* Create an IP header, returning to the src addr from the heartbt */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* Copy the information field from the heartbeat */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi bcopy((void *)(hbcp + 1), (void *)(cp + 1), len - sizeof (*cp));
int64_t *t;
in6_addr_t *a;
sizeof (*hpp) +
earliest_expiry = 0;
if (cnt-- > 0) {
if (earliest_expiry != 0) {
if (earliest_expiry < 0)
(void *)sctp));
(void *)sctp));
(void *)sctp));
(void *)sctp));