/*
* 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 <sys/sysmacros.h>
#include <sys/socketvar.h>
#include <inet/ipclassifier.h>
/*
* Common socket access functions.
*
* Instead of accessing the sonode switch directly (i.e., SOP_xxx()),
* the socket_xxx() function should be used.
*/
/*
* Try to create a new sonode of the requested <family, type, protocol>.
*/
/* ARGSUSED */
struct sonode *
{
int saved_error;
/*
* Look for a sockparams entry that match the given criteria.
* solookup() returns with the entry held.
*/
saved_error = *errorp;
/*
* There is no matching sockparams entry. An ephemeral entry is
* created if the caller specifies a device or a socket module.
*/
saved_error = 0;
saved_error = 0;
} else {
}
*errorp = saved_error;
return (NULL);
}
}
} else {
/* Cannot fail, only bumps so_count */
} else {
*errorp = saved_error;
}
}
return (so);
}
struct sonode *
{
/*
* This function may be called in interrupt context, and CRED()
* will be NULL. In this case, pass in kcred.
*/
/* Cannot fail, only bumps so_count */
} else {
}
}
return (so);
}
/*
* Bind local endpoint.
*/
int
{
}
/*
* Turn socket into a listen socket.
*/
int
{
if (backlog < 0) {
backlog = 0;
}
/*
* Use the same qlimit as in BSD. BSD checks the qlimit
* before queuing the next connection implying that a
* listen(sock, 0) allows one connection to be queued.
* BSD also uses 1.5 times the requested backlog.
*
* XNS Issue 4 required a strict interpretation of the backlog.
* This has been waived subsequently for Issue 4 and the change
* incorporated in XNS Issue 5. So we aren't required to do
* anything special for XPG apps.
*/
else
}
/*
* Accept incoming connection.
*/
int
{
}
/*
* Active open.
*/
int
{
int error;
/*
* Handle a connect to a name parameter of type AF_UNSPEC like a
* connect to a null address. This is the portable method to
* unconnect a socket.
*/
if ((namelen >= sizeof (sa_family_t)) &&
namelen = 0;
}
/*
* ENETUNREACH be returned but does not require
* EHOSTUNREACH. In order to keep the test suite
* happy we mess with the errno here.
*/
error = ENETUNREACH;
}
return (error);
}
/*
* Get address of remote node.
*/
int
{
}
/*
* Get local address.
*/
int
{
}
/*
* Called from shutdown().
*/
int
{
}
/*
* Get socket options.
*/
/*ARGSUSED*/
int
{
}
/*
* Set socket options
*/
int
{
/* Caller allocates aligned optval, or passes null */
/* If optval is null optlen is 0, and vice-versa */
}
int
{
int error = 0;
/*
* Do not bypass the cache if we are doing a local (AF_UNIX) write.
*/
else
switch (error) {
default:
break;
case EINTR:
case ENOMEM:
/* EAGAIN is EWOULDBLOCK */
case EWOULDBLOCK:
/* We did a partial send */
error = 0;
break;
case EPIPE:
break;
}
return (error);
}
int
{
int error = 0;
}
return (error);
}
int
{
int error;
/*
* Do not bypass the cache when reading data, as the application
* is likely to access the data shortly.
*/
switch (error) {
case EINTR:
/* EAGAIN is EWOULDBLOCK */
case EWOULDBLOCK:
/* We did a partial read */
error = 0;
break;
default:
break;
}
return (error);
}
int
{
}
int
{
}
int
{
}
int
{
}
void
{
}
/* ARGSUSED */
void
{
}
/*
* TODO Once the common vnode ops is available, then the vnops argument
* should be removed.
*/
/*ARGSUSED*/
int
{
return (-1);
}
so->so_rcv_queued = 0;
so->so_rcv_wanted = 0;
so->so_rcv_timer_tid = 0;
so->so_rcv_thresh = 0;
so->so_acceptq_len = 0;
so->so_backlog = 0;
so->so_filter_active = 0;
so->so_filter_tx = 0;
so->so_filter_defertime = 0;
return (0);
}
/*ARGSUSED*/
void
{
}
void
{
so->so_options = 0;
so->so_rcvtimeo = 0;
so->so_sndtimeo = 0;
so->so_xpg_rcvbuf = 0;
so->so_oobmark = 0;
so->so_copyflag = 0;
}
void
{
if (so->so_rcv_timer_tid) {
so->so_rcv_timer_tid = 0;
}
}
vn_invalid(vp);
}
/* Detach and destroy filters */
}