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( ...@@ -261,7 +261,7 @@ size_t castor::tape::aggregator::Marshaller::marshallMessageHeader(
} }
// Calculate the length of the message header // 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 // Check that the message header buffer is big enough
if(totalLen > dstLen) { if(totalLen > dstLen) {
...@@ -277,7 +277,7 @@ size_t castor::tape::aggregator::Marshaller::marshallMessageHeader( ...@@ -277,7 +277,7 @@ size_t castor::tape::aggregator::Marshaller::marshallMessageHeader(
// Marshall the message header // Marshall the message header
char *p = dst; char *p = dst;
marshallUint32(src.magic , p); marshallUint32(src.magic , p);
marshallUint32(src.reqtype, p); marshallUint32(src.reqType, p);
marshallUint32(src.len , p); marshallUint32(src.len , p);
// Calculate the number of bytes actually marshalled // Calculate the number of bytes actually marshalled
...@@ -308,16 +308,16 @@ void castor::tape::aggregator::Marshaller::unmarshallMessageHeader( ...@@ -308,16 +308,16 @@ void castor::tape::aggregator::Marshaller::unmarshallMessageHeader(
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
unmarshallUint32(src, srcLen, dst.magic); unmarshallUint32(src, srcLen, dst.magic);
unmarshallUint32(src, srcLen, dst.reqtype); unmarshallUint32(src, srcLen, dst.reqType);
unmarshallUint32(src, srcLen, dst.len); unmarshallUint32(src, srcLen, dst.len);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// marshallRcpJobRequestMessage // marshallRcpJobRequestMsgBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMessage( size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMsgBody(
char *const dst, const size_t dstLen, const RcpJobRequestMessage &src) char *const dst, const size_t dstLen, const RcpJobRequestMsgBody &src)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
if(dst == NULL) { if(dst == NULL) {
...@@ -338,7 +338,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMessage( ...@@ -338,7 +338,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMessage(
4; // 4 = the number of string termination characters 4; // 4 = the number of string termination characters
// Calculate the total length of the message (header + body) // 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; const size_t totalLen = 3 * sizeof(uint32_t) + len;
// Check that the message buffer is big enough // Check that the message buffer is big enough
...@@ -389,10 +389,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMessage( ...@@ -389,10 +389,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobRequestMessage(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// unmarshallRcpJobRequestMessageBody // unmarshallRcpJobRequestMsgBodyBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRcpJobRequestMessageBody( void castor::tape::aggregator::Marshaller::unmarshallRcpJobRequestMsgBodyBody(
const char * &src, size_t &srcLen, RcpJobRequestMessage &dst) const char * &src, size_t &srcLen, RcpJobRequestMsgBody &dst)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
unmarshallUint32(src, srcLen, dst.tapeRequestId); unmarshallUint32(src, srcLen, dst.tapeRequestId);
...@@ -407,10 +407,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRcpJobRequestMessageBody( ...@@ -407,10 +407,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRcpJobRequestMessageBody(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// marshallRcpJobReplyMessage // marshallRcpJobReplyMsgBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMessage( size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMsgBody(
char *const dst, const size_t dstLen, const RcpJobReplyMessage &src) char *const dst, const size_t dstLen, const RcpJobReplyMsgBody &src)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
if(dst == NULL) { if(dst == NULL) {
...@@ -437,7 +437,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMessage( ...@@ -437,7 +437,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMessage(
// Calculate the length of the error message to be sent taking into account // 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 // the fact that the error message should be right trimmed if it is too large
// to fit in the destination buffer. // 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 // free space = total - header - status - terminating null character
const size_t freeSpace = dstLen - headerLen - sizeof(uint32_t) - 1; const size_t freeSpace = dstLen - headerLen - sizeof(uint32_t) - 1;
const size_t errLenToSend = strlen(src.errorMessage) < freeSpace ? const size_t errLenToSend = strlen(src.errorMessage) < freeSpace ?
...@@ -481,10 +481,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMessage( ...@@ -481,10 +481,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRcpJobReplyMessage(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// unmarshallRcpJobReplyMessageBody // unmarshallRcpJobReplyMsgBodyBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRcpJobReplyMessageBody( void castor::tape::aggregator::Marshaller::unmarshallRcpJobReplyMsgBodyBody(
const char * &src, size_t &srcLen, RcpJobReplyMessage &dst) const char * &src, size_t &srcLen, RcpJobReplyMsgBody &dst)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
// Unmarshall the status number // Unmarshall the status number
...@@ -508,10 +508,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRcpJobReplyMessageBody( ...@@ -508,10 +508,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRcpJobReplyMessageBody(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// marshallRtcpTapeRequestMessage // marshallRtcpTapeRequestMsgBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMessage( size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMsgBody(
char *dst, const size_t dstLen, const RtcpTapeRequestMessage &src) char *dst, const size_t dstLen, const RtcpTapeRequestMsgBody &src)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
// Calculate the length of the message body // Calculate the length of the message body
...@@ -529,7 +529,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMessage( ...@@ -529,7 +529,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMessage(
7; // 7 = number of null terminator characters 7; // 7 = number of null terminator characters
// Calculate the total length of the message (header + body) // 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; const size_t totalLen = 3 * sizeof(uint32_t) + len;
// Check that the message buffer is big enough // Check that the message buffer is big enough
...@@ -606,10 +606,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMessage( ...@@ -606,10 +606,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpTapeRequestMessage(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// unmarshallRtcpTapeRequestMessageBody // unmarshallRtcpTapeRequestMsgBodyBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRtcpTapeRequestMessageBody( void castor::tape::aggregator::Marshaller::unmarshallRtcpTapeRequestMsgBodyBody(
const char * &src, size_t &srcLen, RtcpTapeRequestMessage &dst) const char * &src, size_t &srcLen, RtcpTapeRequestMsgBody &dst)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
unmarshallString(src, srcLen, dst.vid); unmarshallString(src, srcLen, dst.vid);
...@@ -652,10 +652,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRtcpTapeRequestMessageBody( ...@@ -652,10 +652,10 @@ void castor::tape::aggregator::Marshaller::unmarshallRtcpTapeRequestMessageBody(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// marshallRtcpAcknowledgeMessage // marshallRtcpAcknowledgeMsgBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage( size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMsgBody(
char *const dst, const size_t dstLen, const RtcpAcknowledgeMessage &src) char *const dst, const size_t dstLen, const RtcpAcknowledgeMsgBody &src)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
castor::exception::Internal ie; castor::exception::Internal ie;
...@@ -669,7 +669,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage( ...@@ -669,7 +669,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage(
// Calculate the total length of the message (there is no separate header and // Calculate the total length of the message (there is no separate header and
// body) // 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 // Check that the message buffer is big enough
if(totalLen > dstLen) { if(totalLen > dstLen) {
...@@ -686,7 +686,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage( ...@@ -686,7 +686,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage(
// Marshall the message // Marshall the message
char *p = dst; char *p = dst;
marshallUint32(src.magic , p); marshallUint32(src.magic , p);
marshallUint32(src.reqtype, p); marshallUint32(src.reqType, p);
marshallUint32(src.status , p); marshallUint32(src.status , p);
// Calculate the number of bytes actually marshalled // Calculate the number of bytes actually marshalled
...@@ -711,23 +711,23 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage( ...@@ -711,23 +711,23 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpAcknowledgeMessage(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// unmarshallRtcpAcknowledgeMessageBody // unmarshallRtcpAcknowledgeMsgBodyBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRtcpAcknowledgeMessageBody( void castor::tape::aggregator::Marshaller::unmarshallRtcpAcknowledgeMsgBodyBody(
const char * &src, size_t &srcLen, RtcpAcknowledgeMessage &dst) const char * &src, size_t &srcLen, RtcpAcknowledgeMsgBody &dst)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
unmarshallUint32(src, srcLen, dst.magic); unmarshallUint32(src, srcLen, dst.magic);
unmarshallUint32(src, srcLen, dst.reqtype); unmarshallUint32(src, srcLen, dst.reqType);
unmarshallUint32(src, srcLen, dst.status); unmarshallUint32(src, srcLen, dst.status);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// marshallRtcpFileRequestMessage // marshallRtcpFileRequestMsgBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMessage( size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMsgBody(
char *dst, const size_t dstLen, const RtcpFileRequestMessage &src) char *dst, const size_t dstLen, const RtcpFileRequestMsgBody &src)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
// Calculate the length of the message body // Calculate the length of the message body
...@@ -760,7 +760,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMessage( ...@@ -760,7 +760,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMessage(
1; // err.errmsgtxt string terminator 1; // err.errmsgtxt string terminator
// Calculate the total length of the message (header + body) // 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; const size_t totalLen = 3 * sizeof(uint32_t) + len;
// Check that the message buffer is big enough // Check that the message buffer is big enough
...@@ -864,10 +864,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMessage( ...@@ -864,10 +864,10 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpFileRequestMessage(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// unmarshallRtcpFileRequestMessageBody // unmarshallRtcpFileRequestMsgBodyBody
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void castor::tape::aggregator::Marshaller::unmarshallRtcpFileRequestMessageBody( void castor::tape::aggregator::Marshaller::unmarshallRtcpFileRequestMsgBodyBody(
const char * &src, size_t &srcLen, RtcpFileRequestMessage &dst) const char * &src, size_t &srcLen, RtcpFileRequestMsgBody &dst)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
unmarshallString(src, srcLen, dst.filePath); unmarshallString(src, srcLen, dst.filePath);
...@@ -946,7 +946,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpNoMoreRequestsMessage( ...@@ -946,7 +946,7 @@ size_t castor::tape::aggregator::Marshaller::marshallRtcpNoMoreRequestsMessage(
const uint32_t len = 0; const uint32_t len = 0;
// Calculate the total length of the message (header + body) // 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; const size_t totalLen = 3 * sizeof(uint32_t) + len;
// Check that the message buffer is big enough // Check that the message buffer is big enough
......
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
#include "castor/exception/Exception.hpp" #include "castor/exception/Exception.hpp"
#include "castor/tape/aggregator/MessageHeader.hpp" #include "castor/tape/aggregator/MessageHeader.hpp"
#include "castor/tape/aggregator/RcpJobReplyMessage.hpp" #include "castor/tape/aggregator/RcpJobReplyMsgBody.hpp"
#include "castor/tape/aggregator/RcpJobRequestMessage.hpp" #include "castor/tape/aggregator/RcpJobRequestMsgBody.hpp"
#include "castor/tape/aggregator/RtcpAcknowledgeMessage.hpp" #include "castor/tape/aggregator/RtcpAcknowledgeMsgBody.hpp"
#include "castor/tape/aggregator/RtcpFileRequestMessage.hpp" #include "castor/tape/aggregator/RtcpFileRequestMsgBody.hpp"
#include "castor/tape/aggregator/RtcpTapeRequestMessage.hpp" #include "castor/tape/aggregator/RtcpTapeRequestMsgBody.hpp"
#include <errno.h> #include <errno.h>
#include <stdint.h> #include <stdint.h>
...@@ -315,8 +315,8 @@ namespace aggregator { ...@@ -315,8 +315,8 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
static size_t marshallRcpJobRequestMessage(char *const dst, static size_t marshallRcpJobRequestMsgBody(char *const dst,
const size_t dstLen, const RcpJobRequestMessage &src) const size_t dstLen, const RcpJobRequestMsgBody &src)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -327,9 +327,9 @@ namespace aggregator { ...@@ -327,9 +327,9 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
template<int n> static size_t marshallRcpJobRequestMessage(char (&dst)[n], template<int n> static size_t marshallRcpJobRequestMsgBody(char (&dst)[n],
const RcpJobRequestMessage &src) throw(castor::exception::Exception) { const RcpJobRequestMsgBody &src) throw(castor::exception::Exception) {
return marshallRcpJobRequestMessage(dst, n, src); return marshallRcpJobRequestMsgBody(dst, n, src);
} }
/** /**
...@@ -346,8 +346,8 @@ namespace aggregator { ...@@ -346,8 +346,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer. * return is the number of bytes remaining in the source buffer.
* @param dst The destination request structure. * @param dst The destination request structure.
*/ */
static void unmarshallRcpJobRequestMessageBody(const char * &src, static void unmarshallRcpJobRequestMsgBodyBody(const char * &src,
size_t &srcLen, RcpJobRequestMessage &dst) size_t &srcLen, RcpJobRequestMsgBody &dst)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -359,8 +359,8 @@ namespace aggregator { ...@@ -359,8 +359,8 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
static size_t marshallRcpJobReplyMessage(char *const dst, static size_t marshallRcpJobReplyMsgBody(char *const dst,
const size_t dstLen, const RcpJobReplyMessage &src) const size_t dstLen, const RcpJobReplyMsgBody &src)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -371,9 +371,9 @@ namespace aggregator { ...@@ -371,9 +371,9 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
template<int n> static size_t marshallRcpJobReplyMessage(char (&dst)[n], template<int n> static size_t marshallRcpJobReplyMsgBody(char (&dst)[n],
const RcpJobReplyMessage &src) throw(castor::exception::Exception) { const RcpJobReplyMsgBody &src) throw(castor::exception::Exception) {
return marshallRcpJobReplyMessage(dst, n, src); return marshallRcpJobReplyMsgBody(dst, n, src);
} }
/** /**
...@@ -389,8 +389,8 @@ namespace aggregator { ...@@ -389,8 +389,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer. * return is the number of bytes remaining in the source buffer.
* @param dst The destination reply structure. * @param dst The destination reply structure.
*/ */
static void unmarshallRcpJobReplyMessageBody(const char * &src, static void unmarshallRcpJobReplyMsgBodyBody(const char * &src,
size_t &srcLen, RcpJobReplyMessage &dst) size_t &srcLen, RcpJobReplyMsgBody &dst)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -402,8 +402,8 @@ namespace aggregator { ...@@ -402,8 +402,8 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
static size_t marshallRtcpTapeRequestMessage(char *const dst, static size_t marshallRtcpTapeRequestMsgBody(char *const dst,
const size_t dstLen, const RtcpTapeRequestMessage &src) const size_t dstLen, const RtcpTapeRequestMsgBody &src)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -414,10 +414,10 @@ namespace aggregator { ...@@ -414,10 +414,10 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
template<int n> static size_t marshallRtcpTapeRequestMessage( template<int n> static size_t marshallRtcpTapeRequestMsgBody(
char (&dst)[n], const RtcpTapeRequestMessage &src) char (&dst)[n], const RtcpTapeRequestMsgBody &src)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
return marshallRtcpTapeRequestMessage(dst, n, src); return marshallRtcpTapeRequestMsgBody(dst, n, src);
} }
/** /**
...@@ -433,8 +433,8 @@ namespace aggregator { ...@@ -433,8 +433,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer. * return is the number of bytes remaining in the source buffer.
* @param dst The destination request structure. * @param dst The destination request structure.
*/ */
static void unmarshallRtcpTapeRequestMessageBody(const char * &src, static void unmarshallRtcpTapeRequestMsgBodyBody(const char * &src,
size_t &srcLen, RtcpTapeRequestMessage &dst) size_t &srcLen, RtcpTapeRequestMsgBody &dst)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -446,8 +446,8 @@ namespace aggregator { ...@@ -446,8 +446,8 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
static size_t marshallRtcpAcknowledgeMessage(char *const dst, static size_t marshallRtcpAcknowledgeMsgBody(char *const dst,
const size_t dstLen, const RtcpAcknowledgeMessage &src) const size_t dstLen, const RtcpAcknowledgeMsgBody &src)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -458,10 +458,10 @@ namespace aggregator { ...@@ -458,10 +458,10 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
template<int n> static size_t marshallRtcpAcknowledgeMessage( template<int n> static size_t marshallRtcpAcknowledgeMsgBody(
char (&dst)[n], const RtcpAcknowledgeMessage &src) char (&dst)[n], const RtcpAcknowledgeMsgBody &src)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
return marshallRtcpAcknowledgeMessage(dst, n, src); return marshallRtcpAcknowledgeMsgBody(dst, n, src);
} }
/** /**
...@@ -478,8 +478,8 @@ namespace aggregator { ...@@ -478,8 +478,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer. * return is the number of bytes remaining in the source buffer.
* @param dst The destination message structure. * @param dst The destination message structure.
*/ */
static void unmarshallRtcpAcknowledgeMessageBody(const char * &src, static void unmarshallRtcpAcknowledgeMsgBodyBody(const char * &src,
size_t &srcLen, RtcpAcknowledgeMessage &dst) size_t &srcLen, RtcpAcknowledgeMsgBody &dst)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -491,8 +491,8 @@ namespace aggregator { ...@@ -491,8 +491,8 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
static size_t marshallRtcpFileRequestMessage(char *const dst, static size_t marshallRtcpFileRequestMsgBody(char *const dst,
const size_t dstLen, const RtcpFileRequestMessage &src) const size_t dstLen, const RtcpFileRequestMsgBody &src)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
...@@ -503,10 +503,10 @@ namespace aggregator { ...@@ -503,10 +503,10 @@ namespace aggregator {
* @param src The source structure. * @param src The source structure.
* @return The total length of the message (header + body). * @return The total length of the message (header + body).
*/ */
template<int n> static size_t marshallRtcpFileRequestMessage( template<int n> static size_t marshallRtcpFileRequestMsgBody(
char (&dst)[n], const RtcpFileRequestMessage &src) char (&dst)[n], const RtcpFileRequestMsgBody &src)
throw(castor::exception::Exception) { throw(castor::exception::Exception) {
return marshallRtcpFileRequestMessage(dst, n, src); return marshallRtcpFileRequestMsgBody(dst, n, src);
} }
/** /**
...@@ -522,8 +522,8 @@ namespace aggregator { ...@@ -522,8 +522,8 @@ namespace aggregator {
* return is the number of bytes remaining in the source buffer. * return is the number of bytes remaining in the source buffer.
* @param dst The destination request structure. * @param dst The destination request structure.
*/ */
static void unmarshallRtcpFileRequestMessageBody(const char * &src, static void unmarshallRtcpFileRequestMsgBodyBody(const char * &src,
size_t &srcLen, RtcpFileRequestMessage &dst) size_t &srcLen, RtcpFileRequestMsgBody &dst)
throw(castor::exception::Exception); throw(castor::exception::Exception);
/** /**
......
...@@ -40,7 +40,7 @@ namespace aggregator { ...@@ -40,7 +40,7 @@ namespace aggregator {
*/ */
struct MessageHeader { struct MessageHeader {
uint32_t magic; uint32_t magic;
uint32_t reqtype; uint32_t reqType;
uint32_t len; uint32_t len;
}; };
......
...@@ -53,7 +53,7 @@ int castor::tape::aggregator::Net::createListenerSocket( ...@@ -53,7 +53,7 @@ int castor::tape::aggregator::Net::createListenerSocket(
throw ex; throw ex;
} }