sctp_ioc.c revision f4b3ec61df05330d25f55a36b975b4d7519fdeb1
/*
* 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
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#define _SUN_TPI_VERSION 2
#include <inet/ipclassifier.h>
#include "sctp_impl.h"
/*
* We need a stream q for sending packets to IP. This q should
* be set in strplumb() time. Once it is set, it will never
* be removed. Since it is done in strplumb() time, there is
* no need to have a lock on the default q.
*/
static void
{
hrtime_t t;
ip0dbg(("sctp_def_q_set: no file descriptor\n"));
goto done;
}
ip0dbg(("sctp_def_q_set: already set\n"));
goto done;
}
goto done;
}
/*
* to the random number pool.
*/
t = gethrtime();
(void) random_add_entropy((uint8_t *)&t, sizeof (t), 0);
done:
}
}
/*
* sctp_wput_ioctl is called by sctp_wput_slow to handle all
* M_IOCTL messages.
*/
void
{
ip0dbg(("sctp_wput_ioctl: null conn\n"));
return;
}
case SCTP_IOC_DEFAULT_Q:
/* Wants to be the default wq. */
goto err_ret;
}
sctp_def_q_set(q, mp);
return;
case ND_SET:
/* sctp_nd_getset() -> nd_getset() does the checking. */
case ND_GET:
if (!sctp_nd_getset(q, mp)) {
break;
}
return;
default:
break;
}
}