fksmb_kdoor.c revision b819cea2f73f98c5662230cc9affc8cc84f77fcf
/*
* 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 2013 Nexenta Systems, Inc. All rights reserved.
*/
/*
* "Upcall" glue for the fake (user-mode) smbsrv module.
*/
#include <smbsrv/smb_kproto.h>
#include <smbsrv/smb_door.h>
static int smb_kdoor_encode(smb_doorarg_t *);
static int smb_kdoor_decode(smb_doorarg_t *);
static void smb_kdoor_free(door_arg_t *);
void
{
}
void
{
}
/*
* In the "fake kernen", our "upcalls" don't use the
* real door, but just call via a function pointer.
* This is where we setup that pointer, which is
* fksmbd_door_dispatch()
*/
void
{
}
void
{
}
/* ARGSUSED */
int
{
int rc;
return (-1);
}
/* NB: no ASYNC, nor event stuff */
return (EFAULT);
goto out;
/*
* The "upcall" (just call via function pointer)
* i.e. see: fksmbd_door_dispatch()
*/
goto out;
out:
return (rc);
}
/* no smb_kdoor_send, smb_kdoor_receive */
/* no smb_kdoor_upcall_private */
static int
{
char *buf;
xdr_destroy(&xdrs);
return (-1);
}
xdr_destroy(&xdrs);
return (-1);
}
}
xdr_destroy(&xdrs);
return (0);
}
/*
* Decode the response in rbuf and rsize.
*/
static int
{
return (-1);
}
xdr_destroy(&xdrs);
return (-1);
}
xdr_destroy(&xdrs);
return (-1);
}
xdr_destroy(&xdrs);
return (-1);
}
}
xdr_destroy(&xdrs);
return (0);
}
static void
{
/* hdr->dh_txid = 0 (not used) */
}
static boolean_t
{
return (B_FALSE);
}
switch (hdr->dh_door_rc) {
case SMB_DOP_SUCCESS:
break;
/* SMB_DOP_EMPTYBUF is a "normal" error (silent). */
case SMB_DOP_EMPTYBUF:
return (B_FALSE);
default:
return (B_FALSE);
}
return (B_TRUE);
}
/*
* Free both the argument and result door buffers regardless of the status
* of the up-call. The doorfs allocates a new buffer if the result buffer
* passed by the client is too small.
*/
static void
{
}