ports/52064: ns2 (ports/net/ns) was broken
User &
thinker at branda.to
Sun May 11 07:50:17 UTC 2003
>Number: 52064
>Category: ports
>Synopsis: ns2 (ports/net/ns) was broken
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sun May 11 00:50:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Thinker K.F. Li
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
Yuan-Ze University
>Environment:
System: FreeBSD esp.branda.to 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Fri May 9 09:28:42 CST 2003 thinker at esp.branda.to:/usr/obj/usr/src/sys/GENERIC i386
>Description:
>How-To-Repeat:
>Fix:
apply following patches.
--- patch-ac begins here ---
--- aodv/aodv.cc.orig Sat May 10 11:30:27 2003
+++ aodv/aodv.cc Sat May 10 11:30:27 2003
@@ -1185,7 +1185,7 @@
}
void
-AODV::sendError(Packet *p, bool jitter = true) {
+AODV::sendError(Packet *p, bool jitter) {
struct hdr_cmn *ch = HDR_CMN(p);
struct hdr_ip *ih = HDR_IP(p);
struct hdr_aodv_error *re = HDR_AODV_ERROR(p);
--- diffusion3/lib/dr.cc.orig Sat May 10 11:30:40 2003
+++ diffusion3/lib/dr.cc Sat May 10 11:30:40 2003
@@ -68,7 +68,7 @@
#ifdef NS_DIFFUSION
class DiffEventQueue;
-int DiffusionRouting::get_agentid(int id = -1) {
+int DiffusionRouting::get_agentid(int id) {
if (id != -1)
agent_id = id;
return agent_id;
@@ -685,7 +685,7 @@
}
int DiffusionRouting::sendMessage(Message *msg, handle h,
- u_int16_t priority = FILTER_KEEP_PRIORITY)
+ u_int16_t priority)
{
RedirectMessage *originalHdr;
NRAttribute *originalAttr, *ctrlmsg;
--- diffusion3/nr/nr.cc.orig Sat May 10 11:30:41 2003
+++ diffusion3/nr/nr.cc Sat May 10 11:30:41 2003
@@ -63,7 +63,7 @@
NRAttribute * NRAttribute::find_key_from(int key, NRAttrVec *attrs,
NRAttrVec::iterator start,
- NRAttrVec::iterator *place = NULL) {
+ NRAttrVec::iterator *place) {
NRAttrVec::iterator i;
--- dsr/dsragent.cc.orig Sat May 10 11:30:43 2003
+++ dsr/dsragent.cc Sat May 10 11:30:43 2003
@@ -1192,7 +1192,7 @@
void
-DSRAgent::sendOutPacketWithRoute(SRPacket& p, bool fresh, Time delay = 0.0)
+DSRAgent::sendOutPacketWithRoute(SRPacket& p, bool fresh, Time delay)
// take packet and send it out, packet must a have a route in it
// return value is not very meaningful
// if fresh is true then reset the path before using it, if fresh
@@ -2392,7 +2392,7 @@
#endif
void
-DSRAgent::sendUnknownFlow(SRPacket &p, bool asDefault, u_int16_t flowid = 0) {
+DSRAgent::sendUnknownFlow(SRPacket &p, bool asDefault, u_int16_t flowid) {
hdr_sr *srh = hdr_sr::access(p.pkt);
hdr_ip *iph = hdr_ip::access(p.pkt);
hdr_cmn *cmh = hdr_cmn::access(p.pkt);
@@ -2496,7 +2496,7 @@
}
void
-DSRAgent::xmitFlowFailed(Packet *pkt, const char* reason = "DROP_RTR_MAC_CALLBACK")
+DSRAgent::xmitFlowFailed(Packet *pkt, const char* reason)
{
hdr_sr *srh = hdr_sr::access(pkt);
hdr_ip *iph = hdr_ip::access(pkt);
@@ -2548,7 +2548,7 @@
}
void
-DSRAgent::xmitFailed(Packet *pkt, const char* reason = "DROP_RTR_MAC_CALLBACK")
+DSRAgent::xmitFailed(Packet *pkt, const char* reason)
/* mark our route cache reflect the failure of the link between
srh[cur_addr] and srh[next_addr], and then create a route err
message to send to the orginator of the pkt (srh[0])
--- dsr/flowstruct.cc.orig Sat May 10 11:30:43 2003
+++ dsr/flowstruct.cc Sat May 10 11:30:43 2003
@@ -27,7 +27,7 @@
#include "flowstruct.h"
-FlowTable::FlowTable(int size_ = FLOW_TABLE_SIZE) : DRTab(size_) {
+FlowTable::FlowTable(int size_) : DRTab(size_) {
assert (size_ > 0);
size = 0;
maxSize = size_;
@@ -167,7 +167,7 @@
return DRTab.find(source, destination, flow);
}
-DRTable::DRTable(int size_=FLOW_TABLE_SIZE) {
+DRTable::DRTable(int size_) {
assert (size_ > 0);
size = 0;
maxSize = size_;
@@ -233,7 +233,7 @@
assert(0);
}
-ARSTable::ARSTable(int size_ = ARS_TABLE_SIZE) {
+ARSTable::ARSTable(int size_) {
size = size_;
victim = 0;
table = new ARSTabEnt[size_];
--- imep/rxmit_queue.h.orig Sat May 10 11:30:48 2003
+++ imep/rxmit_queue.h Sat May 10 11:30:48 2003
@@ -58,7 +58,7 @@
class ReXmitQ;
class ReXmitQIter {
- friend ReXmitQ;
+ friend class ReXmitQ;
public:
inline Packet * next() {
--- linkstate/ls.cc.orig Sat May 10 11:30:51 2003
+++ linkstate/ls.cc Sat May 10 11:30:51 2003
@@ -641,7 +641,7 @@
// -- sendLinkStates --
-bool LsRouting::sendLinkStates(bool buffer = false )
+bool LsRouting::sendLinkStates(bool buffer)
{
if (myNodePtr_ == NULL)
return false;
--- linkstate/ls.h.orig Sat May 10 11:30:51 2003
+++ linkstate/ls.h Sat May 10 11:30:51 2003
@@ -80,9 +80,9 @@
};
template <class _Tp>
-class LsList : public list<_Tp> {
+class LsList : public std::list<_Tp> {
public:
- typedef list<_Tp> baseList;
+ typedef std::list<_Tp> baseList;
LsList() : baseList() {}
LsList(const _Tp& x) : baseList(1, x) {}
void eraseAll() {
@@ -94,15 +94,15 @@
};
template<class Key, class T>
-class LsMap : public map<Key, T, less<Key> > {
+class LsMap : public std::map<Key, T, std::less<Key> > {
public:
- typedef less<Key> less_key;
- typedef map<Key, T, less_key> baseMap;
+ typedef std::less<Key> less_key;
+ typedef std::map<Key, T, less_key> baseMap;
LsMap() : baseMap() {}
// this next typedef of iterator seems extraneous but is required by gcc-2.96
- typedef map<Key, T, less<Key> >::iterator iterator;
- typedef pair<iterator, bool> pair_iterator_bool;
+ typedef std::map<Key, T, std::less<Key> >::iterator iterator;
+ typedef std::pair<iterator, bool> pair_iterator_bool;
iterator insert(const Key & key, const T & item) {
baseMap::value_type v(key, item);
pair_iterator_bool ib = baseMap::insert(v);
@@ -430,7 +430,7 @@
LsMessageHistory
*/
typedef LsList<u_int32_t> LsMessageIdList;
-typedef less<int> less_node_id;
+typedef std::less<int> less_node_id;
class LsMessageHistory : public LsMap<int, u_int32_t> {
public:
// isNewMessage, note: it saves this one in the history as well
--- mobile/shadowing-vis.cc.orig Sat May 10 11:30:57 2003
+++ mobile/shadowing-vis.cc Sat May 10 11:30:57 2003
@@ -24,6 +24,7 @@
*/
#include <math.h>
+#include <iostream.h>
#include <fstream.h>
#include <delay.h>
@@ -166,12 +167,12 @@
pixel = new unsigned char[width * height];
unsigned char a;
- image.get(a); // this byte is not the image
+ image.get(*(char *)&a); // this byte is not the image
// the upper-left corner is the origin (0, 0)
for(int n = 0; n < height; n++) {
for(int m = 0; m < width; m++) {
- image.get( a );
+ image.get(*(char *)& a );
pixel[m + n * width] = a;
}
}
--- pgm/pgm-agent.cc.orig Sat May 10 11:31:00 2003
+++ pgm/pgm-agent.cc Sat May 10 11:31:00 2003
@@ -147,8 +147,8 @@
PgmAgentTimer & nak_rpt_timer() { return nak_rpt_timer_; }
PgmAgentTimer & nak_rdata_timer() { return nak_rdata_timer_; }
PgmAgentTimer & nak_elim_timer() { return nak_elim_timer_; }
- list<int> & iface_list() { return iface_list_; }
- list<NsObject *> & agent_list() { return agent_list_; }
+ std::list<int> & iface_list() { return iface_list_; }
+ std::list<NsObject *> & agent_list() { return agent_list_; }
StateInfo * & sinfo() { return sinfo_; }
protected:
@@ -187,10 +187,10 @@
PgmAgentTimer nak_elim_timer_;
// List of interfaces upon which the RDATA will be sent to.
- list<int> iface_list_;
+ std::list<int> iface_list_;
// List of agents upon which the RDATA will be sent to.
- list<NsObject *> agent_list_;
+ std::list<NsObject *> agent_list_;
// Back-pointer to the state information block that is holding this
// repair data. We use this so we can get the upstream_path and the TSI.
@@ -216,7 +216,7 @@
int & spm_seqno() { return spm_seqno_; }
ns_addr_t & upstream_node() { return upstream_node_; }
int & upstream_iface() { return upstream_iface_; }
- map<int, RepairState> & repair() { return repair_; }
+ std::map<int, RepairState> & repair() { return repair_; }
protected:
@@ -227,7 +227,7 @@
// Map between a NAK sequence number and the corresponding repair state
// for that sequence number.
- map<int, RepairState> repair_;
+ std::map<int, RepairState> repair_;
};
@@ -290,7 +290,7 @@
Stats stats_; // Statistical information.
// TSI-indexed state control block list.
- list<StateInfo> state_list_;
+ std::list<StateInfo> state_list_;
// Number of seconds to wait between retransmitting a NAK that is waiting
// for a NCF packet.
@@ -504,7 +504,7 @@
}
// Look for the repair state for this RDATA packet.
- map<int, RepairState>::iterator result = state->repair().find(hp->seqno_);
+ std::map<int, RepairState>::iterator result = state->repair().find(hp->seqno_);
if (result == state->repair().end()) {
// No repair state present for this RDATA packet.
@@ -535,7 +535,7 @@
hdr_cmn *hc = HDR_CMN(pkt);
if (!rstate->iface_list().empty()) {
- list<int>::iterator iter = rstate->iface_list().begin();
+ std::list<int>::iterator iter = rstate->iface_list().begin();
while (iter != rstate->iface_list().end()) {
if (!flag) {
@@ -565,7 +565,7 @@
}
if (!rstate->agent_list().empty()) {
- list<NsObject *>::iterator iter = rstate->agent_list().begin();
+ std::list<NsObject *>::iterator iter = rstate->agent_list().begin();
while (iter != rstate->agent_list().end()) {
if (!flag) {
@@ -648,9 +648,9 @@
// Create repair state for the NAK query. Associate the sequence number
// of the NAK packet with the interface where the packet was received.
- pair<map<int, RepairState>::iterator, bool> result;
+ std::pair<std::map<int, RepairState>::iterator, bool> result;
- result = state->repair().insert(pair<int, RepairState>(hp->seqno_, RepairState(this, state, hp->seqno_, hpn->source_, hpn->group_)));
+ result = state->repair().insert(std::pair<int, RepairState>(hp->seqno_, RepairState(this, state, hp->seqno_, hpn->source_, hpn->group_)));
RepairState *rstate = &(result.first->second);
@@ -689,8 +689,8 @@
if (hc->iface() < 0) {
// Scan the agent list to see if the agent is in the list already
// for this repair state.
- list<NsObject *> *agent_list = &(rstate->agent_list());
- list<NsObject *>::iterator res = find(agent_list->begin(), agent_list->end(), pkt2agent(pkt));
+ std::list<NsObject *> *agent_list = &(rstate->agent_list());
+ std::list<NsObject *>::iterator res = find(agent_list->begin(), agent_list->end(), pkt2agent(pkt));
if (res == agent_list->end()) {
agent_list->push_back(pkt2agent(pkt));
@@ -701,8 +701,8 @@
// Scan the interface list to see if the interface is in the list
// already for this repair state.
- list<int> *iface_list = &(rstate->iface_list());
- list<int>::iterator res = find(iface_list->begin(), iface_list->end(), hc->iface());
+ std::list<int> *iface_list = &(rstate->iface_list());
+ std::list<int>::iterator res = find(iface_list->begin(), iface_list->end(), hc->iface());
if (res == iface_list->end()) {
// Interface not found in iface list for this NAK, add it.
@@ -774,7 +774,7 @@
}
// Look for the repair state for this NCF packet.
- map<int, RepairState>::iterator result = state->repair().find(hp->seqno_);
+ std::map<int, RepairState>::iterator result = state->repair().find(hp->seqno_);
RepairState *rstate;
if (result == state->repair().end()) {
@@ -784,8 +784,8 @@
// used to reach our upstream node, we can create empty repair state.
// This is NAK Anticipation (see 7.5 in PGM specification).
- pair<map<int, RepairState>::iterator, bool> res;
- res = state->repair().insert(pair<int, RepairState>(hp->seqno_, RepairState(this, state, hp->seqno_, hip->src(), hip->dst())));
+ std::pair<std::map<int, RepairState>::iterator, bool> res;
+ res = state->repair().insert(std::pair<int, RepairState>(hp->seqno_, RepairState(this, state, hp->seqno_, hip->src(), hip->dst())));
rstate = &(res.first->second);
@@ -964,7 +964,7 @@
{
// Use the TSI from the SPM packet and locate the proper state block.
- list<StateInfo>::iterator iter = state_list_.begin();
+ std::list<StateInfo>::iterator iter = state_list_.begin();
while(iter != state_list_.end()) {
if ( (*iter).tsi() == tsi ) {
return &(*iter);
--- pgm/pgm-receiver.cc.orig Sat May 10 11:31:00 2003
+++ pgm/pgm-receiver.cc Sat May 10 11:31:00 2003
@@ -197,7 +197,7 @@
RcvBuffer rcvbuf_;
// Collection of sequence numbers that we are waiting for RDATA/ODATA.
- map<int, NakItem> naks_;
+ std::map<int, NakItem> naks_;
};
@@ -416,7 +416,7 @@
}
// Locate the nak state for the given multicast NAK.
- map<int, NakItem>::iterator result = naks_.find(hp->seqno_);
+ std::map<int, NakItem>::iterator result = naks_.find(hp->seqno_);
if (result == naks_.end()) {
// No state was found. Discard the NCF.
@@ -478,7 +478,7 @@
*/
// Locate the nak state for the given NCF.
- map<int, NakItem>::iterator result = naks_.find(hp->seqno_);
+ std::map<int, NakItem>::iterator result = naks_.find(hp->seqno_);
if (result == naks_.end()) {
// No state was found. Discard the NCF.
@@ -526,9 +526,9 @@
#endif
// Insert the given sequence number into the nak map.
- pair<map<int, NakItem>::iterator, bool> result;
+ std::pair<std::map<int, NakItem>::iterator, bool> result;
- result = naks_.insert(pair<int, NakItem>(seqno, NakItem(this, seqno)));
+ result = naks_.insert(std::pair<int, NakItem>(seqno, NakItem(this, seqno)));
NakItem *nitem = &(result.first->second);
@@ -556,7 +556,7 @@
if (nitem == NULL) {
// Look up the sequence number in the nak map.
- map<int, NakItem>::iterator result = naks_.find(seqno);
+ std::map<int, NakItem>::iterator result = naks_.find(seqno);
if (result == naks_.end()) {
// The NAK state was not found. This is fine since the handle_odata()
--- pgm/pgm-sender.cc.orig Sat May 10 11:31:00 2003
+++ pgm/pgm-sender.cc Sat May 10 11:31:00 2003
@@ -84,8 +84,8 @@
int & seqno() { return seqno_; }
Packet * & rdata_pkt() { return rdata_pkt_; }
PgmSenderTimer & rdata_timer() { return rdata_timer_; }
- list<int> & iface_list() { return iface_list_; }
- list<NsObject *> & agent_list() { return agent_list_; }
+ std::list<int> & iface_list() { return iface_list_; }
+ std::list<NsObject *> & agent_list() { return agent_list_; }
protected:
// The sequence number of this RDATA item.
@@ -95,9 +95,9 @@
// The timer responsible for sending out this RDATA packet.
PgmSenderTimer rdata_timer_;
// The list of interfaces for which this packet must be sent to.
- list<int> iface_list_;
+ std::list<int> iface_list_;
// The list of agents for which this packet must be sent to.
- list<NsObject *> agent_list_;
+ std::list<NsObject *> agent_list_;
};
// A class used to keep track of duplicate reply requests.
@@ -163,11 +163,11 @@
// that represents the RDATA packet including which interfaces the
// RDATA should be sent to, along with a timer that is used to trigger
// sending of the RDATA packet.
- map<int, RdataItem> pending_rdata_;
+ std::map<int, RdataItem> pending_rdata_;
// A list to keep track of the number of retransmissions for a given
// RDATA reply. The max size this will grow is MAX_REPLY_LIST_SIZE.
- list<ReplyItem> reply_;
+ std::list<ReplyItem> reply_;
// The 'typicial' size of a data packet including header. This should
// get set automatically from the application calling sendmsg(). We
@@ -289,7 +289,7 @@
}
// The application calls this function to send out new ODATA (original DATA).
-void PgmSender::sendmsg(int nbytes, const char *flags = 0)
+void PgmSender::sendmsg(int nbytes, const char *flags)
{
odata_seqno_++;
@@ -389,9 +389,9 @@
// appropriate interface.
// Attempt to locate this NAK sequence number on the pending RDATA map.
- pair<map<int, RdataItem>::iterator, bool> result;
+ std::pair<std::map<int, RdataItem>::iterator, bool> result;
- result = pending_rdata_.insert(pair<int, RdataItem>(hp->seqno_, RdataItem(hp->seqno_, this)));
+ result = pending_rdata_.insert(std::pair<int, RdataItem>(hp->seqno_, RdataItem(hp->seqno_, this)));
RdataItem *ritem = &(result.first->second);
@@ -444,9 +444,9 @@
// Scan the agent list to see if the agent is already registered
// for this RDATA.
- list<NsObject *> *agent_list = &(ritem->agent_list());
+ std::list<NsObject *> *agent_list = &(ritem->agent_list());
- list<NsObject *>::iterator res = find(agent_list->begin(), agent_list->end(), pkt2agent(pkt));
+ std::list<NsObject *>::iterator res = find(agent_list->begin(), agent_list->end(), pkt2agent(pkt));
if (res == agent_list->end()) {
// Agent not found in agent list for this RDATA, add it.
@@ -460,8 +460,8 @@
else {
// Scan the interface list to see if the interface is already registered
// for this RDATA.
- list<int> *iface_list = &(ritem->iface_list());
- list<int>::iterator res = find(iface_list->begin(), iface_list->end(), hc->iface());
+ std::list<int> *iface_list = &(ritem->iface_list());
+ std::list<int>::iterator res = find(iface_list->begin(), iface_list->end(), hc->iface());
if (res == iface_list->end()) {
// Interface not found in iface list for this RDATA, add it.
@@ -523,7 +523,7 @@
// Locate the sequence number of this rdata in the list of sent
// retransmissions.
int count = 0;
- list<ReplyItem>::iterator iter = reply_.begin();
+ std::list<ReplyItem>::iterator iter = reply_.begin();
while (iter != reply_.end()) {
if ((*iter).seqno() == item->seqno()) {
(*iter).retransmissions() += 1;
@@ -561,7 +561,7 @@
int flag = 0;
if (!item->iface_list().empty()) {
- list<int>::iterator iter = item->iface_list().begin();
+ std::list<int>::iterator iter = item->iface_list().begin();
while (iter != item->iface_list().end()) {
if (!flag) {
@@ -584,7 +584,7 @@
}
if (!item->agent_list().empty()) {
- list<NsObject *>::iterator iter = item->agent_list().begin();
+ std::list<NsObject *>::iterator iter = item->agent_list().begin();
while (iter != item->agent_list().end()) {
if (!flag) {
--- queue/drr.cc.orig Sat May 10 11:31:02 2003
+++ queue/drr.cc Sat May 10 11:31:02 2003
@@ -34,7 +34,7 @@
class PacketDRR : public PacketQueue {
PacketDRR(): pkts(0),src(-1),bcount(0),prev(0),next(0),deficitCounter(0),turn(0) {}
- friend DRR;
+ friend class DRR;
protected :
int pkts;
int src; //to detect collisions keep track of actual src address
--- queue/pi.h.orig Sat May 10 11:31:03 2003
+++ queue/pi.h Sat May 10 11:31:03 2003
@@ -93,7 +93,7 @@
class PIQueue : public Queue {
- friend PICalcTimer;
+ friend class PICalcTimer;
public:
PIQueue(const char * = "Drop");
protected:
--- queue/srr.cc.orig Sat May 10 11:31:04 2003
+++ queue/srr.cc Sat May 10 11:31:04 2003
@@ -77,7 +77,7 @@
class PacketSRR {
PacketSRR(): pkts(0),bcount(0),deficitCounter(0),turn(0),head_(0), tail_(0), len_(0) {}
- friend SRR;
+ friend struct SRR;
protected:
int pkts; //total packets in this Queue
int bcount; //count of bytes in each flow to find the max flow;
--- queue/sfq.cc.orig Sat May 10 11:31:04 2003
+++ queue/sfq.cc Sat May 10 11:31:04 2003
@@ -49,7 +49,7 @@
class PacketSFQ : public PacketQueue {
PacketSFQ() : pkts(0), prev(0), next(0) {}
- friend SFQ;
+ friend struct SFQ;
protected:
void sfqdebug();
int pkts;
--- queue/wss.h.orig Sat May 10 11:31:04 2003
+++ queue/wss.h Sat May 10 11:31:04 2003
@@ -73,7 +73,7 @@
class WSS{
public:WSS(): currOrder(1), items(0), ptr(0), pwss(0){ }
- friend SRR;
+ friend struct SRR;
public:
int maxOrder; // the order of the WSS
int currOrder; // current order of WSS
--- routing/route.h.orig Sat May 10 11:31:07 2003
+++ routing/route.h Sat May 10 11:31:07 2003
@@ -78,10 +78,10 @@
virtual int lookup_flat(int sid, int did); //added for pushback - ratul
int lookup_hier(char* asrc, char* adst, int&result);
static void ns_strtok(char *addr, int *addrstr);
- inline int elements_in_level (int *addr, int level);
+ int elements_in_level (int *addr, int level);
inline int domains(){ return (D_-1); }
- inline int domain_size(int domain);
- inline int cluster_size(int domain, int cluster);
+ int domain_size(int domain);
+ int cluster_size(int domain, int cluster);
protected:
void check(int);
--- tcp/snoop.h.orig Sat May 10 11:31:11 2003
+++ tcp/snoop.h Sat May 10 11:31:11 2003
@@ -111,8 +111,8 @@
class SnoopPersistHandler;
class Snoop : public NsObject {
- friend SnoopRxmitHandler;
- friend SnoopPersistHandler;
+ friend class SnoopRxmitHandler;
+ friend class SnoopPersistHandler;
public:
Snoop();
void recv(Packet *, Handler *);
--- tcp/tcp-rbp.cc.orig Sat May 10 11:31:12 2003
+++ tcp/tcp-rbp.cc Sat May 10 11:31:12 2003
@@ -69,7 +69,7 @@
// Hmmm... ``a is a'' in the construction of the RBPVegasPaceTimer edifice :->
class RBPVegasTcpAgent : public virtual VegasTcpAgent {
- friend RBPVegasPaceTimer;
+ friend class RBPVegasPaceTimer;
public:
RBPVegasTcpAgent();
virtual void recv(Packet *pkt, Handler *);
@@ -231,7 +231,7 @@
// Hmmm... ``a is a'' in the construction of the RBPRenoPaceTimer edifice :->
class RBPRenoTcpAgent : public virtual RenoTcpAgent {
- friend RBPRenoPaceTimer;
+ friend class RBPRenoPaceTimer;
public:
RBPRenoTcpAgent();
virtual void recv(Packet *pkt, Handler *);
--- tcp/tfrc-sink.h.orig Sat May 10 11:31:13 2003
+++ tcp/tfrc-sink.h Sat May 10 11:31:13 2003
@@ -71,7 +71,7 @@
};
class TfrcSinkAgent : public Agent {
- friend TfrcNackTimer;
+ friend class TfrcNackTimer;
public:
TfrcSinkAgent();
void recv(Packet*, Handler*);
--- tcp/tfrc.h.orig Sat May 10 11:31:13 2003
+++ tcp/tfrc.h Sat May 10 11:31:13 2003
@@ -113,8 +113,8 @@
};
class TfrcAgent : public Agent {
- friend TfrcSendTimer;
- friend TfrcNoFeedbackTimer;
+ friend class TfrcSendTimer;
+ friend class TfrcNoFeedbackTimer;
public:
TfrcAgent();
void recv(Packet*, Handler*);
--- configure.orig Sat May 10 12:36:44 2003
+++ configure Sat May 10 12:37:26 2003
@@ -2947,10 +2947,9 @@
cat >conftest.$ac_ext <<_ACEOF
#line 2949 "configure"
-#include "confdefs.h"
#include <list>
- #include <hash_map>
- template <class _T> class tlist : public list <_T> {};
+using std::list;
+template <class _T> class tlist : public list <_T> {};
int
main ()
--- nix/nixvec.h.orig Sat May 10 13:14:13 2003
+++ nix/nixvec.h Sat May 10 13:13:53 2003
@@ -34,8 +34,8 @@
typedef unsigned long Nixl_t; // Length of a NV
const Nix_t NIX_NONE = 0xffffffff; // If not a neighbor
const Nixl_t NIX_BPW = 32; // Bits per long word
-typedef pair<Nix_t, Nixl_t> NixPair_t; // Index, bits needed
-typedef pair<Nix_t*, Nixl_t> NixpPair_t;// NV Pointer, length
+typedef std::pair<Nix_t, Nixl_t> NixPair_t; // Index, bits needed
+typedef std::pair<Nix_t*, Nixl_t> NixpPair_t;// NV Pointer, length
// The variable length neighbor index routing vector
--- routealgo/rnode.h.orig Sat May 10 13:17:48 2003
+++ routealgo/rnode.h Sat May 10 13:17:35 2003
@@ -19,7 +19,7 @@
typedef unsigned long nodeid_t; // Node identifier
typedef unsigned long dist_t; // Distance
typedef unsigned int weight_t; // Weight
-typedef pair<nodeid_t, weight_t> NodeWeight_t; // Node/Distance Pair
+typedef std::pair<nodeid_t, weight_t> NodeWeight_t; // Node/Distance Pair
const dist_t INF = 0xffffffff;
const nodeid_t NODE_NONE = 0xffffffff;
@@ -49,19 +49,19 @@
//int operator!= (RNode& N, const dist_t& n) { return N.m_id != n;}
// Define the vector for nodes
-typedef vector<RNode*> RNodeVec_t;
+typedef std::vector<RNode*> RNodeVec_t;
typedef RNodeVec_t::iterator RNodeVec_it;
// Define the deque for nodes
-typedef deque<RNode*> RNodeDeq_t;
+typedef std::deque<RNode*> RNodeDeq_t;
typedef RNodeDeq_t::iterator RNodeDeq_it;
// Define the vector for next hop neighbors
-typedef vector<nodeid_t> RoutingVec_t;
+typedef std::vector<nodeid_t> RoutingVec_t;
typedef RoutingVec_t::iterator RoutingVec_it;
// Define the distance vector
-typedef vector<dist_t> DistVec_t;
+typedef std::vector<dist_t> DistVec_t;
typedef DistVec_t::iterator DistVec_it;
#endif
--- nix/nixnode.h.orig Sat May 10 13:20:42 2003
+++ nix/nixnode.h Sat May 10 13:22:18 2003
@@ -10,6 +10,8 @@
#include "object.h"
#include <map>
+using std::vector;
+
// Define the edge class
class Edge {
public :
@@ -25,7 +27,7 @@
typedef ObjVec_t::iterator ObjVec_it;
// Use a map to keep a table of known NixVectors
-typedef map<nodeid_t, NixVec*, less<nodeid_t> > NVMap_t;
+typedef std::map<nodeid_t, NixVec*, std::less<nodeid_t> > NVMap_t;
typedef NVMap_t::iterator NVMap_it;
typedef NVMap_t::value_type NVPair_t;
--- nix/nixnode.cc.orig Sat May 10 14:19:56 2003
+++ nix/nixnode.cc Sat May 10 14:05:17 2003
@@ -126,7 +126,7 @@
if (last.first == NODE_NONE)
{
prev = m_Adj.begin();
- if (prev == NULL) // ! How can this happen?
+ if (prev == (EdgeVec_it)NULL) // ! How can this happen?
return(NodeWeight_t(NODE_NONE, 0));
pE = *prev;
if(0)printf("NextAdj returning first edge %ld\n",
--- routealgo/tnode.h.orig Sat Dec 2 07:38:37 2000
+++ routealgo/tnode.h Sat May 10 14:21:30 2003
@@ -38,7 +38,7 @@
int m_w;
};
-typedef vector<Edge*> EdgeVec_t;
+typedef std::vector<Edge*> EdgeVec_t;
typedef EdgeVec_t::iterator EdgeVec_it;
class Node : public RNode {
--- routealgo/rbitmap.cc.orig Wed Apr 18 01:30:44 2001
+++ routealgo/rbitmap.cc Sat May 10 14:42:31 2003
@@ -220,12 +220,12 @@
os << " " << m_EPW;
if (m_Words == 1)
{ // Not a pointer, but the actual map
- os << " " << hex << (unsigned long)m_pM << dec;
+ os << " " << std::hex << (unsigned long)m_pM << std::dec;
}
else
{
for (unsigned int i = 0; i < m_Words; i++)
- os << " " << hex << m_pM[i] << dec;
+ os << " " << std::hex << m_pM[i] << std::dec;
}
}
--- routealgo/rlookup.h.orig Wed Apr 18 01:32:10 2001
+++ routealgo/rlookup.h Sat May 10 14:46:10 2003
@@ -23,7 +23,7 @@
RL_NULL, RL_FIXED, RL_BITMAP, RL_HASH, RL_NEXTHOP, RL_LAST}
RLookup_Types;
-typedef pair<nodeid_t, nodeid_t> LookupPair_t; // Node/NextHop Pair
+typedef std::pair<nodeid_t, nodeid_t> LookupPair_t; // Node/NextHop Pair
// Define an abstract base class that specifies functionality needed
class RLookup {
@@ -139,10 +139,10 @@
// The "HashMap" lookup is used when the previous two methods do not work.
// Uses the STL "hash_map" associative container to store non-default routes
#ifdef USE_HASH
-typedef hash_map<nodeid_t, nodeid_t,
- hash<nodeid_t>, equal_to<nodeid_t> > RouteMap_t;
+typedef std::hash_map<nodeid_t, nodeid_t,
+ std::hash<nodeid_t>, std::equal_to<nodeid_t> > RouteMap_t;
#else
-typedef map<nodeid_t, nodeid_t, equal_to<nodeid_t> > RouteMap_t;
+typedef std::map<nodeid_t, nodeid_t, std::equal_to<nodeid_t> > RouteMap_t;
#endif
typedef RouteMap_t::iterator RouteMap_it;
--- diffusion3/apps/gear/geo-routing.hh.orig Sat May 10 15:15:32 2003
+++ diffusion3/apps/gear/geo-routing.hh Sat May 10 15:20:33 2003
@@ -12,7 +12,7 @@
#include <list>
-#ifndef USE_WINSNG2
+#if !defined(USE_WINSNG2) && !defined(__FreeBSD__)
#include <hash_map>
#else
#include <ext/hash_map>
@@ -181,8 +181,12 @@
class GeoRoutingFilter;
+#ifndef __FreeBSD__
typedef hash_map<int, Neighbor_Entry *> Neighbors_Hash;
-typedef list<Pkt_Header *> Packets_List;
+#else
+typedef __gnu_cxx::hash_map<int, Neighbor_Entry *> Neighbors_Hash;
+#endif
+typedef std::list<Pkt_Header *> Packets_List;
class GeoFilterReceive : public FilterCallback {
public:
--- indep-utils/cmu-scen-gen/setdest/Makefile.in.orig Sat May 10 15:23:46 2003
+++ indep-utils/cmu-scen-gen/setdest/Makefile.in Sat May 10 15:23:31 2003
@@ -49,19 +49,19 @@
$(INSTALL) -m 555 -o bin -g bin calcdest $(DESTDIR)$(BINDEST)
setdest: rng.o setdest.o
- $(CC) -o setdest $@.o rng.o $(DEFINE) $(LDFLAGS) $(CFLAGS) \
+ $(CXX) -o setdest $@.o rng.o $(DEFINE) $(LDFLAGS) $(CFLAGS) \
$(LIBS)
calcdest: rng.o calcdest.o
- $(CC) -o calcdest $@.o rng.o $(DEFINE) $(LDFLAGS) $(CFLAGS) \
+ $(CXX) -o calcdest $@.o rng.o $(DEFINE) $(LDFLAGS) $(CFLAGS) \
$(LIBS)
rng.o:
@rm -f $@
- $(CC) -c $(DEFINE) -I../../.. -o $@ ../../../tools/rng.cc
+ $(CXX) -c $(DEFINE) -I../../.. -o $@ ../../../tools/rng.cc
setbox: setbox.o
- $(CC) -o setbox $@.o $(LDFLAGS) $(CFLAGS) $(LIBS)
+ $(CXX) -o setbox $@.o $(LDFLAGS) $(CFLAGS) $(LIBS)
clean:
@rm -f setdest setbox *.o *.core
--- patch-ac ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list