Commit 87dfa2a6 authored by Eric Cano's avatar Eric Cano
Browse files

Removed more dead code following rtcpd removal.

parent 7deb1aa0
......@@ -45,14 +45,10 @@ set (CASTOR_LEGACYMSG_LIB_SRC_FILES
RmcProxyDummy.cpp
RmcProxyTcpIp.cpp
RmcUnmountMsgBody.cpp
RtcpDumpTapeRqstMsgBody.cpp
RtcpErrorAppendix.cpp
RtcpFileRqst.cpp
RtcpJobReplyMsgBody.cpp
RtcpJobRqstMsgBody.cpp
RtcpJobReplyMsgBody.cpp
RtcpMarshal.cpp
RtcpSegmentAttributes.cpp
RtcpTapeRqstMsgBody.cpp
RtcpErrorAppendix.cpp
TapeBridgeMarshal.cpp
TapeConfigRequestMsgBody.cpp
TapeLabelRqstMsgBody.cpp
......
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include "castor/legacymsg/RtcpDumpTapeRqstMsgBody.hpp"
castor::legacymsg::RtcpDumpTapeRqstMsgBody::RtcpDumpTapeRqstMsgBody()
throw():
maxBytes(0),
blockSize(0),
convert_noLongerUsed(0),
tapeErrAction(0),
startFile(0),
maxFiles(0),
fromBlock(0),
toBlock(0) {
}
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include <stdint.h>
namespace castor {
namespace legacymsg {
/**
* An RTCP dump tape request message.
*/
struct RtcpDumpTapeRqstMsgBody {
int32_t maxBytes;
int32_t blockSize;
int32_t convert_noLongerUsed;
int32_t tapeErrAction;
int32_t startFile;
int32_t maxFiles;
int32_t fromBlock;
int32_t toBlock;
/**
* Constructor.
*
* Sets all integer member-variables to 0.
*/
RtcpDumpTapeRqstMsgBody() throw();
}; // struct RtcpDumpTapeRqstMsgBody
} // namespace legacymsg
} // namespace castor
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#include "castor/legacymsg/RtcpFileRqst.hpp"
#include <string.h>
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
castor::legacymsg::RtcpFileRqst::RtcpFileRqst() throw():
volReqId(0),
jobId(0),
stageSubReqId(0),
umask(0),
positionMethod(0),
tapeFseq(0),
diskFseq(0),
blockSize(0),
recordLength(0),
retention(0),
defAlloc(0),
rtcpErrAction(0),
tpErrAction(0),
convert_noLongerUsed(0),
checkFid(0),
concat(0),
procStatus(0),
cprc(0),
tStartPosition(0),
tEndPosition(0),
tStartTransferDisk(0),
tEndTransferDisk(0),
tStartTransferTape(0),
tEndTransferTape(0),
offset(0),
bytesIn(0),
bytesOut(0),
hostBytes(0),
nbRecs(0),
maxNbRec(0),
maxSize(0),
startSize(0),
stgReqId(nullCuuid) {
memset(filePath, '\0', sizeof(filePath));
memset(tapePath, '\0', sizeof(tapePath));
memset(recfm_noLongerUsed, '\0', sizeof(recfm_noLongerUsed));
memset(fid, '\0', sizeof(fid));
memset(ifce, '\0', sizeof(ifce));
memset(stageId, '\0', sizeof(stageId));
memset(blockId,'\0', sizeof(blockId));
}
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include "castor/legacymsg/RtcpSegmentAttributes.hpp"
#include "h/Castor_limits.h"
#include "h/Cuuid.h"
#include <stdint.h>
namespace castor {
namespace legacymsg {
/**
* The fields that are common to both an RtcpFileRqstMsgBody and an
* RtcpFileRqstErrMsgBody.
*/
struct RtcpFileRqst {
char filePath[CA_MAXPATHLEN+1]; // Disk file path
char tapePath[CA_MAXPATHLEN+1]; // Tape device file
char recfm_noLongerUsed[CA_MAXRECFMLEN+1];
char fid[CA_MAXFIDLEN+1]; // Tape file ID
char ifce[5]; // Network interface name
char stageId[CA_MAXSTGRIDLEN+1]; // Stage request ID
uint32_t volReqId; // VDQM volume request ID
int32_t jobId; // Local RTCOPY server job ID
int32_t stageSubReqId; // Stage subrequest ID (-1 for SHIFT)
uint32_t umask; // Client umask
int32_t positionMethod; // TPPOSIT_FSEQ, TPPOSIT_FID, TPPOSIT_EOI and TPPOSIT_BLKID
int32_t tapeFseq; // If position_method == TPPOSIT_FSEQ
int32_t diskFseq; // Disk file sequence number. This is the order number of the
// current disk file in the request.
int32_t blockSize; // Tape blocksize (bytes)
int32_t recordLength; // Tape record length (bytes)
int32_t retention; // File retention time
int32_t defAlloc; // 0 = no deferred allocation
// Flags
int32_t rtcpErrAction; // SKIPBAD or KEEPFILE
int32_t tpErrAction; // NOTRLCHK and IGNOREEOI
int32_t convert_noLongerUsed; // EBCCONV, FIXVAR
int32_t checkFid; // CHECK_FILE, NEW_FILE
uint32_t concat; // CONCAT, CONCAT_TO_EOD, NOCONCAT or NOCONCAT_TO_EOD
// Intermediate processing status used mainly to checkpoint in case of a
// retry of a partially successful request.
uint32_t procStatus; // RTCP_WAITING, RTC_POSITIONED, RTCP_FINISHED
// Final return code and timing information
int32_t cprc; // Copy return status
uint32_t tStartPosition; // Start time for position to this file
uint32_t tEndPosition; // End time for position to this file
uint32_t tStartTransferDisk; // Start time for transfer to/from disk
uint32_t tEndTransferDisk; // End time for transfer to/from disk
uint32_t tStartTransferTape; // Start time for tranfser to/from tape
uint32_t tEndTransferTape; // End time for tranfser to/from tape
unsigned char blockId[4]; // If position_method == TPPOSIT_BLKID
// 64 bit quantities
// Compression statistics (actual transfer size)
uint64_t offset; // Start offset in disk file
uint64_t bytesIn; // Bytes from disk (write) or bytes from tape (read)
uint64_t bytesOut; // Bytes to tape (write) or bytes to disk (read)
uint64_t hostBytes; // Tape bytes read/written including the labels
uint64_t nbRecs; // Number of records copied
// Imposed size restrictions (input parameters)
uint64_t maxNbRec; // Read only "maxnbrec" records
uint64_t maxSize; // Copy only "maxsize" bytes
uint64_t startSize; // Accumulated size
// CASTOR segment attributes
RtcpSegmentAttributes segAttr;
Cuuid_t stgReqId; // Unique identifier given by the stager
/**
* Constructor.
*
* Sets all integer member-variables to 0, all string member-variables to the
* empty string, block IDs to 0 and all Cuuid_t member-variables to nullCuuid.
*/
RtcpFileRqst() throw();
}; // struct RtcpFileRqst
} // namespace legacymsg
} // namespace castor
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#ifndef CASTOR_TAPE_LEGACYMSG_RTCPFILERQSTERRMSGBODY
#define CASTOR_TAPE_LEGACYMSG_RTCPFILERQSTERRMSGBODY
#include "castor/legacymsg/RtcpErrorAppendix.hpp"
#include "castor/legacymsg/RtcpFileRqst.hpp"
#include "castor/legacymsg/RtcpSegmentAttributes.hpp"
#include "h/Castor_limits.h"
#include "h/Cuuid.h"
#include <stdint.h>
namespace castor {
namespace tape {
namespace legacymsg {
/**
* An RTCP file request with error appendix message.
*
* Please note that the presence of an error appendix does not necessarily
* indicate an error.
*/
struct RtcpFileRqstErrMsgBody {
/**
* The request data which is common to both an RtcpFileRqstMsgBody and an
* RtcpFileRqstErrMsgBody.
*/
RtcpFileRqst rqst;
/**
* The error appendix.
*/
RtcpErrorAppendix err;
}; // struct RtcpFileRqstErrMsgBody
} // namespace legacymsg
} // namespace tape
} // namespace castor
#endif // CASTOR_TAPE_LEGACYMSG_RTCPFILERQSTERRMSGBODY
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include "castor/legacymsg/RtcpErrorAppendix.hpp"
#include "castor/legacymsg/RtcpFileRqst.hpp"
#include "castor/legacymsg/RtcpSegmentAttributes.hpp"
#include "h/Castor_limits.h"
#include "h/Cuuid.h"
#include <stdint.h>
namespace castor {
namespace legacymsg {
/**
* An RTCP file request with error appendix message.
*
* Please note that the presence of an error appendix does not necessarily
* indicate an error.
*/
struct RtcpFileRqstErrMsgBody {
/**
* The request data which is common to both an RtcpFileRqstMsgBody and an
* RtcpFileRqstErrMsgBody.
*/
RtcpFileRqst rqst;
/**
* The error appendix.
*/
RtcpErrorAppendix err;
}; // struct RtcpFileRqstErrMsgBody
} // namespace legacymsg
} // namespace castor
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
#include "castor/legacymsg/RtcpErrorAppendix.hpp"
#include "castor/legacymsg/RtcpFileRqst.hpp"
#include "castor/legacymsg/RtcpSegmentAttributes.hpp"
#include "h/Castor_limits.h"
#include "h/Cuuid.h"
#include <stdint.h>
namespace castor {
namespace legacymsg {
/**
* An RTCP file request without error appendix message.
*/
struct RtcpFileRqstMsgBody {
/**
* The request data which is common to both an RtcpFileRqstMsgBody and an
* RtcpFileRqstErrMsgBody.
*/
RtcpFileRqst rqst;
}; // struct RtcpFileRqstMsgBody
} // namespace legacymsg
} // namespace castor
This diff is collapsed.
......@@ -26,14 +26,8 @@
#include "castor/exception/Exception.hpp"
#include "castor/legacymsg/GiveOutpMsgBody.hpp"
#include "castor/legacymsg/RtcpJobReplyMsgBody.hpp"
#include "castor/legacymsg/RtcpJobRqstMsgBody.hpp"
#include "castor/legacymsg/RtcpDumpTapeRqstMsgBody.hpp"
#include "castor/legacymsg/RtcpNoMoreRequestsMsgBody.hpp"
#include "castor/legacymsg/RtcpFileRqstMsgBody.hpp"
#include "castor/legacymsg/RtcpFileRqstErrMsgBody.hpp"
#include "castor/legacymsg/RtcpTapeRqstMsgBody.hpp"
#include "castor/legacymsg/RtcpTapeRqstErrMsgBody.hpp"
#include "castor/legacymsg/RtcpJobReplyMsgBody.hpp"
#include <errno.h>
#include <stdint.h>
......@@ -125,187 +119,6 @@ template<int n> size_t marshal(char (&dst)[n],
void unmarshal(const char * &src, size_t &srcLen,
RtcpJobReplyMsgBody &dst) ;
/**
* Marshalls the specified source message body structure into the
* specified destination buffer.
*
* @param dst The destination message buffer.
* @param dstLen The length of the destination buffer.
* @param src The source structure.
* @return The total length of the message (header + body).
*/
size_t marshal(char *const dst, const size_t dstLen,
const RtcpTapeRqstErrMsgBody &src) ;
/**
* Marshalls the specified source message body structure into the
* specified destination buffer.
*
* @param dst The destination message buffer.
* @param src The source structure.
* @return The total length of the message (header + body).
*/
template<int n> size_t marshal(char (&dst)[n],
const RtcpTapeRqstErrMsgBody &src) {
return marshal(dst, n, src);
}
/**
* Unmarshals a message body with the specified destination structure type
* from the specified source buffer.
*
* @param src In/out parameter, before invocation points to the source
* buffer where the message body should be unmarshalled from and on return
* points to the byte in the source buffer immediately after the
* unmarshalled message body.
* @param srcLen In/our parameter, before invocation is the length of the
* source buffer from where the message body should be unmarshalled and on
* return is the number of bytes remaining in the source buffer.
* @param dst The destination message body structure.
*/
void unmarshal(const char * &src, size_t &srcLen,
RtcpTapeRqstErrMsgBody &dst) ;
/**
* Unmarshals a message body with the specified destination structure type
* from the specified source buffer.
*
* @param src In/out parameter, before invocation points to the source
* buffer where the message body should be unmarshalled from and on return
* points to the byte in the source buffer immediately after the
* unmarshalled message body.
* @param srcLen In/our parameter, before invocation is the length of the
* source buffer from where the message body should be unmarshalled and on
* return is the number of bytes remaining in the source buffer.
* @param dst The destination message body structure.
*/
void unmarshal(const char * &src, size_t &srcLen,
RtcpTapeRqstMsgBody &dst) ;
/**
* Marshalls the specified source message body structure into the
* specified destination buffer.
*
* @param dst The destination message buffer.
* @param dstLen The length of the destination buffer.
* @param src The source structure.
* @return The total length of the message (header + body).
*/
size_t marshal(char *const dst, const size_t dstLen,
const RtcpFileRqstErrMsgBody &src) ;
/**
* Marshalls the specified source message body structure into the
* specified destination buffer.
*
* @param dst The destination message buffer.
* @param src The source structure.
* @return The total length of the message (header + body).
*/
template<int n> size_t marshal(char (&dst)[n],
const RtcpFileRqstErrMsgBody &src) {
return marshal(dst, n, src);
}
/**
* Unmarshals a message body with the specified destination structure type
* from the specified source buffer.
*
* @param src In/out parameter, before invocation points to the source
* buffer where the message body should be unmarshalled from and on return
* points to the byte in the source buffer immediately after the
* unmarshalled message body.
* @param srcLen In/our parameter, before invocation is the length of the
* source buffer from where the message body should be unmarshalled and on
* return is the number of bytes remaining in the source buffer.
* @param dst The destination message body structure.
*/
void unmarshal(const char * &src, size_t &srcLen,
RtcpFileRqstErrMsgBody &dst) ;
/**
* Unmarshals a message body with the specified destination structure type
* from the specified source buffer.
*
* @param src In/out parameter, before invocation points to the source
* buffer where the message body should be unmarshalled from and on return
* points to the byte in the source buffer immediately after the
* unmarshalled message body.
* @param srcLen In/our parameter, before invocation is the length of the
* source buffer from where the message body should be unmarshalled and on
* return is the number of bytes remaining in the source buffer.
* @param dst The destination message body structure.
*/
void unmarshal(const char * &src, size_t &srcLen,
RtcpFileRqstMsgBody &dst) ;
/**
* Unmarshals a message body with the specified destination structure type
* from the specified source buffer.
*
* @param src In/out parameter, before invocation points to the source
* buffer where the message body should be unmarshalled from and on return
* points to the byte in the source buffer immediately after the
* unmarshalled message body.
* @param srcLen In/our parameter, before invocation is the length of the
* source buffer from where the message body should be unmarshalled and on