summaryrefslogtreecommitdiffstats
path: root/net-mgmt/cflowd
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-08-30 05:21:45 +0000
committeredwin <edwin@FreeBSD.org>2003-08-30 05:21:45 +0000
commit7664e68e7a9d461d1762a6e25b2f92d476fd1ba0 (patch)
tree0a734bc765b2ae07bcbbe2abaec523781ed04e44 /net-mgmt/cflowd
parent707cb98c54de52b4c7a6659626af57bd5a9f5955 (diff)
downloadFreeBSD-ports-7664e68e7a9d461d1762a6e25b2f92d476fd1ba0.zip
FreeBSD-ports-7664e68e7a9d461d1762a6e25b2f92d476fd1ba0.tar.gz
Unbreak net/cflowd by adding "using namespace std" to several places
in the code. Informed maintainer. PR: ports/48382 (it all started with this one) Submtited by: Will Saxon <wills@housing.ufl.edu> and me
Diffstat (limited to 'net-mgmt/cflowd')
-rw-r--r--net-mgmt/cflowd/Makefile10
-rw-r--r--net-mgmt/cflowd/files/patch-apps::cflowdmux::CflowdRawFlowClientList.hh10
-rw-r--r--net-mgmt/cflowd/files/patch-classes::include::CflowdCisco.hh11
-rw-r--r--net-mgmt/cflowd/files/patch-classes::include::CflowdCollectorMap.hh10
-rw-r--r--net-mgmt/cflowd/files/patch-classes::include::CflowdFlowFilter.hh10
-rw-r--r--net-mgmt/cflowd/files/patch-classes::include::CflowdFlowPortList.hh10
-rw-r--r--net-mgmt/cflowd/files/patch-classes::include::CflowdRawFlowLogger.hh11
-rw-r--r--net-mgmt/cflowd/files/patch-classes::include::CflowdVersion.hh10
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdCisco.cc31
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdCiscoFlowEngine.cc19
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdCiscoMap.cc19
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdCollector.cc10
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdNextHopTable.cc31
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdPacketQueue.cc28
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdRawFlow.cc200
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdRawFlowConvertor.cc10
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::CflowdTosTable.cc28
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::FlowFilter.y10
-rw-r--r--net-mgmt/cflowd/files/patch-classes::src::Signal.cc10
19 files changed, 470 insertions, 8 deletions
diff --git a/net-mgmt/cflowd/Makefile b/net-mgmt/cflowd/Makefile
index 0537820..c75e4da 100644
--- a/net-mgmt/cflowd/Makefile
+++ b/net-mgmt/cflowd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cflowd
PORTVERSION= 2-1-b1
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= net
MASTER_SITES= ftp://ftp.caida.org/pub/cflowd/
DISTNAME= ${PORTNAME}-${PORTVERSION}
@@ -31,12 +31,6 @@ CONFIGURE_ARGS+=--enable-shared --with-artspp=${PREFIX}
MANL= cfdases.l cfdifmatrix.l cfdnets.l cfdnexthops.l \
cfdportmatrix.l cfdprotos.l cfdtos.l flowdump.l flowwatch.l
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 500113
-BROKEN= "Does not compile (bad C++ code)"
-.endif
-
.if !defined(CFLOWD_FLOWSCAN_PATCH)
pre-everything::
@${ECHO} "you can compile cflowd with patches for FlowScan by typing:"
@@ -47,4 +41,4 @@ post-install:
${INSTALL_SCRIPT} ${FILESDIR}/cflowd.sh \
${PREFIX}/etc/rc.d/cflowd-base.sh.sample
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-mgmt/cflowd/files/patch-apps::cflowdmux::CflowdRawFlowClientList.hh b/net-mgmt/cflowd/files/patch-apps::cflowdmux::CflowdRawFlowClientList.hh
new file mode 100644
index 0000000..0494485
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-apps::cflowdmux::CflowdRawFlowClientList.hh
@@ -0,0 +1,10 @@
+--- apps/cflowdmux/CflowdRawFlowClientList.hh.orig Fri Aug 29 22:10:51 2003
++++ apps/cflowdmux/CflowdRawFlowClientList.hh Fri Aug 29 22:11:03 2003
+@@ -51,6 +51,7 @@
+ #include "caida_t.h"
+ }
+
++using namespace std;
+ #include <list>
+
+ //---------------------------------------------------------------------------
diff --git a/net-mgmt/cflowd/files/patch-classes::include::CflowdCisco.hh b/net-mgmt/cflowd/files/patch-classes::include::CflowdCisco.hh
new file mode 100644
index 0000000..a3b7baf
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::include::CflowdCisco.hh
@@ -0,0 +1,11 @@
+--- classes/include/CflowdCisco.hh.orig Fri Aug 29 20:49:59 2003
++++ classes/include/CflowdCisco.hh Fri Aug 29 20:53:49 2003
+@@ -48,6 +48,8 @@
+ #include "caida_t.h"
+ }
+
++using namespace std;
++
+ #include "CflowdRawFlow.hh"
+ #include "CflowdRawFlowLogger.hh"
+ #include "CflowdCiscoFlowInterfaceMap.hh"
diff --git a/net-mgmt/cflowd/files/patch-classes::include::CflowdCollectorMap.hh b/net-mgmt/cflowd/files/patch-classes::include::CflowdCollectorMap.hh
new file mode 100644
index 0000000..81d2d1b
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::include::CflowdCollectorMap.hh
@@ -0,0 +1,10 @@
+--- classes/include/CflowdCollectorMap.hh.orig Fri Aug 29 21:48:40 2003
++++ classes/include/CflowdCollectorMap.hh Fri Aug 29 21:49:10 2003
+@@ -47,6 +47,7 @@
+ #include "caida_t.h"
+ }
+
++using namespace std;
+ #include <map>
+
+ #include "CflowdCollector.hh"
diff --git a/net-mgmt/cflowd/files/patch-classes::include::CflowdFlowFilter.hh b/net-mgmt/cflowd/files/patch-classes::include::CflowdFlowFilter.hh
new file mode 100644
index 0000000..73a5b12
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::include::CflowdFlowFilter.hh
@@ -0,0 +1,10 @@
+--- classes/include/CflowdFlowFilter.hh.orig Fri Aug 29 22:06:03 2003
++++ classes/include/CflowdFlowFilter.hh Fri Aug 29 22:06:16 2003
+@@ -42,6 +42,7 @@
+ #ifndef _CFLOWDFLOWFILTER_HH_
+ #define _CFLOWDFLOWFILTER_HH_
+
++using namespace std;
+ #include <string>
+ #include <vector>
+
diff --git a/net-mgmt/cflowd/files/patch-classes::include::CflowdFlowPortList.hh b/net-mgmt/cflowd/files/patch-classes::include::CflowdFlowPortList.hh
new file mode 100644
index 0000000..3015797
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::include::CflowdFlowPortList.hh
@@ -0,0 +1,10 @@
+--- classes/include/CflowdFlowPortList.hh.orig Fri Aug 29 21:50:14 2003
++++ classes/include/CflowdFlowPortList.hh Fri Aug 29 21:50:29 2003
+@@ -48,6 +48,7 @@
+ #include "caida_t.h"
+ }
+
++using namespace std;
+ #include <list>
+
+ //---------------------------------------------------------------------------
diff --git a/net-mgmt/cflowd/files/patch-classes::include::CflowdRawFlowLogger.hh b/net-mgmt/cflowd/files/patch-classes::include::CflowdRawFlowLogger.hh
new file mode 100644
index 0000000..d3e1118
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::include::CflowdRawFlowLogger.hh
@@ -0,0 +1,11 @@
+--- classes/include/CflowdRawFlowLogger.hh.orig Fri Aug 29 21:59:45 2003
++++ classes/include/CflowdRawFlowLogger.hh Fri Aug 29 22:00:04 2003
+@@ -42,6 +42,8 @@
+ #ifndef _CFLOWDRAWFLOWLOGGER_HH_
+ #define _CFLOWDRAWFLOWLOGGER_HH_
+
++using namespace std;
++
+ //---------------------------------------------------------------------------
+ // class CflowdRawFlowLogger
+ //---------------------------------------------------------------------------
diff --git a/net-mgmt/cflowd/files/patch-classes::include::CflowdVersion.hh b/net-mgmt/cflowd/files/patch-classes::include::CflowdVersion.hh
new file mode 100644
index 0000000..b5352ae
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::include::CflowdVersion.hh
@@ -0,0 +1,10 @@
+--- classes/include/CflowdVersion.hh.orig Fri Aug 29 22:04:44 2003
++++ classes/include/CflowdVersion.hh Fri Aug 29 22:04:56 2003
+@@ -42,6 +42,7 @@
+ #ifndef _CFLOWDVERSION_HH_
+ #define _CFLOWDVERSION_HH_
+
++using namespace std;
+ #include <string>
+
+ //---------------------------------------------------------------------------
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdCisco.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdCisco.cc
new file mode 100644
index 0000000..ea5de5c
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdCisco.cc
@@ -0,0 +1,31 @@
+--- classes/src/CflowdCisco.cc.orig Fri Aug 29 21:02:38 2003
++++ classes/src/CflowdCisco.cc Fri Aug 29 21:12:30 2003
+@@ -699,22 +699,22 @@
+ engineIter != this->FlowEngines().end(); engineIter++) {
+ for (uint8_t aggMethod = 0; aggMethod <= k_CiscoV8FlowExportMaxAggType;
+ aggMethod++) {
+- if ((*engineIter).second.MissedFlows(aggMethod) >
++ if ((*engineIter).second.MissedFlows((char)aggMethod) >
+ this->_missedFlowsThreshold) {
+ struct in_addr addrIn;
+ addrIn.s_addr = this->IpAddress();
+- uint64_t totalFlows = ((*engineIter).second.MissedFlows(aggMethod) +
+- (*engineIter).second.FlowsReceived(aggMethod));
++ uint64_t totalFlows = ((*engineIter).second.MissedFlows((char)aggMethod) +
++ (*engineIter).second.FlowsReceived((char)aggMethod));
+ syslog(LOG_INFO,
+ "[I] missed %u of %u flows from %s"
+ " engine %d agg_method %d (%g%% loss)",
+- (*engineIter).second.MissedFlows(aggMethod),
++ (*engineIter).second.MissedFlows((char)aggMethod),
+ totalFlows,
+ inet_ntoa(addrIn),
+ (*engineIter).first,
+ aggMethod,
+- ((*engineIter).second.MissedFlows(aggMethod) * 100.0) /
+- totalFlows);
++ ((*engineIter).second.MissedFlows((char)(aggMethod) * 100.0) /
++ totalFlows));
+ }
+ (*engineIter).second.MissedFlows(0,aggMethod);
+ (*engineIter).second.FlowsReceived(0,aggMethod);
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdCiscoFlowEngine.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdCiscoFlowEngine.cc
new file mode 100644
index 0000000..06aa428
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdCiscoFlowEngine.cc
@@ -0,0 +1,19 @@
+--- classes/src/CflowdCiscoFlowEngine.cc.orig Fri Aug 29 21:13:33 2003
++++ classes/src/CflowdCiscoFlowEngine.cc Fri Aug 29 21:17:18 2003
+@@ -43,6 +43,7 @@
+ #include "caida_t.h"
+ }
+
++using namespace std;
+ #include <string>
+
+ #include "CflowdCiscoFlowEngine.hh"
+@@ -58,7 +59,7 @@
+ //-------------------------------------------------------------------------
+ uint32_t CflowdCiscoFlowEngine::SequenceNumber(uint32_t seqNumber,
+ uint16_t flowCount,
+- uint8_t aggMethod = 0)
++ uint8_t aggMethod )
+ {
+ if (aggMethod > k_CiscoV8FlowExportMaxAggType) {
+ syslog(LOG_ERR,
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdCiscoMap.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdCiscoMap.cc
new file mode 100644
index 0000000..33f4f19
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdCiscoMap.cc
@@ -0,0 +1,19 @@
+--- classes/src/CflowdCiscoMap.cc.orig Fri Aug 29 21:26:58 2003
++++ classes/src/CflowdCiscoMap.cc Fri Aug 29 21:28:13 2003
+@@ -39,6 +39,7 @@
+ // info@caida.org
+ //===========================================================================
+
++using namespace std;
+ #include <string>
+ #include <vector>
+
+@@ -112,7 +113,7 @@
+ }
+
+ numCiscos = htonl(numCiscos);
+- os.write(&numCiscos,sizeof(numCiscos));
++ os.write((char *)&numCiscos,sizeof(numCiscos));
+
+ for (ciscomIter = (*this).begin(); ciscomIter != (*this).end();
+ ciscomIter++) {
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdCollector.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdCollector.cc
new file mode 100644
index 0000000..736a890
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdCollector.cc
@@ -0,0 +1,10 @@
+--- classes/src/CflowdCollector.cc.orig Fri Aug 29 21:47:25 2003
++++ classes/src/CflowdCollector.cc Fri Aug 29 21:47:36 2003
+@@ -39,6 +39,7 @@
+ // info@caida.org
+ //===========================================================================
+
++using namespace std;
+ #include <string>
+
+ #include "CflowdCollector.hh"
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdNextHopTable.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdNextHopTable.cc
new file mode 100644
index 0000000..87dce68
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdNextHopTable.cc
@@ -0,0 +1,31 @@
+--- classes/src/CflowdNextHopTable.cc.orig Fri Aug 29 21:52:18 2003
++++ classes/src/CflowdNextHopTable.cc Fri Aug 29 21:53:26 2003
+@@ -82,11 +82,11 @@
+ (*this).erase((*this).begin(),(*this).end());
+ }
+
+- is.read(&numNextHops,sizeof(numNextHops));
++ is.read((char *)&numNextHops,sizeof(numNextHops));
+ numNextHops = ntohl(numNextHops);
+
+ for (nextHopNum = 0; nextHopNum < numNextHops; nextHopNum++) {
+- is.read(&nextHop,sizeof(nextHop));
++ is.read((char *)&nextHop,sizeof(nextHop));
+ nextHopTraffic.read(is);
+ (*this)[nextHop] = nextHopTraffic;
+ }
+@@ -154,12 +154,12 @@
+
+ numNextHops = (*this).size();
+ numNextHops = htonl(numNextHops);
+- os.write(&numNextHops,sizeof(numNextHops));
++ os.write((char *)&numNextHops,sizeof(numNextHops));
+
+ for (nextHopIter = (*this).begin(); nextHopIter != (*this).end();
+ nextHopIter++) {
+ nextHop = (*nextHopIter).first;
+- os.write(&nextHop,sizeof(nextHop));
++ os.write((char *)&nextHop,sizeof(nextHop));
+ (*nextHopIter).second.write(os);
+ }
+ return(os);
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdPacketQueue.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdPacketQueue.cc
new file mode 100644
index 0000000..d60c99e
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdPacketQueue.cc
@@ -0,0 +1,28 @@
+--- classes/src/CflowdPacketQueue.cc.orig Fri Aug 29 21:54:26 2003
++++ classes/src/CflowdPacketQueue.cc Fri Aug 29 21:58:48 2003
+@@ -54,6 +54,7 @@
+ #include <syslog.h>
+ #include <assert.h>
+
++using namespace std;
+ #include "caida_t.h"
+ #include "CflowdFlowPdu.h"
+
+@@ -401,7 +402,7 @@
+ //.........................................................................
+ //
+ //-------------------------------------------------------------------------
+-int CflowdPacketQueue::GetLock(uint8_t bufNum = 0xff)
++int CflowdPacketQueue::GetLock(uint8_t bufNum)
+ {
+ if (bufNum == 0xff)
+ bufNum = this->_currentBuffer;
+@@ -424,7 +425,7 @@
+ //.........................................................................
+ //
+ //-------------------------------------------------------------------------
+-int CflowdPacketQueue::ReleaseLock(uint8_t bufNum = 0xff)
++int CflowdPacketQueue::ReleaseLock(uint8_t bufNum)
+ {
+ if (bufNum == 0xff)
+ bufNum = this->_currentBuffer;
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdRawFlow.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdRawFlow.cc
new file mode 100644
index 0000000..85b4536
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdRawFlow.cc
@@ -0,0 +1,200 @@
+--- classes/src/CflowdRawFlow.cc.orig Fri Aug 29 21:18:36 2003
++++ classes/src/CflowdRawFlow.cc Fri Aug 29 21:22:55 2003
+@@ -44,6 +44,7 @@
+ #include <string.h>
+ }
+
++using namespace std;
+ #include <string>
+
+ #include "CflowdRawFlow.hh"
+@@ -336,82 +337,82 @@
+
+ this->data._isHostOrder = false;
+
+- is.read(&(this->data._index),sizeof(this->data._index));
++ is.read((char *)&(this->data._index),sizeof(this->data._index));
+ if (! is)
+ return(is);
+ flowIndex = ntohl(this->data._index);
+
+ if (flowIndex & CflowdRawFlow::k_routerMask) {
+- is.read(&(this->data._router),sizeof(this->data._router));
++ is.read((char *)&(this->data._router),sizeof(this->data._router));
+ }
+ if (flowIndex & CflowdRawFlow::k_srcIpAddrMask) {
+- is.read(&(this->data._srcIpAddr),sizeof(this->data._srcIpAddr));
++ is.read((char *)&(this->data._srcIpAddr),sizeof(this->data._srcIpAddr));
+ }
+ if (flowIndex & CflowdRawFlow::k_dstIpAddrMask) {
+- is.read(&(this->data._dstIpAddr),sizeof(this->data._dstIpAddr));
++ is.read((char *)&(this->data._dstIpAddr),sizeof(this->data._dstIpAddr));
+ }
+ if (flowIndex & CflowdRawFlow::k_inputIfIndexMask) {
+- is.read(&(this->data._inputIfIndex),sizeof(this->data._inputIfIndex));
++ is.read((char *)&(this->data._inputIfIndex),sizeof(this->data._inputIfIndex));
+ }
+ if (flowIndex & CflowdRawFlow::k_outputIfIndexMask) {
+- is.read(&(this->data._outputIfIndex),sizeof(this->data._outputIfIndex));
++ is.read((char *)&(this->data._outputIfIndex),sizeof(this->data._outputIfIndex));
+ }
+ if (flowIndex & CflowdRawFlow::k_srcPortMask) {
+- is.read(&(this->data._srcPort),sizeof(this->data._srcPort));
++ is.read((char *)&(this->data._srcPort),sizeof(this->data._srcPort));
+ }
+ if (flowIndex & CflowdRawFlow::k_dstPortMask) {
+- is.read(&(this->data._dstPort),sizeof(this->data._dstPort));
++ is.read((char *)&(this->data._dstPort),sizeof(this->data._dstPort));
+ }
+ if (flowIndex & CflowdRawFlow::k_pktsMask) {
+- is.read(&(this->data._pkts),sizeof(this->data._pkts));
++ is.read((char *)&(this->data._pkts),sizeof(this->data._pkts));
+ }
+ if (flowIndex & CflowdRawFlow::k_bytesMask) {
+- is.read(&(this->data._bytes),sizeof(this->data._bytes));
++ is.read((char *)&(this->data._bytes),sizeof(this->data._bytes));
+ }
+ if (flowIndex & CflowdRawFlow::k_ipNextHopMask) {
+- is.read(&(this->data._ipNextHop),sizeof(this->data._ipNextHop));
++ is.read((char *)&(this->data._ipNextHop),sizeof(this->data._ipNextHop));
+ }
+ if (flowIndex & CflowdRawFlow::k_startTimeMask) {
+- is.read(&(this->data._startTime),sizeof(this->data._startTime));
++ is.read((char *)&(this->data._startTime),sizeof(this->data._startTime));
+ }
+ if (flowIndex & CflowdRawFlow::k_endTimeMask) {
+- is.read(&(this->data._endTime),sizeof(this->data._endTime));
++ is.read((char *)&(this->data._endTime),sizeof(this->data._endTime));
+ }
+ if (flowIndex & CflowdRawFlow::k_protocolMask) {
+- is.read(&(this->data._protocol),sizeof(this->data._protocol));
++ is.read((char *)&(this->data._protocol),sizeof(this->data._protocol));
+ }
+ if (flowIndex & CflowdRawFlow::k_tosMask) {
+- is.read(&(this->data._tos),sizeof(this->data._tos));
++ is.read((char *)&(this->data._tos),sizeof(this->data._tos));
+ }
+ if (flowIndex & CflowdRawFlow::k_srcAsMask) {
+- is.read(&(this->data._srcAs),sizeof(this->data._srcAs));
++ is.read((char *)&(this->data._srcAs),sizeof(this->data._srcAs));
+ }
+ if (flowIndex & CflowdRawFlow::k_dstAsMask) {
+- is.read(&(this->data._dstAs),sizeof(this->data._dstAs));
++ is.read((char *)&(this->data._dstAs),sizeof(this->data._dstAs));
+ }
+ if (flowIndex & CflowdRawFlow::k_srcMaskLenMask) {
+- is.read(&(this->data._srcMaskLen),sizeof(this->data._srcMaskLen));
++ is.read((char *)&(this->data._srcMaskLen),sizeof(this->data._srcMaskLen));
+ }
+ if (flowIndex & CflowdRawFlow::k_dstMaskLenMask) {
+- is.read(&(this->data._dstMaskLen),sizeof(this->data._dstMaskLen));
++ is.read((char *)&(this->data._dstMaskLen),sizeof(this->data._dstMaskLen));
+ }
+ if (flowIndex & CflowdRawFlow::k_tcpFlagsMask) {
+- is.read(&(this->data._tcpFlags),sizeof(this->data._tcpFlags));
++ is.read((char *)&(this->data._tcpFlags),sizeof(this->data._tcpFlags));
+ }
+ if (flowIndex & CflowdRawFlow::k_inputEncapMask) {
+- is.read(&(this->data._inputEncap),sizeof(this->data._inputEncap));
++ is.read((char *)&(this->data._inputEncap),sizeof(this->data._inputEncap));
+ }
+ if (flowIndex & CflowdRawFlow::k_outputEncapMask) {
+- is.read(&(this->data._outputEncap),sizeof(this->data._outputEncap));
++ is.read((char *)&(this->data._outputEncap),sizeof(this->data._outputEncap));
+ }
+ if (flowIndex & CflowdRawFlow::k_peerNextHopMask) {
+- is.read(&(this->data._peerNextHop),sizeof(this->data._peerNextHop));
++ is.read((char *)&(this->data._peerNextHop),sizeof(this->data._peerNextHop));
+ }
+ if (flowIndex & CflowdRawFlow::k_engineTypeMask) {
+- is.read(&(this->data._engineType),sizeof(this->data._engineType));
++ is.read((char *)&(this->data._engineType),sizeof(this->data._engineType));
+ }
+ if (flowIndex & CflowdRawFlow::k_engineIdMask) {
+- is.read(&(this->data._engineId),sizeof(this->data._engineId));
++ is.read((char *)&(this->data._engineId),sizeof(this->data._engineId));
+ }
+
+ // convert to host byte order
+@@ -982,56 +983,56 @@
+
+ rawFlow.ToNetworkByteOrder();
+
+- os.write(&(dataPtr->_index),sizeof(dataPtr->_index));
++ os.write((char *)&(dataPtr->_index),sizeof(dataPtr->_index));
+
+ if (flowIndex & CflowdRawFlow::k_routerMask)
+- os.write(&(dataPtr->_router),sizeof(dataPtr->_router));
++ os.write((char *)&(dataPtr->_router),sizeof(dataPtr->_router));
+ if (flowIndex & CflowdRawFlow::k_srcIpAddrMask)
+- os.write(&(dataPtr->_srcIpAddr),sizeof(dataPtr->_srcIpAddr));
++ os.write((char *)&(dataPtr->_srcIpAddr),sizeof(dataPtr->_srcIpAddr));
+ if (flowIndex & CflowdRawFlow::k_dstIpAddrMask)
+- os.write(&(dataPtr->_dstIpAddr),sizeof(dataPtr->_dstIpAddr));
++ os.write((char *)&(dataPtr->_dstIpAddr),sizeof(dataPtr->_dstIpAddr));
+ if (flowIndex & CflowdRawFlow::k_inputIfIndexMask)
+- os.write(&(dataPtr->_inputIfIndex),sizeof(dataPtr->_inputIfIndex));
++ os.write((char *)&(dataPtr->_inputIfIndex),sizeof(dataPtr->_inputIfIndex));
+ if (flowIndex & CflowdRawFlow::k_outputIfIndexMask)
+- os.write(&(dataPtr->_outputIfIndex),sizeof(dataPtr->_outputIfIndex));
++ os.write((char *)&(dataPtr->_outputIfIndex),sizeof(dataPtr->_outputIfIndex));
+ if (flowIndex & CflowdRawFlow::k_srcPortMask)
+- os.write(&(dataPtr->_srcPort),sizeof(dataPtr->_srcPort));
++ os.write((char *)&(dataPtr->_srcPort),sizeof(dataPtr->_srcPort));
+ if (flowIndex & CflowdRawFlow::k_dstPortMask)
+- os.write(&(dataPtr->_dstPort),sizeof(dataPtr->_dstPort));
++ os.write((char *)&(dataPtr->_dstPort),sizeof(dataPtr->_dstPort));
+ if (flowIndex & CflowdRawFlow::k_pktsMask)
+- os.write(&(dataPtr->_pkts),sizeof(dataPtr->_pkts));
++ os.write((char *)&(dataPtr->_pkts),sizeof(dataPtr->_pkts));
+ if (flowIndex & CflowdRawFlow::k_bytesMask)
+- os.write(&(dataPtr->_bytes),sizeof(dataPtr->_bytes));
++ os.write((char *)&(dataPtr->_bytes),sizeof(dataPtr->_bytes));
+ if (flowIndex & CflowdRawFlow::k_ipNextHopMask)
+- os.write(&(dataPtr->_ipNextHop),sizeof(dataPtr->_ipNextHop));
++ os.write((char *)&(dataPtr->_ipNextHop),sizeof(dataPtr->_ipNextHop));
+ if (flowIndex & CflowdRawFlow::k_startTimeMask)
+- os.write(&(dataPtr->_startTime),sizeof(dataPtr->_startTime));
++ os.write((char *)&(dataPtr->_startTime),sizeof(dataPtr->_startTime));
+ if (flowIndex & CflowdRawFlow::k_endTimeMask)
+- os.write(&(dataPtr->_endTime),sizeof(dataPtr->_endTime));
++ os.write((char *)&(dataPtr->_endTime),sizeof(dataPtr->_endTime));
+ if (flowIndex & CflowdRawFlow::k_protocolMask)
+- os.write(&(dataPtr->_protocol),sizeof(dataPtr->_protocol));
++ os.write((char *)&(dataPtr->_protocol),sizeof(dataPtr->_protocol));
+ if (flowIndex & CflowdRawFlow::k_tosMask)
+- os.write(&(dataPtr->_tos),sizeof(dataPtr->_tos));
++ os.write((char *)&(dataPtr->_tos),sizeof(dataPtr->_tos));
+ if (flowIndex & CflowdRawFlow::k_srcAsMask)
+- os.write(&(dataPtr->_srcAs),sizeof(dataPtr->_srcAs));
++ os.write((char *)&(dataPtr->_srcAs),sizeof(dataPtr->_srcAs));
+ if (flowIndex & CflowdRawFlow::k_dstAsMask)
+- os.write(&(dataPtr->_dstAs),sizeof(dataPtr->_dstAs));
++ os.write((char *)&(dataPtr->_dstAs),sizeof(dataPtr->_dstAs));
+ if (flowIndex & CflowdRawFlow::k_srcMaskLenMask)
+- os.write(&(dataPtr->_srcMaskLen),sizeof(dataPtr->_srcMaskLen));
++ os.write((char *)&(dataPtr->_srcMaskLen),sizeof(dataPtr->_srcMaskLen));
+ if (flowIndex & CflowdRawFlow::k_dstMaskLenMask)
+- os.write(&(dataPtr->_dstMaskLen),sizeof(dataPtr->_dstMaskLen));
++ os.write((char *)&(dataPtr->_dstMaskLen),sizeof(dataPtr->_dstMaskLen));
+ if (flowIndex & CflowdRawFlow::k_tcpFlagsMask)
+- os.write(&(dataPtr->_tcpFlags),sizeof(dataPtr->_tcpFlags));
++ os.write((char *)&(dataPtr->_tcpFlags),sizeof(dataPtr->_tcpFlags));
+ if (flowIndex & CflowdRawFlow::k_inputEncapMask)
+- os.write(&(dataPtr->_inputEncap),sizeof(dataPtr->_inputEncap));
++ os.write((char *)&(dataPtr->_inputEncap),sizeof(dataPtr->_inputEncap));
+ if (flowIndex & CflowdRawFlow::k_outputEncapMask)
+- os.write(&(dataPtr->_outputEncap),sizeof(dataPtr->_outputEncap));
++ os.write((char *)&(dataPtr->_outputEncap),sizeof(dataPtr->_outputEncap));
+ if (flowIndex & CflowdRawFlow::k_peerNextHopMask)
+- os.write(&(dataPtr->_peerNextHop),sizeof(dataPtr->_peerNextHop));
++ os.write((char *)&(dataPtr->_peerNextHop),sizeof(dataPtr->_peerNextHop));
+ if (flowIndex & CflowdRawFlow::k_engineTypeMask)
+- os.write(&(dataPtr->_engineType),sizeof(dataPtr->_engineType));
++ os.write((char *)&(dataPtr->_engineType),sizeof(dataPtr->_engineType));
+ if (flowIndex & CflowdRawFlow::k_engineIdMask)
+- os.write(&(dataPtr->_engineId),sizeof(dataPtr->_engineId));
++ os.write((char *)&(dataPtr->_engineId),sizeof(dataPtr->_engineId));
+
+ return(os);
+ }
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdRawFlowConvertor.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdRawFlowConvertor.cc
new file mode 100644
index 0000000..d9880ef
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdRawFlowConvertor.cc
@@ -0,0 +1,10 @@
+--- classes/src/CflowdRawFlowConverter.cc.orig Fri Aug 29 21:24:00 2003
++++ classes/src/CflowdRawFlowConverter.cc Fri Aug 29 21:24:16 2003
+@@ -43,6 +43,7 @@
+ #include <assert.h>
+ }
+
++using namespace std;
+ #include <string>
+
+ #include "CflowdRawFlowConverter.hh"
diff --git a/net-mgmt/cflowd/files/patch-classes::src::CflowdTosTable.cc b/net-mgmt/cflowd/files/patch-classes::src::CflowdTosTable.cc
new file mode 100644
index 0000000..4ac063a
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::CflowdTosTable.cc
@@ -0,0 +1,28 @@
+--- classes/src/CflowdTosTable.cc.orig Fri Aug 29 22:01:28 2003
++++ classes/src/CflowdTosTable.cc Fri Aug 29 22:01:52 2003
+@@ -82,9 +82,9 @@
+ (*this).erase((*this).begin(),(*this).end());
+ }
+
+- is.read(&numToss,sizeof(numToss));
++ is.read((char *)&numToss,sizeof(numToss));
+ for (tosNum = 0; tosNum < numToss; tosNum++) {
+- is.read(&tos,sizeof(tos));
++ is.read((char *)&tos,sizeof(tos));
+ protoTraffic.read(is);
+ (*this)[tos] = protoTraffic;
+ }
+@@ -151,11 +151,11 @@
+ CflowdTosTable::const_iterator protoIter;
+
+ numToss = (*this).size();
+- os.write(&numToss,sizeof(numToss));
++ os.write((char *)&numToss,sizeof(numToss));
+
+ for (protoIter = (*this).begin(); protoIter != (*this).end(); protoIter++) {
+ tos = (*protoIter).first;
+- os.write(&tos,sizeof(tos));
++ os.write((char *)&tos,sizeof(tos));
+ (*protoIter).second.write(os);
+ }
+ return(os);
diff --git a/net-mgmt/cflowd/files/patch-classes::src::FlowFilter.y b/net-mgmt/cflowd/files/patch-classes::src::FlowFilter.y
new file mode 100644
index 0000000..19f5a59
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::FlowFilter.y
@@ -0,0 +1,10 @@
+--- classes/src/FlowFilter.y.orig Fri Aug 29 22:08:43 2003
++++ classes/src/FlowFilter.y Fri Aug 29 22:08:51 2003
+@@ -42,6 +42,7 @@
+
+ #include <math.h>
+
++ using namespace std;
+ #include <string>
+
+ #include "CflowdRawFlow.hh"
diff --git a/net-mgmt/cflowd/files/patch-classes::src::Signal.cc b/net-mgmt/cflowd/files/patch-classes::src::Signal.cc
new file mode 100644
index 0000000..aafc0dc
--- /dev/null
+++ b/net-mgmt/cflowd/files/patch-classes::src::Signal.cc
@@ -0,0 +1,10 @@
+--- classes/src/Signal.cc.orig Fri Aug 29 21:25:46 2003
++++ classes/src/Signal.cc Fri Aug 29 21:25:16 2003
+@@ -8,6 +8,7 @@
+ #include <string.h>
+ }
+
++using namespace std;
+ #include <string>
+ #include "Signal.hh"
+
OpenPOWER on IntegriCloud