/*
* 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/ipclassifier.h>
#include <inet/ipclassifier.h>
#include "sctp_impl.h"
#include "sctp_addr.h"
/*ARGSUSED*/
{
return (sizeof (sctp_parm_hdr_t) + sizeof (int32_t));
}
{
sph = (sctp_parm_hdr_t *)p;
switch (connp->conn_family) {
case AF_INET:
*addrtype = 0;
break;
case AF_INET6:
sizeof (*addrtype) * 2);
} else {
*addrtype = 0;
sizeof (*addrtype));
}
break;
default:
break;
}
}
/*
* Currently, we support on PRSCTP option, there is more to come.
*/
/*ARGSUSED*/
{
switch (option) {
case SCTP_PRSCTP_OPTION:
optlen = sizeof (sctp_parm_hdr_t);
break;
default:
ASSERT(0);
}
return (optlen);
}
/*ARGSUSED*/
{
switch (option) {
case SCTP_PRSCTP_OPTION:
break;
default:
ASSERT(0);
}
return (sizeof (*sph));
}
{
if (!sctp->sctp_send_adaptation) {
return (0);
}
sph = (sctp_parm_hdr_t *)p;
}
mblk_t *
{
uchar_t *p;
int supp_af;
} else {
else
}
if (sctp->sctp_send_adaptation) {
}
/*
* This could be a INIT retransmission in which case sh_verf may
* be non-zero, zero it out just to be sure.
*/
return (NULL);
}
/* sctp_make_mp could have discovered we have no usable sources */
if (sctp->sctp_nsaddrs == 0) {
return (NULL);
}
/* Lay in a new INIT chunk, starting with the chunk header */
/* Adaptation layer param */
p += sctp_adaptation_code_param(sctp, p);
/* Add supported address types parameter */
p += sctp_supaddr_param(sctp, p);
/* Add address parameters */
/* Add Forward-TSN-Supported param */
return (mp);
}
/*
* Extracts the verification tag from an INIT chunk. If the INIT
* chunk is truncated or malformed, returns 0.
*/
{
return (init->sic_inittag);
}
{
/*
* If we have only one local address or it is a loopback or linklocal
* association, we let the peer pull the address from the IP header.
*/
sctp->sctp_linklocal) {
return (0);
}
}