smb_kmod.c revision 1e4c938b57d1656808e4112127ff1dce3eba5314
/*
* 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 2011 Nexenta Systems, Inc. All rights reserved.
*/
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <smbsrv/smb_ioctl.h>
#include <smbsrv/smb_ioctl.h>
#define SMBDRV_DEVICE_PATH "/dev/smbsrv"
int smbdrv_fd = -1;
int
smb_kmod_bind(void)
{
if (smbdrv_fd != -1)
smbdrv_fd = -1;
return (errno);
}
return (0);
}
smb_kmod_isbound(void)
{
}
int
{
sizeof (ioc.system_comment));
}
int
{
sizeof (ioc)));
}
int
{
}
void
smb_kmod_stop(void)
{
}
int
{
}
int
{
return (rc);
}
return (rc);
}
int
{
return (rc);
}
return (rc);
}
int
{
int rc;
if (rc == 0)
else
*shortnames = B_TRUE;
return (rc);
}
int
{
int rc;
if (rc == 0) {
}
return (rc);
}
int
{
int rc;
if (rc == 0) {
}
return (rc);
}
/*
* Initialization for an smb_kmod_enum request. If this call succeeds,
* smb_kmod_enum_fini() must be called later to deallocate resources.
*/
{
return (NULL);
return (NULL);
}
return (ns);
}
/*
* Cleanup resources allocated via smb_kmod_enum_init and smb_kmod_enum.
*/
void
{
return;
switch (se_type) {
case SMB_SVCENUM_TYPE_USER:
break;
case SMB_SVCENUM_TYPE_TREE:
break;
case SMB_SVCENUM_TYPE_FILE:
break;
default:
break;
}
}
}
/*
* Enumerate users, connections or files.
*/
int
{
int i;
int rc;
if (rc != 0)
return (rc);
return (ENOMEM);
switch (se_type) {
case SMB_SVCENUM_TYPE_USER:
break;
case SMB_SVCENUM_TYPE_TREE:
&nbytes);
break;
case SMB_SVCENUM_TYPE_FILE:
break;
default:
rc = -1;
break;
}
if (rc != 0)
return (EINVAL);
++items;
}
return (0);
}
/*
* A NULL pointer is a wildcard indicator, which we pass on
* as an empty string (by virtue of the bzero).
*/
int
{
int rc;
return (rc);
}
int
{
int rc;
return (rc);
}
void
smb_kmod_unbind(void)
{
if (smbdrv_fd != -1) {
smbdrv_fd = -1;
}
}
static int
{
if (smbdrv_fd != -1) {
else
rc = 0;
}
return (rc);
}