dld_ioc.c revision fd69bb17581c758c54d082f4e0dc6f23df6d65b9
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Data-Link Driver
*/
#include <sys/dld_impl.h>
typedef struct ioc_info {
int i_cmd;
const char *i_txt;
} ioc_info_t;
/*
* DLIOC category jump table.
*/
static ioc_info_t ioc_i[] = {
};
/*
* DLDIOC category jump table.
*/
static ioc_info_t ioc_li[] = {
};
/*
* Process an M_IOCTL message.
*/
void
{
/*
* We only have shared access and we need exclusive access.
*/
}
/*
* Called via qwriter(9f).
*/
static void
{
ioc_info_t *ip;
/*
* We treat the least significate byte as the actual command and
* the rest of it as a category.
*/
cmd &= 0xff;
/*
* Select the jump table according to the category.
*/
switch (cat) {
case DLIOC:
if (cmd >= IOC_I_COUNT)
goto unknown;
break;
case DLDIOC:
if (cmd >= IOC_LI_COUNT)
goto unknown;
break;
default:
goto unknown;
}
/*
* Different ioctls are restricted to different types of stream. (I.e.
* some ioctls are only for the control node, some are for provider
* nodes).
*/
return;
}
return;
}
/*
* DLIOCRAW
*/
static void
{
if (dsp->ds_polling) {
return;
}
/*
* Set the receive callback.
*/
/*
* Set the M_DATA handler.
*/
}
/*
* Note that raw mode is enabled.
*/
}
/*
* DLIOCHDRINFO
*/
static void
{
const mac_info_t *mip;
if (dld_opt & DLD_OPT_NO_FASTPATH) {
return;
}
return;
}
return;
}
return;
}
return;
}
return;
}
/*
* Set the receive callback (unless polling is enabled).
*/
if (!dsp->ds_polling)
/*
* Set the M_DATA handler.
*/
/*
* Note that fast-path mode is enabled.
*/
}
/*
* DLDIOCCREATE
*/
static void
{
int err;
return;
}
return;
}
}
/*
* DLDIOCDESTROY
*/
static void
{
int err;
return;
}
return;
}
}
/*
* DLDIOCATTR
*/
static void
{
int err;
return;
}
return;
}
}
/*
* Catch-all handler.
*/
static void
{
return;
}
return;
}
}