smb_kdoor_encdec.c revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0
/*
* 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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <smbsrv/smb_common_door.h>
#include <smbsrv/smb_door_svc.h>
/*
* smb_kdr_decode_common
*
* This function can be used for decoding 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_kdr_encode_common
*
* 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)
*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 *
{
char *buf;
return (buf);
}
{
0) {
return (NULL);
}
return (token);
}
char *
{
if (!str) {
*len = 0;
return (buf);
}
xdr_smb_dr_string_t, len)) == 0)
return (buf);
}
/*
* smb_dr_decode_kshare()
*
* The kshare information arrives encoded in a flat buffer, so retrieve
* the flat buffer and convert it to an smb_dr_kshare structure.
*/
{
0) {
return (NULL);
}
return (kshare);
}
/*
* smb_share_mkabsolute
*
* decode: flat buffer -> structure
*/
{
}
xdr_destroy(&xdrs);
return (obj);
}
void
{
if (!kshare)
return;
}