Beispiel #1
0
/*
 * Handle ioctl commands to obtain information from the cache
 */
int
mrt6_ioctl(int cmd, caddr_t data)
{

	switch (cmd) {
	case SIOCGETSGCNT_IN6:
		return (get_sg_cnt((struct sioc_sg_req6 *)data));
	case SIOCGETMIFCNT_IN6:
		return (get_mif6_cnt((struct sioc_mif_req6 *)data));
	default:
		return (ENOTTY);
	}
}
/*
 * Handle ioctl commands to obtain information from the cache
 */
int
mrt6_ioctl(u_long cmd, void *data)
{

	switch (cmd) {
	case SIOCGETSGCNT_IN6:
		return (get_sg_cnt((struct sioc_sg_req6 *)data));
	case SIOCGETMIFCNT_IN6:
		return (get_mif6_cnt((struct sioc_mif_req6 *)data));
	default:
		return (EINVAL);
	}
}
Beispiel #3
0
/*
 * Handle ioctl commands to obtain information from the cache
 */
int
mrt6_ioctl(u_long cmd, caddr_t data)
{
	int error = 0;

	switch (cmd) {
	case SIOCGETSGCNT_IN6:
		return (get_sg_cnt((struct sioc_sg_req6 *)data));
		break;		/* for safety */
	case SIOCGETMIFCNT_IN6:
		return (get_mif6_cnt((struct sioc_mif_req6 *)data));
		break;		/* for safety */
	default:
		return (EINVAL);
		break;
	}
	return error;
}
Beispiel #4
0
/*
 * Handle ioctl commands to obtain information from the cache
 */
int
X_mrt6_ioctl(u_long cmd, caddr_t data)
{
	int ret;

	ret = EINVAL;

	switch (cmd) {
	case SIOCGETSGCNT_IN6:
		ret = get_sg_cnt((struct sioc_sg_req6 *)data);
		break;

	case SIOCGETMIFCNT_IN6:
		ret = get_mif6_cnt((struct sioc_mif_req6 *)data);
		break;

	default:
		break;
	}

	return (ret);
}