2014-06-14 04:03:35 +04:00
|
|
|
/*
|
|
|
|
Copyright (c) 2014, Ronnie Sahlberg
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright notice, this
|
2015-03-12 08:15:55 +03:00
|
|
|
list of conditions and the following disclaimer.
|
2014-06-14 04:03:35 +04:00
|
|
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
this list of conditions and the following disclaimer in the documentation
|
|
|
|
and/or other materials provided with the distribution.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
|
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
The views and conclusions contained in the software and documentation are those
|
2015-03-12 08:15:55 +03:00
|
|
|
of the authors and should not be interpreted as representing official policies,
|
2014-06-14 04:03:35 +04:00
|
|
|
either expressed or implied, of the FreeBSD Project.
|
|
|
|
*/
|
|
|
|
|
2013-11-06 05:37:16 +04:00
|
|
|
/*
|
|
|
|
* Please do not edit this file.
|
|
|
|
* It was generated using rpcgen.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "libnfs-zdr.h"
|
|
|
|
#include "libnfs-raw-nsm.h"
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_nsmstat1 (ZDR *zdrs, nsmstat1 *objp)
|
2013-11-06 05:37:16 +04:00
|
|
|
{
|
2013-11-06 18:56:44 +04:00
|
|
|
if (!zdr_enum (zdrs, (enum_t *) objp))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_nsm_my_id (ZDR *zdrs, nsm_my_id *objp)
|
2013-11-06 05:37:16 +04:00
|
|
|
{
|
2013-11-06 18:56:44 +04:00
|
|
|
if (!zdr_string (zdrs, &objp->my_name, NSM_MAXSTRLEN))
|
|
|
|
return FALSE;
|
|
|
|
if (!zdr_int (zdrs, &objp->my_prog))
|
|
|
|
return FALSE;
|
|
|
|
if (!zdr_int (zdrs, &objp->my_vers))
|
|
|
|
return FALSE;
|
|
|
|
if (!zdr_int (zdrs, &objp->my_proc))
|
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_nsm_mon_id (ZDR *zdrs, nsm_mon_id *objp)
|
|
|
|
{
|
|
|
|
if (!zdr_string (zdrs, &objp->mon_name, NSM_MAXSTRLEN))
|
|
|
|
return FALSE;
|
|
|
|
if (!zdr_nsm_my_id (zdrs, &objp->my_id))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_STATres (ZDR *zdrs, NSM1_STATres *objp)
|
2013-11-06 05:37:16 +04:00
|
|
|
{
|
|
|
|
if (!zdr_nsmstat1 (zdrs, &objp->res))
|
|
|
|
return FALSE;
|
|
|
|
if (!zdr_int (zdrs, &objp->state))
|
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_STATargs (ZDR *zdrs, NSM1_STATargs *objp)
|
2013-11-06 05:37:16 +04:00
|
|
|
{
|
2013-11-06 18:56:44 +04:00
|
|
|
if (!zdr_string (zdrs, &objp->mon_name, NSM_MAXSTRLEN))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_MONres (ZDR *zdrs, NSM1_MONres *objp)
|
2013-11-06 05:37:16 +04:00
|
|
|
{
|
2013-11-06 18:56:44 +04:00
|
|
|
if (!zdr_nsmstat1 (zdrs, &objp->res))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
2013-11-06 18:56:44 +04:00
|
|
|
if (!zdr_int (zdrs, &objp->state))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
2013-11-06 18:56:44 +04:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_MONargs (ZDR *zdrs, NSM1_MONargs *objp)
|
|
|
|
{
|
|
|
|
if (!zdr_nsm_mon_id (zdrs, &objp->mon_id))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
2013-11-06 18:56:44 +04:00
|
|
|
if (!zdr_opaque (zdrs, objp->priv, 16))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_UNMONres (ZDR *zdrs, NSM1_UNMONres *objp)
|
2013-11-06 05:37:16 +04:00
|
|
|
{
|
2013-11-06 18:56:44 +04:00
|
|
|
if (!zdr_int (zdrs, &objp->state))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_UNMONargs (ZDR *zdrs, NSM1_UNMONargs *objp)
|
2013-11-06 05:37:16 +04:00
|
|
|
{
|
|
|
|
if (!zdr_nsm_mon_id (zdrs, &objp->mon_id))
|
|
|
|
return FALSE;
|
2013-11-06 18:56:44 +04:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_UNMONALLres (ZDR *zdrs, NSM1_UNMONALLres *objp)
|
|
|
|
{
|
|
|
|
if (!zdr_int (zdrs, &objp->state))
|
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_UNMONALLargs (ZDR *zdrs, NSM1_UNMONALLargs *objp)
|
|
|
|
{
|
|
|
|
if (!zdr_nsm_my_id (zdrs, &objp->my_id))
|
2013-11-06 05:37:16 +04:00
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2014-07-05 20:07:23 +04:00
|
|
|
uint32_t
|
2013-11-06 18:56:44 +04:00
|
|
|
zdr_NSM1_NOTIFYargs (ZDR *zdrs, NSM1_NOTIFYargs *objp)
|
2013-11-06 05:37:16 +04:00
|
|
|
{
|
|
|
|
if (!zdr_string (zdrs, &objp->mon_name, NSM_MAXSTRLEN))
|
|
|
|
return FALSE;
|
|
|
|
if (!zdr_int (zdrs, &objp->state))
|
|
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
|
|
}
|