Commit 7ab68ec3 authored by Steven Murray's avatar Steven Murray
Browse files

Moved castor::tape::aggregator::Net to castor::tape::net

parent 64fe5f11
......@@ -32,9 +32,15 @@
namespace castor {
namespace tape {
const size_t STRERRORBUFLEN = 256;
const size_t VMGRERRORBUFLEN = 512;
const char *const CLIENT_CONF = "CLIENT";
const char *const HIGHPORT_CONF = "HIGHPORT";
const int HIGH_CLIENT_PORT_RANGE = 30100;
const char *const LOWPORT_CONF = "LOWPORT";
const int LOW_CLIENT_PORT_RANGE = 30000;
const size_t RTCPDNETRWTIMEOUT = 5;
const size_t STRERRORBUFLEN = 256;
const size_t VMGRERRORBUFLEN = 512;
} // namespace tape
} // namespace castor
......
......@@ -31,10 +31,10 @@
#include "castor/tape/aggregator/Constants.hpp"
#include "castor/tape/aggregator/GatewayTxRx.hpp"
#include "castor/tape/aggregator/MessageHeader.hpp"
#include "castor/tape/aggregator/Net.hpp"
#include "castor/tape/aggregator/RtcpTxRx.hpp"
#include "castor/tape/aggregator/SmartFd.hpp"
#include "castor/tape/aggregator/SmartFdList.hpp"
#include "castor/tape/net/net.hpp"
#include "castor/tape/utils/utils.hpp"
#include "h/Ctape_constants.h"
#include "h/rtcp_constants.h"
......@@ -88,16 +88,16 @@ castor::tape::aggregator::BridgeProtocolEngine::BridgeProtocolEngine(
int castor::tape::aggregator::BridgeProtocolEngine::acceptRtcpdConnection()
throw(castor::exception::Exception) {
SmartFd connectedSocketFd(Net::acceptConnection(m_rtcpdCallbackSocketFd,
SmartFd connectedSocketFd(net::acceptConnection(m_rtcpdCallbackSocketFd,
RTCPDPINGTIMEOUT));
try {
unsigned short port = 0; // Client port
unsigned long ip = 0; // Client IP
char hostName[HOSTNAMEBUFLEN];
char hostName[net::HOSTNAMEBUFLEN];
Net::getPeerIpPort(connectedSocketFd.get(), ip, port);
Net::getPeerHostName(connectedSocketFd.get(), hostName);
net::getPeerIpPort(connectedSocketFd.get(), ip, port);
net::getPeerHostName(connectedSocketFd.get(), hostName);
m_nbCallbackConnections++;
......
......@@ -34,19 +34,16 @@ namespace castor {
namespace tape {
namespace aggregator {
const size_t HDRBUFSIZ = 3 * sizeof(uint32_t);
const size_t HOSTNAMEBUFLEN = 256;
const int LISTENBACKLOG = 2;
const int MAXINITMIGFILES = 2;
const uint32_t MIGRATEUMASK = 022;
const size_t MSGBUFSIZ = 1024;
const char *const AGGREGATORPROGRAMNAME = "aggregatord";
const uint32_t RECALLUMASK = 077;
const char *const RECORDFORMAT = "F";
const int RTCPDNETRWTIMEOUT = 5;
const int RTCPDCALLBACKTIMEOUT = 5;
const int RTCPDPINGTIMEOUT = 10;
const size_t SERVICENAMEBUFLEN = 256;
const size_t HDRBUFSIZ = 3 * sizeof(uint32_t);
const int MAXINITMIGFILES = 2;
const uint32_t MIGRATEUMASK = 022;
const size_t MSGBUFSIZ = 1024;
const char *const AGGREGATORPROGRAMNAME = "aggregatord";
const uint32_t RECALLUMASK = 077;
const char *const RECORDFORMAT = "F";
const int RTCPDNETRWTIMEOUT = 5;
const int RTCPDCALLBACKTIMEOUT = 5;
const int RTCPDPINGTIMEOUT = 10;
} // namespace aggregator
} // namespace tape
......
......@@ -29,13 +29,13 @@
#include "castor/tape/aggregator/DriveAllocationProtocolEngine.hpp"
#include "castor/tape/aggregator/GatewayTxRx.hpp"
#include "castor/tape/aggregator/Marshaller.hpp"
#include "castor/tape/aggregator/Net.hpp"
#include "castor/tape/aggregator/RcpJobReplyMsgBody.hpp"
#include "castor/tape/aggregator/RcpJobRqstMsgBody.hpp"
#include "castor/tape/aggregator/RcpJobSubmitter.hpp"
#include "castor/tape/aggregator/RtcpTxRx.hpp"
#include "castor/tape/utils/utils.hpp"
#include "castor/tape/fsm/Callback.hpp"
#include "castor/tape/net/net.hpp"
#include "castor/tape/utils/utils.hpp"
#include "h/Ctape_constants.h"
#include "h/rtcp_constants.h"
#include "h/vdqm_constants.h"
......@@ -155,7 +155,7 @@ bool castor::tape::aggregator::DriveAllocationProtocolEngine::run(
size_t vdqmReplyLen = 0;
vdqmReplyLen = Marshaller::marshallRcpJobReplyMsgBody(vdqmReplyBuf,
rtcpdReply);
Net::writeBytes(vdqmSocket.socket(), RTCPDNETRWTIMEOUT, vdqmReplyLen,
net::writeBytes(vdqmSocket.socket(), RTCPDNETRWTIMEOUT, vdqmReplyLen,
vdqmReplyBuf);
// Close the connection to the VDQM
......@@ -173,17 +173,17 @@ bool castor::tape::aggregator::DriveAllocationProtocolEngine::run(
// Accept the initial incoming RTCPD callback connection.
// Wrap the socket file descriptor in a smart file descriptor so that it is
// guaranteed to be closed when it goes out of scope.
rtcpdInitialSocketFd.reset(Net::acceptConnection(rtcpdCallbackSocketFd,
rtcpdInitialSocketFd.reset(net::acceptConnection(rtcpdCallbackSocketFd,
RTCPDCALLBACKTIMEOUT));
// Log the connection
try {
unsigned short port = 0; // Client port
unsigned long ip = 0; // Client IP
char hostName[HOSTNAMEBUFLEN];
char hostName[net::HOSTNAMEBUFLEN];
Net::getPeerIpPort(rtcpdInitialSocketFd.get(), ip, port);
Net::getPeerHostName(rtcpdInitialSocketFd.get(), hostName);
net::getPeerIpPort(rtcpdInitialSocketFd.get(), ip, port);
net::getPeerHostName(rtcpdInitialSocketFd.get(), hostName);
castor::dlf::Param params[] = {
castor::dlf::Param("volReqId", volReqId),
......
......@@ -75,7 +75,6 @@ AGGREGATORBIN_SRCS = \
DriveAllocationProtocolEngine.cpp \
GatewayTxRx.cpp \
Marshaller.cpp \
Net.cpp \
Packer.cpp \
RcpJobSubmitter.cpp \
RtcpTxRx.cpp \
......@@ -83,8 +82,9 @@ AGGREGATORBIN_SRCS = \
SmartFdList.cpp \
SynchronizedCounter.cpp \
Unpacker.cpp \
../utils/utils.cpp \
VdqmRequestHandler.cpp \
../net/net.cpp \
../utils/utils.cpp \
$(TAPEGATEWAY_MESSAGES_SRCS) \
$(TAPEGATEWAY_IO_SRCS)
AGGREGATORBIN_OBJS = $(AGGREGATORBIN_SRCS:.cpp=.Osuf)
......
/******************************************************************************
* Net.hpp
*
* 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 Nicola.Bessone@cern.ch Steven.Murray@cern.ch
*****************************************************************************/
#ifndef CASTOR_TAPE_AGGREGATOR_NET_HPP
#define CASTOR_TAPE_AGGREGATOR_NET_HPP 1
#include "castor/exception/Exception.hpp"
#include <errno.h>
#include <string.h>
#include <iostream>
namespace castor {
namespace tape {
namespace aggregator {
/**
* Class of static network utility functions.
*/
class Net {
public:
/**
* Creates a listener socket including, creation, binding and marking as a
* listener socket.
*
* @param addr The IP address in dotted quad notation to be used by
* inet_addr().
* @param port The port number to listen on or 0 if one should be allocated.
* @return The socket file descriptor.
*/
static int createListenerSocket(const char *addr,
const unsigned short port) throw(castor::exception::Exception);
/**
* Accepts a connection on the specified listener socket and returns the
* socket file descriptor of the newly created connected soket.
*
* @param listenSocketFd The file descriptor of the listener socket.
*/
static int acceptConnection(const int listenSocketFd)
throw(castor::exception::Exception);
/**
* Accepts a connection on the specified listener socket and returns the
* socket file descriptor of the newly created connected soket.
*
* @param listenSocketFd The file descriptor of the listener socket.
* @param netReadWriteTimeout The timeout to be used when performing
* network reads and writes. Accepting a connection is classed a network
* read operation in the case of this function.
*/
static int acceptConnection(const int listenSocketFd,
const int netReadWriteTimeout) throw(castor::exception::Exception);
/**
* Gets the locally-bound IP and port number of the specified socket.
*
* @param socketFd The socket file descriptor.
* @param ip The IP to be filled.
* @param port The port to be filled.
*/
static void getSocketIpPort(const int socketFd, unsigned long& ip,
unsigned short& port) throw(castor::exception::Exception);
/**
* Gets the peer IP and port number of the specified socket.
*
* @param socketFd The socket file descriptor.
* @param ip The IP to be filled.
* @param port The port to be filled.
*/
static void getPeerIpPort(const int socketFd, unsigned long& ip,
unsigned short& port) throw(castor::exception::Exception);
/**
* Gets the locally-bound host name of the specified socket.
*
* @param socketFd The socket file descriptor.
* @param buf The buffer into which the hostname should written to.
* @param len The length of the buffer into which the host name should be
* written to.
*/
static void getSocketHostName(const int socketFd, char *buf, size_t len)
throw(castor::exception::Exception);
/**
* Gets the locally-bound host name of the specified socket.
*
* @param socketFd The socket file descriptor.
* @param buf The buffer into which the hostname should written to.
*/
template<int n> static void getSocketHostName(const int socketFd,
char (&buf)[n]) throw(castor::exception::Exception) {
getSocketHostName(socketFd, buf, n);
}
/**
* Gets the locally-bound IP, host name and port of the specified socket.
*
* @param socketFd The socket file descriptor.
* @param ip The IP to be filled.
* @param hostName The buffer into which the hostname should written to.
* @param hostNameLen The length of the buffer into which the host name
* should be written to.
* @param port The port to be filled.
* written to.
*/
static void getSocketIpHostnamePort(const int socketFd,
unsigned long& ip, char *hostName, size_t hostNameLen,
unsigned short& port) throw(castor::exception::Exception);
/**
* Gets the locally-bound IP, host name and port of the specified socket.
*
* @param socketFd The socket file descriptor.
* @param ip The IP to be filled.
* @param hostName The buffer into which the hostname should written to.
* @param port The port to be filled.
* written to.
*/
template<int n> static void getSocketIpHostnamePort(const int socketFd,
unsigned long& ip, char (&hostName)[n], unsigned short& port)
throw(castor::exception::Exception) {
getSocketIpHostnamePort(socketFd, ip, hostName, n, port);
}
/**
* Gets the peer host name of the specified connection.
*
* @param socketFd The socket file descriptor of the connection.
* @param buf The buffer into which the hostname should written to.
* @param len The length of the buffer into which the host name should be
* written to.
*/
static void getPeerHostName(const int socketFd, char *buf, size_t len)
throw(castor::exception::Exception);
/**
* Gets the peer host name of the specified connection.
*
* @param socketFd The socket file descriptor of the connection.
* @param buf The buffer into which the hostname should written to.
*/
template<int n> static void getPeerHostName(const int socketFd,
char (&buf)[n]) throw(castor::exception::Exception) {
getPeerHostName(socketFd, buf, n);
}
/**
* Prints the string form of specified IP using the specified output
* stream.
*
* @param os The output stream.
* @param ip The IP address in host byte order.
*/
static void printIp(std::ostream &os, const unsigned long ip) throw();
/**
* Prints a textual description of the specified socket to the specified
* output stream.
*
* @param os The output stream to which the string is to be printed.
* @param socketFd The file descriptor of the socket whose textual
* description is to be printed to the stream.
*/
static void printSocketDescription(std::ostream &os, const int socketFd)
throw();
/**
* Reads the specified number of bytes from the specified socket and writes
* the result into the specified buffer.
*
* This operation assumes that all of the bytes can be read in. Failure
* to read in all the bytes or a closed connection will result in an
* exception being thrown.
*
* If it is normal that the connection can be closed by the peer, for
* example you are using select, then please use
* readBytesFromCloseable().
*
* @param socketFd The file descriptor of the socket to be read from.
* @param netReadWriteTimeout The timeout to be used when performing
* network reads and writes.
* @param nbBytes The number of bytes to be read.
* @param buf The buffer into which the bytes will be written.
*/
static void readBytes(const int socketFd, const int netReadWriteTimeout,
const int nbBytes, char *buf) throw(castor::exception::Exception);
/**
* Reads the specified number of bytes from the specified closable socket
* and writes the result into the specified buffer.
*
* @param connClosed Output parameter: True if the connection was closed
* by the peer.
* @param socketFd The file descriptor of the socket to be read from.
* @param netReadWriteTimeout The timeout to be used when performing
* network reads and writes.
* @param nbBytes The number of bytes to be read.
* @param buf The buffer into which the bytes will be written.
*/
static void readBytesFromCloseable(bool &connClosed, const int socketFd,
const int netReadWriteTimeout, const int nbBytes, char *buf)
throw(castor::exception::Exception);
/**
* Writes the specified number of bytes from the specified buffer to the
* specified socket.
*
* @param socketFd The file descriptor of the socket to be written to
* @param netReadWriteTimeout The timeout to be used when performing
* network reads and writes.
* @param nbBytes The number of bytes to be written.
* @param buf The buffer of bytes to be written to the socket.
*/
static void writeBytes(const int socketFd, const int netReadWriteTimeout,
const int nbBytes, char *const buf) throw(castor::exception::Exception);
private:
/**
* Private constructor to inhibit instances of this class from being
* instantiated.
*/
Net() {}
}; // class Net
} // namespace aggregator
} // namespace tape
} // namespace castor
#endif // CASTOR_TAPE_AGGREGATOR_NET_HPP
......@@ -28,10 +28,10 @@
#include "castor/io/ClientSocket.hpp"
#include "castor/tape/aggregator/Constants.hpp"
#include "castor/tape/aggregator/Marshaller.hpp"
#include "castor/tape/aggregator/Net.hpp"
#include "castor/tape/aggregator/RcpJobRqstMsgBody.hpp"
#include "castor/tape/aggregator/RcpJobReplyMsgBody.hpp"
#include "castor/tape/aggregator/RcpJobSubmitter.hpp"
#include "castor/tape/net/net.hpp"
#include "castor/tape/utils/utils.hpp"
#include "h/net.h"
#include "h/osdep.h"
......@@ -132,7 +132,7 @@ void castor::tape::aggregator::RcpJobSubmitter::submit(
// Send the job submission request message to the RTCPD or tape aggregator
// daemon
try {
Net::writeBytes(socket.socket(), netReadWriteTimeout, totalLen, buf);
net::writeBytes(socket.socket(), netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send the job submission request message to " <<
......@@ -156,7 +156,7 @@ void castor::tape::aggregator::RcpJobSubmitter::readReply(
// Read in the message header
char headerBuf[3 * sizeof(uint32_t)]; // magic + request type + len
try {
Net::readBytes(socket.socket(), RTCPDNETRWTIMEOUT, sizeof(headerBuf),
net::readBytes(socket.socket(), RTCPDNETRWTIMEOUT, sizeof(headerBuf),
headerBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
......@@ -220,7 +220,7 @@ void castor::tape::aggregator::RcpJobSubmitter::readReply(
// Read the message body
try {
Net::readBytes(socket.socket(), RTCPDNETRWTIMEOUT, header.lenOrStatus,
net::readBytes(socket.socket(), RTCPDNETRWTIMEOUT, header.lenOrStatus,
bodyBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
......
......@@ -28,14 +28,14 @@
#include "castor/tape/aggregator/AggregatorDlfMessageConstants.hpp"
#include "castor/tape/aggregator/Constants.hpp"
#include "castor/tape/aggregator/Marshaller.hpp"
#include "castor/tape/aggregator/Net.hpp"
#include "castor/tape/aggregator/RtcpTxRx.hpp"
#include "castor/tape/aggregator/RcpJobSubmitter.hpp"
#include "castor/tape/utils/utils.hpp"
#include "castor/tape/net/net.hpp"
#include "castor/tape/tapegateway/ErrorReport.hpp"
#include "castor/tape/tapegateway/FileToMigrate.hpp"
#include "castor/tape/tapegateway/FileToMigrateRequest.hpp"
#include "castor/tape/tapegateway/NoMoreFiles.hpp"
#include "castor/tape/utils/utils.hpp"
#include "h/common.h"
#include "h/Ctape_constants.h"
#include "h/rtcp.h"
......@@ -80,7 +80,7 @@ void castor::tape::aggregator::RtcpTxRx::getRequestInfoFromRtcpd(
// Send the request
try {
Net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send request for volume request ID to RTCPD: "
......@@ -176,7 +176,7 @@ void castor::tape::aggregator::RtcpTxRx::giveVolumeToRtcpd(
// Send the message
try {
Net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send volume message to RTCPD: "
......@@ -256,7 +256,7 @@ void castor::tape::aggregator::RtcpTxRx::giveFileToRtcpd(
// Send the message
try {
Net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send file message to RTCPD: "
......@@ -328,7 +328,7 @@ void castor::tape::aggregator::RtcpTxRx::sendMessageHeader(
}
try {
Net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send the RCP acknowledge message to RTCPD"
......@@ -380,7 +380,7 @@ void castor::tape::aggregator::RtcpTxRx::pingRtcpd(const Cuuid_t &cuuid,
}
try {
Net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send the RCPD ping message to RTCPD"
......@@ -426,7 +426,7 @@ void castor::tape::aggregator::RtcpTxRx::tellRtcpdEndOfFileList(
// Send the message
try {
Net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send file message to RTCPD: "
......@@ -512,7 +512,7 @@ void castor::tape::aggregator::RtcpTxRx::tellRtcpdToAbort(const Cuuid_t &cuuid,
// Send the message
try {
Net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send abort message to RTCPD: "
......@@ -566,7 +566,7 @@ void castor::tape::aggregator::RtcpTxRx::receiveRcpJobRqst(const Cuuid_t &cuuid,
// Read in the message header
char headerBuf[3 * sizeof(uint32_t)]; // magic + request type + len
try {
Net::readBytes(socketFd, RTCPDNETRWTIMEOUT, sizeof(headerBuf), headerBuf);
net::readBytes(socketFd, RTCPDNETRWTIMEOUT, sizeof(headerBuf), headerBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to read message header from RCP job submitter"
......@@ -614,7 +614,7 @@ void castor::tape::aggregator::RtcpTxRx::receiveRcpJobRqst(const Cuuid_t &cuuid,
// Read the message body
try {
Net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(EIO,
": Failed to read message body from RCP job submitter"
......@@ -707,7 +707,7 @@ void castor::tape::aggregator::RtcpTxRx::askRtcpdToRequestMoreWork(
// Send the message
try {
Net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
net::writeBytes(socketFd, netReadWriteTimeout, totalLen, buf);
} catch(castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to send ask RTCPD to request more "
......@@ -815,7 +815,7 @@ void castor::tape::aggregator::RtcpTxRx::receiveMessageHeader(
// Read in the message header
char headerBuf[3 * sizeof(uint32_t)]; // magic + request type + len
try {
Net::readBytes(socketFd, RTCPDNETRWTIMEOUT, sizeof(headerBuf), headerBuf);
net::readBytes(socketFd, RTCPDNETRWTIMEOUT, sizeof(headerBuf), headerBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
": Failed to read message header from RTCPD"
......@@ -846,7 +846,7 @@ void castor::tape::aggregator::RtcpTxRx::receiveMessageHeaderFromCloseable(
// Read in the message header
char headerBuf[3 * sizeof(uint32_t)]; // magic + request type + len
try {
Net::readBytesFromCloseable(connClosed, socketFd, RTCPDNETRWTIMEOUT,
net::readBytesFromCloseable(connClosed, socketFd, RTCPDNETRWTIMEOUT,
sizeof(headerBuf), headerBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(SECOMERR,
......@@ -900,7 +900,7 @@ void castor::tape::aggregator::RtcpTxRx::receiveRtcpFileRqstErrBody(
// Read the message body
try {
Net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(EIO,
": Failed to read message body from RTCPD"
......@@ -967,7 +967,7 @@ void castor::tape::aggregator::RtcpTxRx::receiveRtcpFileRqstBody(
// Read the message body
try {
Net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(EIO,
": Failed to read message body from RTCPD"
......@@ -1034,7 +1034,7 @@ void castor::tape::aggregator::RtcpTxRx::receiveRtcpTapeRqstErrBody(
// Read the message body
try {
Net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(EIO,
": Failed to read message body from RTCPD"
......@@ -1096,7 +1096,7 @@ void castor::tape::aggregator::RtcpTxRx::receiveRtcpTapeRqstBody(
// Read the message body
try {
Net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
net::readBytes(socketFd, RTCPDNETRWTIMEOUT, header.lenOrStatus, bodyBuf);
} catch (castor::exception::Exception &ex) {
TAPE_THROW_CODE(EIO,
": Failed to read message body from RTCPD"
......
......@@ -31,7 +31,6 @@
#include "castor/tape/aggregator/DriveAllocationProtocolEngine.hpp"
#include "castor/tape/aggregator/GatewayTxRx.hpp"
#include "castor/tape/aggregator/Marshaller.hpp"
#include "castor/tape/aggregator/Net.hpp"
#include "castor/tape/aggregator/Packer.hpp"
#include "castor/tape/aggregator/RcpJobSubmitter.hpp"
#include "castor/tape/aggregator/Unpacker.hpp"
......@@ -40,11 +39,12 @@
#include "castor/tape/aggregator/SmartFd.hpp"
#include "castor/tape/aggregator/SmartFdList.hpp"
#include "castor/tape/aggregator/RtcpTxRx.hpp"
#include "castor/tape/utils/utils.hpp"
#include "castor/tape/aggregator/VdqmRequestHandler.hpp"