/*
* 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/priv_names.h>
/*
* This file contains generic goo needed to hook the STREAMS modules and
* files for examples of this in action.
*
* The symbols that all modules and drivers must define are:
*
*
* The symbols that all modules must define are:
*
* INET_MODSTRTAB The name of the `streamtab' structure for this module.
* INET_MODDESC The one-line description for this module.
* INET_MODMTFLAGS The mt-streams(9F) flags for the module.
*
* The symbols that all drivers must define are:
*
* INET_DEVSTRTAB The name of the `streamtab' structure for this driver.
* INET_DEVDESC The one-line description for this driver.
* INET_DEVMTFLAGS The mt-streams(9F) flags for the driver.
* INET_DEVMINOR The minor number of the driver (usually 0).
*
* Drivers that need to masquerade as IP should set INET_DEVMTFLAGS to
* IP_DEVMTFLAGS and set INET_DEVSTRTAB to ipinfo.
*
* The symbols that all socket modules must define are:
*
* INET_SOCKDESC The one-line description for this socket module
* INET_SOCK_PROTO_CREATE_FUNC The function used to create PCBs
*
* In addition, socket modules that can be converted to TPI must define:
*
* INET_SOCK_PROTO_FB_FUNC The function used to fallback to TPI
*/
#if !defined(INET_NAME)
!defined(INET_SOCKDESC)
#endif
#ifdef INET_DEVDESC
extern struct streamtab INET_DEVSTRTAB;
/*
* Drivers that actually want to be IP would set INET_DEVSTRTAB to ipinfo.
*/
static struct dev_priv {
char *driver;
int privonly;
const char *read_priv;
const char *write_priv;
} netdev_privs[] = {
};
static int
{
int i, ndevs;
if (cmd != DDI_ATTACH)
return (DDI_FAILURE);
for (i = 0; i < ndevs; i++) {
break;
}
}
static int
{
if (cmd != DDI_DETACH)
return (DDI_FAILURE);
return (DDI_SUCCESS);
}
/* ARGSUSED */
static int
{
switch (cmd) {
case DDI_INFO_DEVT2DEVINFO:
if (inet_dev_info != NULL) {
*result = (void *)inet_dev_info;
error = DDI_SUCCESS;
}
break;
case DDI_INFO_DEVT2INSTANCE:
error = DDI_SUCCESS;
break;
default:
break;
}
return (error);
}
};
#endif /* INET_DEVDESC */
#ifdef INET_MODDESC
extern struct streamtab INET_MODSTRTAB;
};
&fsw
};
#endif /* INET_MODDESC */
#ifdef INET_SOCKDESC
#ifdef INET_SOCK_PROTO_FB_FUNC
NULL,
NULL,
};
#endif /* INET_SOCK_PROTO_FB_FUNC */
#ifdef INET_SOCK_PROTO_FB_FUNC
#else
#endif /* INET_SOCK_PROTO_FB_FUNC */
};
};
#endif /* INET_SOCKDESC */
#ifdef INET_DEVDESC
&modldrv,
#endif
#ifdef INET_MODDESC
#endif
#ifdef INET_SOCKDESC
#endif
};