smb_doorclnt.c revision 8d96b23e24cf8db8618f698bfa580a25d7dc6029
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* User-space door client routines for both SMB daemon and CLIs.
*/
#include <syslog.h>
#include <door.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <errno.h>
#include <smbsrv/wintypes.h>
#include <smbsrv/smb_door_svc.h>
#include <smbsrv/smb_common_door.h>
#define SMB_DOOR_CALL_RETRIES 3
void
{
}
/*
* Free resources allocated for a door call. If the result buffer provided
* by the client is too small, the doorfs will have allocated a new buffer,
* which must be unmapped here.
*
* This function must be called to free both the argument and result door
* buffers regardless of the status of the door call.
*/
void
{
}
/*
* Make a door call to the server function associated with the door
* descriptor fd.
*
* After a successful door call the local door_arg->data_ptr is assigned
* to the caller's arg->rbuf so that arg has references to both input and
* response buffers, which is required by smb_dr_clnt_free.
*
* On success, 0 will be returned and the call results can be referenced
* via arg->rbuf and arg->rsize. Otherwise -1 will be returned.
*/
int
{
int rc;
int i;
return (-1);
for (i = 0; i < SMB_DOOR_CALL_RETRIES; ++i) {
errno = 0;
break;
return (-1);
}
if (rc != 0)
return (-1);
rc = -1;
return (rc);
}