/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <inet/ipsec_impl.h>
#include <inet/ipclassifier.h>
#include "sctp_impl.h"
void
{
return;
}
/*
* We set an upper bound on how long we will
* wait for a shutdown-ack from the peer. This
* is to prevent the receiver from attempting
* to create a half-closed state indefinately.
* See archive from IETF TSVWG mailing list
* for June 2001 for more information.
* Since we will not be calculating RTTs after
* sending the shutdown, we can overload out_time
* to track how long we have waited.
*/
}
/*
* If there is unsent (or unacked) data, wait for it to get ack'd
*/
return;
}
/* rotate faddrs if we are retransmitting */
if (!rexmit) {
} else {
}
/* Link in a SACK if resending the shutdown */
goto done;
}
} else {
goto done;
}
/* shutdown w/o sack, update lastacked */
}
/* Send the shutdown and restart the timer */
done:
}
int
{
int trysend = 0;
/* Extract and process the TSN in the shutdown chunk */
/* not already acked */
}
/* Don't allow sending new data */
}
/*
* If there is unsent or unacked data, try sending them out now.
* The other side should acknowledge them. After we have flushed
* the transmit queue, we can complete the shutdown sequence.
*/
return (1);
/* rotate faddrs if we are retransmitting */
if (!rexmit)
else
}
return (trysend);
}
void
{
/* XXX use timer approach */
return;
}
}
/*
* Similar to sctp_shutdown_complete(), except that since this
* is out-of-the-blue, we can't use an sctp's association information,
* and instead must draw all necessary info from the incoming packet.
*/
void
{
int i;
/*
* Check to see if we can reuse the incoming mblk. There should
* not be other reference. Since this packet comes from below,
* there should be enough header space to fill in what the lower
* layers want to add.
*/
return;
}
} else {
DB_CKSUMFLAGS(mp) = 0;
}
/*
* We follow the logic in tcp_xmit_early_reset() in that we skip
* reversing source route (i.e. replace all IP options with EOL).
*/
if (isv4) {
for (i = IP_SIMPLE_HDR_LENGTH; i < (int)ip_hdr_len; i++)
/* Swap addresses */
ipha->ipha_ident = 0;
} else {
/* Remove any extension headers assuming partial overlay */
if (ip_hdr_len > IPV6_HDR_LEN) {
}
}
}
/* Swap ports. Verification tag is reused. */
/* Lay in the shutdown complete chunk */
/* Set the T-bit */
ixas.ixa_ifindex = 0;
/*
* Apply IPsec based on how IPsec was applied to
* the packet that was out of the blue.
*/
/* Note: mp already consumed and ip_drop_packet done */
return;
}
} else {
/*
* This is in clear. The message we are building
* here should go out in clear, independent of our policy.
*/
}
ixa_cleanup(&ixas);
}
/*
* Called from sctp_input_data() and sctp_shutdown_received().
* Send a SHUTDOWN ACK chunk to the peer SCTP endpoint and change SCTP state.
* This should be done after all data (unacked and unsend) has been
* acknowledged.
*/
void
{
goto dotimer;
}
/*
* bundle a "cookie received while shutting down" error if
* the caller asks for it.
*/
if (crwsd) {
}
}
}