smb_kmod.c revision 1fcced4c370617db71610fecffd5451a5894ca5e
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#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 "/devices/pseudo/smbsrv@0:smbsrv"
int smbdrv_fd = -1;
int
smb_kmod_bind(void)
{
if (smbdrv_fd != -1)
smbdrv_fd = -1;
return (errno);
}
return (0);
}
int
{
sizeof (ioc.system_comment));
}
int
{
sizeof (ioc)));
}
int
{
}
int
smb_kmod_tcplisten(int error)
{
}
int
smb_kmod_nbtlisten(int error)
{
}
int
smb_kmod_tcpreceive(void)
{
}
int
smb_kmod_nbtreceive(void)
{
}
int
{
sizeof (smb_ioc_share_t));
}
return (rc);
}
int
{
sizeof (smb_ioc_share_t));
}
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);
}