smb_kmod.c revision 037cac007b685e7ea79f6ef7e8e62bfd342a4d56
/*
* 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);
}
int
{
int rc;
return (rc);
return (ENOMEM);
return (ENOMEM);
}
ioc_len);
if (rc != 0)
break;
break;
if (rc != 0)
break;
ctx++;
}
}
if (rc != 0)
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);
}