Commit 0141c734 authored by Steven Murray's avatar Steven Murray
Browse files

We have modified the castor::tape::aggregator::Transceiver API. We have split

the reception of an RTCP message into two separate function calls; the
reception of the header and then the reception of the body.

This modification was needed in order to deal with the next step of
the RTCOPY protocol where the main select loop has to deal with different
types of incoming RTCOPY messages comming from different RTCPD threads.i
Immediately after a call to select which indicates an incoming message, the
tape aggregator needs to use the Transceiever to just read in the RTCP message
header so it can then dispatch the receptionm of the body of the incomming
message to the appropriate Transceiver body reception function.
parent 0d231fc8
......@@ -261,7 +261,7 @@ size_t castor::tape::aggregator::Marshaller::marshallMessageHeader(
}
// Calculate the length of the message header
const uint32_t totalLen = 3 * sizeof(uint32_t); // magic + reqtype + len
const uint32_t totalLen = 3 * sizeof(uint32_t); // magic + reqType + len
// Check that the message header buffer is big enough
if(totalLen > dstLen) {
......@@ -277,7 +277,7 @@ size_t castor::tape::aggregator::Marshaller::marshallMessageHeader(
// Marshall the message header
char *p = dst;
marshallUint32(src.magic , p);
marshallUint32(src.reqtype, p);
marshallUint32(src.reqType, p);
marshallUint32(src.len , p);
// Calculate the number of bytes actually marshalled
......@@ -308,16 +308,16 @@ void castor::tape::aggregator::Marshaller::unmarshallMessageHeader(
throw(castor::exception::Exception) {
unmarshallUint32(src, srcLen, dst.magic);
unmarshallUint32(src, srcLen, dst.reqtype);
unmarshallUint32(src, srcLen, dst.reqType);
unmarshallUint32(src, srcLen, dst.len);
}
//-----------------------------------------------------------------------------
// marshallRcpJobRequestMessage
// marshallRcpJobRequestMsgBody
//-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMessage(
char *const dst, const size_t dstLen, const RcpJobRequestMessage &src)
size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMsgBody(
char *const dst, const size_t dstLen, const RcpJobRequestMsgBody &src)
throw(castor::exception::Exception) {
if(dst == NULL) {
......@@ -338,7 +338,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMessage(
4; // 4 = the number of string termination characters
// Calculate the total length of the message (header + body)
// Message header = magic + reqtype + len = 3 * sizeof(uint32_t)
// Message header = magic + reqType + len = 3 * sizeof(uint32_t)
const size_t totalLen = 3 * sizeof(uint32_t) + len;
// Check that the message buffer is big enough
......@@ -389,10 +389,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMessage(
//-----------------------------------------------------------------------------
// unmarshallRcpJobRequestMessageBody
// unmarshallRcpJobRequestMsgBodyBody
//-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRcpJobRequestMessageBody(
const char * &src, size_t &srcLen, RcpJobRequestMessage &dst)
void castor::tape::aggregator::Marshaller::unmarshallRcpJobRequestMsgBodyBody(
const char * &src, size_t &srcLen, RcpJobRequestMsgBody &dst)
throw(castor::exception::Exception) {
unmarshallUint32(src, srcLen, dst.tapeRequestId);
......@@ -407,10 +407,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRcpJobRequestMessageBody(
//-----------------------------------------------------------------------------
// marshallRcpJobReplyMessage
// marshallRcpJobReplyMsgBody
//-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMessage(
char *const dst, const size_t dstLen, const RcpJobReplyMessage &src)
size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMsgBody(
char *const dst, const size_t dstLen, const RcpJobReplyMsgBody &src)
throw(castor::exception::Exception) {
if(dst == NULL) {
......@@ -437,7 +437,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMessage(
// Calculate the length of the error message to be sent taking into account
// the fact that the error message should be right trimmed if it is too large
// to fit in the destination buffer.
const size_t headerLen = 3 * sizeof(uint32_t); // magic + reqtype + len
const size_t headerLen = 3 * sizeof(uint32_t); // magic + reqType + len
// free space = total - header - status - terminating null character
const size_t freeSpace = dstLen - headerLen - sizeof(uint32_t) - 1;
const size_t errLenToSend = strlen(src.errorMessage) < freeSpace ?
......@@ -481,10 +481,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMessage(
//-----------------------------------------------------------------------------
// unmarshallRcpJobReplyMessageBody
// unmarshallRcpJobReplyMsgBodyBody
//-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRcpJobReplyMessageBody(
const char * &src, size_t &srcLen, RcpJobReplyMessage &dst)
void castor::tape::aggregator::Marshaller::unmarshallRcpJobReplyMsgBodyBody(
const char * &src, size_t &srcLen, RcpJobReplyMsgBody &dst)
throw(castor::exception::Exception) {
// Unmarshall the status number
......@@ -508,10 +508,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRcpJobReplyMessageBody(
//-----------------------------------------------------------------------------
// marshallRtcpTapeRequestMessage
// marshallRtcpTapeRequestMsgBody
//-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMessage(
char *dst, const size_t dstLen, const RtcpTapeRequestMessage &src)
size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMsgBody(
char *dst, const size_t dstLen, const RtcpTapeRequestMsgBody &src)
throw(castor::exception::Exception) {
// Calculate the length of the message body
......@@ -529,7 +529,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMessage(
7; // 7 = number of null terminator characters
// Calculate the total length of the message (header + body)
// Message header = magic + reqtype + len = 3 * sizeof(uint32_t)
// Message header = magic + reqType + len = 3 * sizeof(uint32_t)
const size_t totalLen = 3 * sizeof(uint32_t) + len;
// Check that the message buffer is big enough
......@@ -606,10 +606,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMessage(
//-----------------------------------------------------------------------------
// unmarshallRtcpTapeRequestMessageBody
// unmarshallRtcpTapeRequestMsgBodyBody
//-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRtcpTapeRequestMessageBody(
const char * &src, size_t &srcLen, RtcpTapeRequestMessage &dst)
void castor::tape::aggregator::Marshaller::unmarshallRtcpTapeRequestMsgBodyBody(
const char * &src, size_t &srcLen, RtcpTapeRequestMsgBody &dst)
throw(castor::exception::Exception) {
unmarshallString(src, srcLen, dst.vid);
......@@ -652,10 +652,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRtcpTapeRequestMessageBody(
//-----------------------------------------------------------------------------
// marshallRtcpAcknowledgeMessage
// marshallRtcpAcknowledgeMsgBody
//-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage(
char *const dst, const size_t dstLen, const RtcpAcknowledgeMessage &src)
size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMsgBody(
char *const dst, const size_t dstLen, const RtcpAcknowledgeMsgBody &src)
throw(castor::exception::Exception) {
castor::exception::Internal ie;
......@@ -669,7 +669,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage(
// Calculate the total length of the message (there is no separate header and
// body)
const uint32_t totalLen = 3 * sizeof(uint32_t); // magic + reqtype + status
const uint32_t totalLen = 3 * sizeof(uint32_t); // magic + reqType + status
// Check that the message buffer is big enough
if(totalLen > dstLen) {
......@@ -686,7 +686,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage(
// Marshall the message
char *p = dst;
marshallUint32(src.magic , p);
marshallUint32(src.reqtype, p);
marshallUint32(src.reqType, p);
marshallUint32(src.status , p);
// Calculate the number of bytes actually marshalled
......@@ -711,23 +711,23 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage(
//-----------------------------------------------------------------------------
// unmarshallRtcpAcknowledgeMessageBody
// unmarshallRtcpAcknowledgeMsgBodyBody
//-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRtcpAcknowledgeMessageBody(
const char * &src, size_t &srcLen, RtcpAcknowledgeMessage &dst)
void castor::tape::aggregator::Marshaller::unmarshallRtcpAcknowledgeMsgBodyBody(
const char * &src, size_t &srcLen, RtcpAcknowledgeMsgBody &dst)
throw(castor::exception::Exception) {
unmarshallUint32(src, srcLen, dst.magic);
unmarshallUint32(src, srcLen, dst.reqtype);
unmarshallUint32(src, srcLen, dst.reqType);
unmarshallUint32(src, srcLen, dst.status);
}
//-----------------------------------------------------------------------------
// marshallRtcpFileRequestMessage
// marshallRtcpFileRequestMsgBody
//-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMessage(
char *dst, const size_t dstLen, const RtcpFileRequestMessage &src)
size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMsgBody(
char *dst, const size_t dstLen, const RtcpFileRequestMsgBody &src)
throw(castor::exception::Exception) {
// Calculate the length of the message body
......@@ -760,7 +760,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMessage(
1; // err.errmsgtxt string terminator
// Calculate the total length of the message (header + body)
// Message header = magic + reqtype + len = 3 * sizeof(uint32_t)
// Message header = magic + reqType + len = 3 * sizeof(uint32_t)
const size_t totalLen = 3 * sizeof(uint32_t) + len;
// Check that the message buffer is big enough
......@@ -864,10 +864,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMessage(
//-----------------------------------------------------------------------------
// unmarshallRtcpFileRequestMessageBody
// unmarshallRtcpFileRequestMsgBodyBody
//-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRtcpFileRequestMessageBody(
const char * &src, size_t &srcLen, RtcpFileRequestMessage &dst)
void castor::tape::aggregator::Marshaller::unmarshallRtcpFileRequestMsgBodyBody(
const char * &src, size_t &srcLen, RtcpFileRequestMsgBody &dst)
throw(castor::exception::Exception) {
unmarshallString(src, srcLen, dst.filePath);
......@@ -946,7 +946,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpNoMoreRequestsMessage(
const uint32_t len = 0;
// Calculate the total length of the message (header + body)
// Message header = magic + reqtype + len = 3 * sizeof(uint32_t)
// Message header = magic + reqType + len = 3 * sizeof(uint32_t)
const size_t totalLen = 3 * sizeof(uint32_t) + len;
// Check that the message buffer is big enough
......
......@@ -28,11 +28,11 @@
#include "castor/exception/Exception.hpp"
#include "castor/tape/aggregator/MessageHeader.hpp"
#include "castor/tape/aggregator/RcpJobReplyMessage.hpp"
#include "castor/tape/aggregator/RcpJobRequestMessage.hpp"
#include "castor/tape/aggregator/RtcpAcknowledgeMessage.hpp"
#include "castor/tape/aggregator/RtcpFileRequestMessage.hpp"
#include "castor/tape/aggregator/RtcpTapeRequestMessage.hpp"
#include "castor/tape/aggregator/RcpJobReplyMsgBody.hpp"
#include "castor/tape/aggregator/RcpJobRequestMsgBody.hpp"
#include "castor/tape/aggregator/RtcpAcknowledgeMsgBody.hpp"
#include "castor/tape/aggregator/RtcpFileRequestMsgBody.hpp"
#include "castor/tape/aggregator/RtcpTapeRequestMsgBody.hpp"
#include <errno.h>
#include <stdint.h>
......@@ -315,8 +315,8 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
static size_t marshallRcpJobRequestMessage(char *const dst,
const size_t dstLen, const RcpJobRequestMessage &src)
static size_t marshallRcpJobRequestMsgBody(char *const dst,
const size_t dstLen, const RcpJobRequestMsgBody &src)
throw(castor::exception::Exception);
/**
......@@ -327,9 +327,9 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
template<int n> static size_t marshallRcpJobRequestMessage(char (&dst)[n],
const RcpJobRequestMessage &src) throw(castor::exception::Exception) {
return marshallRcpJobRequestMessage(dst, n, src);
template<int n> static size_t marshallRcpJobRequestMsgBody(char (&dst)[n],
const RcpJobRequestMsgBody &src) throw(castor::exception::Exception) {
return marshallRcpJobRequestMsgBody(dst, n, src);
}
/**
......@@ -346,8 +346,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer.
* @param dst The destination request structure.
*/
static void unmarshallRcpJobRequestMessageBody(const char * &src,
size_t &srcLen, RcpJobRequestMessage &dst)
static void unmarshallRcpJobRequestMsgBodyBody(const char * &src,
size_t &srcLen, RcpJobRequestMsgBody &dst)
throw(castor::exception::Exception);
/**
......@@ -359,8 +359,8 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
static size_t marshallRcpJobReplyMessage(char *const dst,
const size_t dstLen, const RcpJobReplyMessage &src)
static size_t marshallRcpJobReplyMsgBody(char *const dst,
const size_t dstLen, const RcpJobReplyMsgBody &src)
throw(castor::exception::Exception);
/**
......@@ -371,9 +371,9 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
template<int n> static size_t marshallRcpJobReplyMessage(char (&dst)[n],
const RcpJobReplyMessage &src) throw(castor::exception::Exception) {
return marshallRcpJobReplyMessage(dst, n, src);
template<int n> static size_t marshallRcpJobReplyMsgBody(char (&dst)[n],
const RcpJobReplyMsgBody &src) throw(castor::exception::Exception) {
return marshallRcpJobReplyMsgBody(dst, n, src);
}
/**
......@@ -389,8 +389,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer.
* @param dst The destination reply structure.
*/
static void unmarshallRcpJobReplyMessageBody(const char * &src,
size_t &srcLen, RcpJobReplyMessage &dst)
static void unmarshallRcpJobReplyMsgBodyBody(const char * &src,
size_t &srcLen, RcpJobReplyMsgBody &dst)
throw(castor::exception::Exception);
/**
......@@ -402,8 +402,8 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
static size_t marshallRtcpTapeRequestMessage(char *const dst,
const size_t dstLen, const RtcpTapeRequestMessage &src)
static size_t marshallRtcpTapeRequestMsgBody(char *const dst,
const size_t dstLen, const RtcpTapeRequestMsgBody &src)
throw(castor::exception::Exception);
/**
......@@ -414,10 +414,10 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
template<int n> static size_t marshallRtcpTapeRequestMessage(
char (&dst)[n], const RtcpTapeRequestMessage &src)
template<int n> static size_t marshallRtcpTapeRequestMsgBody(
char (&dst)[n], const RtcpTapeRequestMsgBody &src)
throw(castor::exception::Exception) {
return marshallRtcpTapeRequestMessage(dst, n, src);
return marshallRtcpTapeRequestMsgBody(dst, n, src);
}
/**
......@@ -433,8 +433,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer.
* @param dst The destination request structure.
*/
static void unmarshallRtcpTapeRequestMessageBody(const char * &src,
size_t &srcLen, RtcpTapeRequestMessage &dst)
static void unmarshallRtcpTapeRequestMsgBodyBody(const char * &src,
size_t &srcLen, RtcpTapeRequestMsgBody &dst)
throw(castor::exception::Exception);
/**
......@@ -446,8 +446,8 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
static size_t marshallRtcpAcknowledgeMessage(char *const dst,
const size_t dstLen, const RtcpAcknowledgeMessage &src)
static size_t marshallRtcpAcknowledgeMsgBody(char *const dst,
const size_t dstLen, const RtcpAcknowledgeMsgBody &src)
throw(castor::exception::Exception);
/**
......@@ -458,10 +458,10 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
template<int n> static size_t marshallRtcpAcknowledgeMessage(
char (&dst)[n], const RtcpAcknowledgeMessage &src)
template<int n> static size_t marshallRtcpAcknowledgeMsgBody(
char (&dst)[n], const RtcpAcknowledgeMsgBody &src)
throw(castor::exception::Exception) {
return marshallRtcpAcknowledgeMessage(dst, n, src);
return marshallRtcpAcknowledgeMsgBody(dst, n, src);
}
/**
......@@ -478,8 +478,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer.
* @param dst The destination message structure.
*/
static void unmarshallRtcpAcknowledgeMessageBody(const char * &src,
size_t &srcLen, RtcpAcknowledgeMessage &dst)
static void unmarshallRtcpAcknowledgeMsgBodyBody(const char * &src,
size_t &srcLen, RtcpAcknowledgeMsgBody &dst)
throw(castor::exception::Exception);
/**
......@@ -491,8 +491,8 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
static size_t marshallRtcpFileRequestMessage(char *const dst,
const size_t dstLen, const RtcpFileRequestMessage &src)
static size_t marshallRtcpFileRequestMsgBody(char *const dst,
const size_t dstLen, const RtcpFileRequestMsgBody &src)
throw(castor::exception::Exception);
/**
......@@ -503,10 +503,10 @@ namespace aggregator {
* @param src The source structure.
* @return The total length of the message (header + body).
*/
template<int n> static size_t marshallRtcpFileRequestMessage(
char (&dst)[n], const RtcpFileRequestMessage &src)
template<int n> static size_t marshallRtcpFileRequestMsgBody(
char (&dst)[n], const RtcpFileRequestMsgBody &src)
throw(castor::exception::Exception) {
return marshallRtcpFileRequestMessage(dst, n, src);
return marshallRtcpFileRequestMsgBody(dst, n, src);
}
/**
......@@ -522,8 +522,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer.
* @param dst The destination request structure.
*/
static void unmarshallRtcpFileRequestMessageBody(const char * &src,
size_t &srcLen, RtcpFileRequestMessage &dst)
static void unmarshallRtcpFileRequestMsgBodyBody(const char * &src,
size_t &srcLen, RtcpFileRequestMsgBody &dst)
throw(castor::exception::Exception);
/**
......
......@@ -40,7 +40,7 @@ namespace aggregator {
*/
struct MessageHeader {
uint32_t magic;
uint32_t reqtype;
uint32_t reqType;
uint32_t len;
};
......
......@@ -53,7 +53,7 @@ int castor::tape::aggregator::Net::createListenerSocket(
throw ex;
}
Utils::setBytes(address, 0);
Utils::setBytes(address, '\0');
address.sin_family = AF_INET;
address.sin_addr.s_addr = htonl(INADDR_ANY);
address.sin_port = htons(port);
......
/******************************************************************************
* castor/tape/aggregator/RcpJobReplyMessage.hpp
* castor/tape/aggregator/RcpJobReplyMsgBody.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
......@@ -22,8 +22,8 @@
* @author Nicola.Bessone@cern.ch Steven.Murray@cern.ch
*****************************************************************************/
#ifndef CASTOR_TAPE_AGGREGATOR_RCPJOBREPLYMESSAGE
#define CASTOR_TAPE_AGGREGATOR_RCPJOBREPLYMESSAGE
#ifndef CASTOR_TAPE_AGGREGATOR_RCPJOBREPLYMSGBODY
#define CASTOR_TAPE_AGGREGATOR_RCPJOBREPLYMSGBODY
#include "h/Castor_limits.h"
......@@ -38,7 +38,7 @@ namespace aggregator {
/**
* An RCP job reply message.
*/
struct RcpJobReplyMessage {
struct RcpJobReplyMsgBody {
uint32_t status;
char errorMessage[1024];
};
......@@ -47,4 +47,4 @@ namespace aggregator {
} // namespace tape
} // namespace castor
#endif // CASTOR_TAPE_AGGREGATOR_RCPJOBREPLYMESSAGE
#endif // CASTOR_TAPE_AGGREGATOR_RCPJOBREPLYMSGBODY
/******************************************************************************
* castor/tape/aggregator/RcpJobRequestMessage.hpp
* castor/tape/aggregator/RcpJobRequestMsgBody.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
......@@ -22,8 +22,8 @@
* @author Nicola.Bessone@cern.ch Steven.Murray@cern.ch
*****************************************************************************/
#ifndef CASTOR_TAPE_AGGREGATOR_RCPJOBREQUESTMESSAGE
#define CASTOR_TAPE_AGGREGATOR_RCPJOBREQUESTMESSAGE
#ifndef CASTOR_TAPE_AGGREGATOR_RCPJOBREQUESTMSGBODY
#define CASTOR_TAPE_AGGREGATOR_RCPJOBREQUESTMSGBODY
#include "h/Castor_limits.h"
......@@ -37,7 +37,7 @@ namespace aggregator {
/**
* An RCP job submission request message.
*/
struct RcpJobRequestMessage {
struct RcpJobRequestMsgBody {
uint32_t tapeRequestId;
uint32_t clientPort;
uint32_t clientEuid;
......@@ -52,4 +52,4 @@ namespace aggregator {
} // namespace tape
} // namespace castor
#endif // CASTOR_TAPE_AGGREGATOR_RCPJOBREQUESTMESSAGE
#endif // CASTOR_TAPE_AGGREGATOR_RCPJOBREQUESTMSGBODY
......@@ -29,8 +29,8 @@
#include "castor/tape/aggregator/Constants.hpp"
#include "castor/tape/aggregator/Marshaller.hpp"
#include "castor/tape/aggregator/Net.hpp"
#include "castor/tape/aggregator/RcpJobRequestMessage.hpp"
#include "castor/tape/aggregator/RcpJobReplyMessage.hpp"
#include "castor/tape/aggregator/RcpJobRequestMsgBody.hpp"
#include "castor/tape/aggregator/RcpJobReplyMsgBody.hpp"
#include "castor/tape/aggregator/RcpJobSubmitter.hpp"
#include "h/net.h"
#include "h/osdep.h"
......@@ -59,10 +59,10 @@ void castor::tape::aggregator::RcpJobSubmitter::submit(
const int clientEgid,
const std::string &deviceGroupName,
const std::string &driveName,
RcpJobReplyMessage &reply)
RcpJobReplyMsgBody &reply)
throw(castor::exception::Exception) {
RcpJobRequestMessage request;
RcpJobRequestMsgBody request;
// Check the validity of the parameters of this function
if(clientHost.length() > sizeof(request.clientHost) - 1) {
......@@ -122,7 +122,7 @@ void castor::tape::aggregator::RcpJobSubmitter::submit(
size_t totalLen = 0;
try {
totalLen = Marshaller::marshallRcpJobRequestMessage(buf, request);
totalLen = Marshaller::marshallRcpJobRequestMsgBody(buf, request);
} catch(castor::exception::Exception &ex) {
castor::exception::Internal ie;
......@@ -173,7 +173,7 @@ void castor::tape::aggregator::RcpJobSubmitter::submit(
//------------------------------------------------------------------------------
void castor::tape::aggregator::RcpJobSubmitter::readReply(
castor::io::AbstractTCPSocket &socket, const int netReadWriteTimeout,
const char *remoteCopyType, RcpJobReplyMessage &reply)
const char *remoteCopyType, RcpJobReplyMsgBody &reply)
throw(castor::exception::Exception) {
// Read in the message header
......@@ -222,14 +222,14 @@ void castor::tape::aggregator::RcpJobSubmitter::readReply(
}
// If the request type is invalid
if(header.reqtype != VDQM_CLIENTINFO) {
if(header.reqType != VDQM_CLIENTINFO) {
castor::exception::Exception ex(EBADMSG);
ex.getMessage() << __PRETTY_FUNCTION__
<< std::hex
<< ": Invalid request type from " << remoteCopyType
<< ": Expected: 0x" << VDQM_CLIENTINFO
<< ": Received: 0x" << header.reqtype;
<< ": Received: 0x" << header.reqType;
throw ex;
}
......@@ -283,7 +283,7 @@ void castor::tape::aggregator::RcpJobSubmitter::readReply(
try {
const char *p = bodyBuf;
size_t remainingLen = header.len;
Marshaller::unmarshallRcpJobReplyMessageBody(p, remainingLen, reply);
Marshaller::unmarshallRcpJobReplyMsgBodyBody(p, remainingLen, reply);
} catch(castor::exception::Exception &ex) {
castor::exception::Internal ie;
......
......@@ -81,7 +81,7 @@ namespace aggregator {
const int clientEgid,
const std::string &deviceGroupName,
const std::string &driveName,
RcpJobReplyMessage &reply)
RcpJobReplyMsgBody &reply)
throw(castor::exception::Exception);
......@@ -100,7 +100,7 @@ namespace aggregator {
*/
static void readReply(castor::io::AbstractTCPSocket &socket,
const int netReadWriteTimeout, const char *remoteCopyType,
RcpJobReplyMessage &reply) throw(castor::exception::Exception);
RcpJobReplyMsgBody &reply) throw(castor::exception::Exception);
}; // class RcpJobSubmitter
......
/******************************************************************************
* castor/tape/aggregator/RtcpAcknowledgeMessage.hpp
* castor/tape/aggregator/RtcpAcknowledgeMsgBody.hpp
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
......@@ -22,8 +22,8 @@
* @author Nicola.Bessone@cern.ch Steven.Murray@cern.ch
*****************************************************************************/
#ifndef CASTOR_TAPE_AGGREGATOR_RTCPACKNOWLEDGEMESSAGE
#define CASTOR_TAPE_AGGREGATOR_RTCPACKNOWLEDGEMESSAGE
#ifndef CASTOR_TAPE_AGGREGATOR_RTCPACKNOWLEDGEMSGBODY
#define CASTOR_TAPE_AGGREGATOR_RTCPACKNOWLEDGEMSGBODY
#include "h/Castor_limits.h"
......@@ -38,9 +38,9 @@ namespace aggregator {
/**
* An RTCP acknowledge message.
*/
struct RtcpAcknowledgeMessage {
struct RtcpAcknowledgeMsgBody {
uint32_t magic;
uint32_t reqtype;
uint32_t reqType;
uint32_t status;
};
...