/* Generated from volumeserver.xg */
#include <volumeserver.h>

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>
#ifndef HAVE_BCOPY
#define bcopy(a,b,c) memcpy((b),(a),(c))
#endif /* !HAVE_BCOPY */

char *ydr_encode_volser_trans(volser_trans *o, char *ptr)
{
ptr = ydr_encode_volser_trans((*o).next, ptr);
{ int32_t tmp = htonl((*o).tid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).time); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).creationTime); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).returnCode); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).volid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).partition); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).dumpTransId); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).dumpSeq); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).refCount); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).iflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).vflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).tflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).incremental); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{
int i0;
for(i0 = 0; i0 < 30;++i0){
{ int32_t tmp = htonl((*o).lastProcName[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_decode_volser_trans(volser_trans *o, char *ptr)
{
ptr = ydr_encode_volser_trans((*o).next, ptr);
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).tid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).time = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).creationTime = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).returnCode = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).partition = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).dumpTransId = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).dumpSeq = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).refCount = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).iflags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).vflags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).tflags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).incremental = ntohl(tmp); ptr += sizeof(int);}
{
int i0;
for(i0 = 0; i0 < 30;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).lastProcName[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_encode_volDescription(volDescription *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 65;++i0){
{ int32_t tmp = htonl((*o).volName[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{ int32_t tmp = htonl((*o).volId); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).volSize); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).volFlags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).volCloneId); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
return ptr;
}
char *ydr_decode_volDescription(volDescription *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 65;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volName[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volId = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volSize = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volFlags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volCloneId = ntohl(tmp); ptr += sizeof(int);}
return ptr;
}
char *ydr_encode_partList(partList *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 26;++i0){
{ int32_t tmp = htonl((*o).partId[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{
int i0;
for(i0 = 0; i0 < 26;++i0){
{ int32_t tmp = htonl((*o).partFlags[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_decode_partList(partList *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 26;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).partId[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
{
int i0;
for(i0 = 0; i0 < 26;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).partFlags[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_encode_volser_status(volser_status *o, char *ptr)
{
{ int32_t tmp = htonl((*o).volID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).nextUnique); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).type); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).parentID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).cloneID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).backupID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).restoredFromID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).maxQuota); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).minQuota); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).owner); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).creationDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).accessDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).updateDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).exprirationDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).backupDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).copyDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
return ptr;
}
char *ydr_decode_volser_status(volser_status *o, char *ptr)
{
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).nextUnique = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).type = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).parentID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).cloneID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).backupID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).restoredFromID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).maxQuota = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).minQuota = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).owner = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).creationDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).accessDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).updateDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).exprirationDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).backupDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).copyDate = ntohl(tmp); ptr += sizeof(int);}
return ptr;
}
char *ydr_encode_destServer(destServer *o, char *ptr)
{
{ int32_t tmp = htonl((*o).destHost); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).destPort); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).destSSID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
return ptr;
}
char *ydr_decode_destServer(destServer *o, char *ptr)
{
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).destHost = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).destPort = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).destSSID = ntohl(tmp); ptr += sizeof(int);}
return ptr;
}
char *ydr_encode_volintInfo(volintInfo *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 32;++i0){
{ int32_t tmp = htonl((*o).name[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{ int32_t tmp = htonl((*o).volid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).type); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).backupID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).parentID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).cloneID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).status); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).copyDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).inUse); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).needsSalvaged); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).destroyMe); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).creationDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).accessDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).updateDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).backupDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).dayUse); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).filecount); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).maxquota); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).size); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).flags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).spare0); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).spare1); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).spare2); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).spare3); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
return ptr;
}
char *ydr_decode_volintInfo(volintInfo *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 32;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).name[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).type = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).backupID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).parentID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).cloneID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).status = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).copyDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).inUse = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).needsSalvaged = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).destroyMe = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).creationDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).accessDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).updateDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).backupDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).dayUse = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).filecount = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).maxquota = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).size = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).flags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).spare0 = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).spare1 = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).spare2 = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).spare3 = ntohl(tmp); ptr += sizeof(int);}
return ptr;
}
char *ydr_encode_transDebugInfo(transDebugInfo *o, char *ptr)
{
{ int32_t tmp = htonl((*o).tid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).time); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).creationTime); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).returnCode); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).volid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).partition); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).iflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).vflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).tflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{
int i0;
for(i0 = 0; i0 < 30;++i0){
{ int32_t tmp = htonl((*o).lastProcName[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{ int32_t tmp = htonl((*o).callValid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).readNext); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).transmitNext); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).lastSendTime); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).lastReceiveTime); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
return ptr;
}
char *ydr_decode_transDebugInfo(transDebugInfo *o, char *ptr)
{
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).tid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).time = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).creationTime = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).returnCode = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).volid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).partition = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).iflags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).vflags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).tflags = ntohl(tmp); ptr += sizeof(int);}
{
int i0;
for(i0 = 0; i0 < 30;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).lastProcName[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).callValid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).readNext = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).transmitNext = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).lastSendTime = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).lastReceiveTime = ntohl(tmp); ptr += sizeof(int);}
return ptr;
}
char *ydr_encode_pIDs(pIDs *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 26;++i0){
{ int32_t tmp = htonl((*o).partIds[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_decode_pIDs(pIDs *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 26;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).partIds[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_encode_diskPartition(diskPartition *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 32;++i0){
{ int32_t tmp = htonl((*o).name[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{
int i0;
for(i0 = 0; i0 < 32;++i0){
{ int32_t tmp = htonl((*o).devName[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{ int32_t tmp = htonl((*o).lock_fd); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).totalUsable); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).free); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).minFree); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
return ptr;
}
char *ydr_decode_diskPartition(diskPartition *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 32;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).name[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
{
int i0;
for(i0 = 0; i0 < 32;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).devName[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).lock_fd = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).totalUsable = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).free = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).minFree = ntohl(tmp); ptr += sizeof(int);}
return ptr;
}
char *ydr_encode_restoreCookie(restoreCookie *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 32;++i0){
{ int32_t tmp = htonl((*o).name[i0]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{ int32_t tmp = htonl((*o).type); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).clone); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).parent); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
return ptr;
}
char *ydr_decode_restoreCookie(restoreCookie *o, char *ptr)
{
{
int i0;
for(i0 = 0; i0 < 32;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).name[i0] = ntohl(tmp); ptr += sizeof(int);}
}
}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).type = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).clone = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).parent = ntohl(tmp); ptr += sizeof(int);}
return ptr;
}
char *ydr_encode_transDebugEntries(transDebugEntries *o, char *ptr)
{
{ int32_t tmp = htonl((*o).len); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{
int i0;
for(i0 = 0; i0 < (*o).len;++i0){
{ int32_t tmp = htonl((*o).val[i0].tid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].time); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].creationTime); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].returnCode); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].volid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].partition); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].iflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].vflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].tflags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{
int i1;
for(i1 = 0; i1 < 30;++i1){
{ int32_t tmp = htonl((*o).val[i0].lastProcName[i1]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{ int32_t tmp = htonl((*o).val[i0].callValid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].readNext); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].transmitNext); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].lastSendTime); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].lastReceiveTime); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_decode_transDebugEntries(transDebugEntries *o, char *ptr)
{
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).len = ntohl(tmp); ptr += sizeof(int);}
(*o).val = (struct transDebugInfo *)malloc(sizeof(struct transDebugInfo ) * (*o).len);
{
int i0;
for(i0 = 0; i0 < (*o).len;++i0){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].tid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].time = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].creationTime = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].returnCode = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].volid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].partition = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].iflags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].vflags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].tflags = ntohl(tmp); ptr += sizeof(int);}
{
int i1;
for(i1 = 0; i1 < 30;++i1){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].lastProcName[i1] = ntohl(tmp); ptr += sizeof(int);}
}
}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].callValid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].readNext = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].transmitNext = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].lastSendTime = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].lastReceiveTime = ntohl(tmp); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_encode_volEntries(volEntries *o, char *ptr)
{
{ int32_t tmp = htonl((*o).len); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{
int i0;
for(i0 = 0; i0 < (*o).len;++i0){
{
int i1;
for(i1 = 0; i1 < 32;++i1){
{ int32_t tmp = htonl((*o).val[i0].name[i1]); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
{ int32_t tmp = htonl((*o).val[i0].volid); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].type); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].backupID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].parentID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].cloneID); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].status); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].copyDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].inUse); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].needsSalvaged); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].destroyMe); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].creationDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].accessDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].updateDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].backupDate); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].dayUse); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].filecount); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].maxquota); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].size); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].flags); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].spare0); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].spare1); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].spare2); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
{ int32_t tmp = htonl((*o).val[i0].spare3); bcopy ((char*)&tmp, ptr, sizeof(int)); ptr += sizeof(int);}
}
}
return ptr;
}
char *ydr_decode_volEntries(volEntries *o, char *ptr)
{
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).len = ntohl(tmp); ptr += sizeof(int);}
(*o).val = (struct volintInfo *)malloc(sizeof(struct volintInfo ) * (*o).len);
{
int i0;
for(i0 = 0; i0 < (*o).len;++i0){
{
int i1;
for(i1 = 0; i1 < 32;++i1){
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].name[i1] = ntohl(tmp); ptr += sizeof(int);}
}
}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].volid = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].type = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].backupID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].parentID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].cloneID = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].status = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].copyDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].inUse = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].needsSalvaged = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].destroyMe = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].creationDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].accessDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].updateDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].backupDate = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].dayUse = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].filecount = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].maxquota = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].size = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].flags = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].spare0 = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].spare1 = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].spare2 = ntohl(tmp); ptr += sizeof(int);}
{ int32_t tmp; bcopy (ptr, (char *)&tmp, sizeof(int)); (*o).val[i0].spare3 = ntohl(tmp); ptr += sizeof(int);}
}
}
return ptr;
}
