smb_door_encdec.c revision 3db3f65c6274eb042354801a308c8e9bc4994553
/*
* 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.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdlib.h>
#include <strings.h>
#include <errno.h>
#include <smbsrv/smb_common_door.h>
#include <smbsrv/smb_door_svc.h>
/*
* smb_dr_decode_common
*
* This function can be used to decode both door request and result buffer.
* pre-condition: data is non-null pointer, and is bzero'd.
*/
int
{
int rc = 0;
if (!data) {
return (-1);
}
rc = -1;
}
xdr_destroy(&xdrs);
return (rc);
}
/*
* smb_dr_encode_common
*
* This function can be used to encode both request and result door buffer.
* The 'opcode' paramater is set to the 'opcode' of the operation to be invoked
* on the server, by the client. The server sets the same 'opcode' paramater
* to indicate the 'status' of the door call.
*
* followed by the data (which will be encoded via the specified XDR routine).
*
* Returns encoded buffer upon success. Otherwise, returns NULL.
*/
char *
{
char *buf;
*len = 0;
return (NULL);
}
if (proc)
if (!buf) {
*len = 0;
return (NULL);
}
*len = 0;
xdr_destroy(&xdrs);
return (NULL);
}
*len = 0;
}
xdr_destroy(&xdrs);
return (buf);
}
/*
* Get the opcode of the door argument buffer.
*/
int
{
int opcode;
opcode = -1;
return (opcode);
}
/*
* Set the opcode of the door argument buffer.
*/
char *
{
char *buf;
return (buf);
}
/*
* Get the status of the door result buffer.
*/
int
{
int stat;
stat = -1;
return (stat);
}
/*
* Set the status of the door result buffer.
*/
char *
{
char *buf;
return (buf);
}
char *
{
*len = 0;
return (NULL);
}
*len = 0;
return (NULL);
}
return (buf);
}
char *
{
return (NULL);
buflen);
return (buf);
}
/*
* smb_kshare_mkselfrel
*
* encode: structure -> flat buffer (buffer size)
* Pre-condition: kshare is non-null.
*/
uint8_t *
{
if (!kshare)
return (NULL);
if (!buf)
return (NULL);
*len = 0;
}
xdr_destroy(&xdrs);
return (buf);
}
char *
{
char *buf;
return (buf);
}
char *
{
&res) == 0) {
} else {
}
return (str);
}
{
!= 0) {
return (NULL);
}
return (clnt_info);
}
void
{
int i;
if (!ulist)
return;
if (!uinfo)
continue;
}
}