From 8695d856a1eb01c168b36ba01f149a0b8ef9574b Mon Sep 17 00:00:00 2001
From: "Peter D. Barnes, Jr."
Date: Thu, 15 Aug 2013 12:01:57 -0700
Subject: [PATCH] Link to bug num in bug database with \bugid{num}
---
CHANGES.html | 4 ++++
doc/doxygen.conf | 3 +++
examples/wireless/wifi-hidden-terminal.cc | 18 +++++++++---------
src/aodv/test/aodv-regression.cc | 9 ++++++---
src/aodv/test/bug-772.h | 2 +-
.../test/udp-client-server-test.cc | 2 +-
src/core/model/int64x64.cc | 3 ++-
src/core/model/log.cc | 6 ++++--
src/core/test/int64x64-test-suite.cc | 6 ++++++
src/dsr/model/dsr-routing.cc | 4 ++--
src/internet/model/arp-l3-protocol.cc | 4 ++--
src/internet/model/nsc-tcp-l4-protocol.cc | 2 +-
src/internet/model/tcp-socket-base.cc | 5 +++--
src/lte/model/epc-enb-application.cc | 6 ++++--
src/lte/model/epc-sgw-pgw-application.cc | 3 ++-
src/mpi/examples/nms-p2p-nix-distributed.cc | 5 +++++
src/network/model/address.cc | 3 ++-
src/network/test/buffer-test.cc | 5 +++--
src/network/test/packet-metadata-test.cc | 9 ++++++---
src/network/test/packet-test-suite.cc | 3 ++-
.../model/ipv4-nix-vector-routing.cc | 3 ++-
src/olsr/test/bug780-test.h | 1 +
src/wifi/test/wifi-test.cc | 7 +++++++
23 files changed, 78 insertions(+), 35 deletions(-)
diff --git a/CHANGES.html b/CHANGES.html
index 4ac3d0926..2909baf2e 100644
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -109,6 +109,10 @@ us a note on ns-developers mailing list.
Changes to build system:
+ - Make references to bug id's in doxygen comments with
+ \bugid{num}, where num is the bug id number. This
+ form will generate a link to the bug in the bug database.
+
Changed behavior:
diff --git a/doc/doxygen.conf b/doc/doxygen.conf
index b24aa1b4e..457007546 100644
--- a/doc/doxygen.conf
+++ b/doc/doxygen.conf
@@ -202,6 +202,9 @@ ALIASES += internal="\par \b Internal:"
# Usage: /** \param [in/out] tag If found, \pname{tag} is ... */
ALIASES += pname{1}="\1"
+# Link to bug tracker
+ALIASES += bugid{1}="Bug \1"
+
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding
# "class=itcl::class" will allow you to use the command class in the
diff --git a/examples/wireless/wifi-hidden-terminal.cc b/examples/wireless/wifi-hidden-terminal.cc
index efddeea42..5dc0a3f3a 100644
--- a/examples/wireless/wifi-hidden-terminal.cc
+++ b/examples/wireless/wifi-hidden-terminal.cc
@@ -109,19 +109,19 @@ void experiment (bool enableCtsRts)
cbrApps.Add (onOffHelper.Install (nodes.Get (0)));
// flow 2: node 2 -> node 1
- // The slightly different start times and data rates are a workround
- // for Bug 388 and Bug 912
- // http://www.nsnam.org/bugzilla/show_bug.cgi?id=912
- // http://www.nsnam.org/bugzilla/show_bug.cgi?id=388
+ /** \internal
+ * The slightly different start times and data rates are a workaround
+ * for \bugid{388} and \bugid{912}
+ */
onOffHelper.SetAttribute ("DataRate", StringValue ("3001100bps"));
onOffHelper.SetAttribute ("StartTime", TimeValue (Seconds (1.001)));
cbrApps.Add (onOffHelper.Install (nodes.Get (2)));
- // we also use separate UDP applications that will send a single
- // packet before the CBR flows start.
- // This is a workround for the lack of perfect ARP, see Bug 187
- // http://www.nsnam.org/bugzilla/show_bug.cgi?id=187
-
+ /** \internal
+ * We also use separate UDP applications that will send a single
+ * packet before the CBR flows start.
+ * This is a workaround for the lack of perfect ARP, see \bugid{187}
+ */
uint16_t echoPort = 9;
UdpEchoClientHelper echoClientHelper (Ipv4Address ("10.0.0.2"), echoPort);
echoClientHelper.SetAttribute ("MaxPackets", UintegerValue (1));
diff --git a/src/aodv/test/aodv-regression.cc b/src/aodv/test/aodv-regression.cc
index f68f13725..4b4255cd8 100644
--- a/src/aodv/test/aodv-regression.cc
+++ b/src/aodv/test/aodv-regression.cc
@@ -57,11 +57,14 @@ public:
SetDataDir (NS_TEST_SOURCEDIR);
// General RREQ-RREP-RRER test case
AddTestCase (new ChainRegressionTest ("aodv-chain-regression-test"), TestCase::QUICK);
- // Bug 606 test case, should crash if bug is not fixed
+ /// \internal
+ /// \bugid{606} test case, should crash if bug is not fixed
AddTestCase (new ChainRegressionTest ("bug-606-test", Seconds (10), 3, Seconds (1)), TestCase::QUICK);
- // Bug 772 UDP test case
+ /// \internal
+ /// \bugid{772} UDP test case
AddTestCase (new Bug772ChainTest ("udp-chain-test", "ns3::UdpSocketFactory", Seconds (3), 10), TestCase::QUICK);
- // Bug 772 TCP test case
+ /// \internal
+ /// \bugid{772} TCP test case
AddTestCase (new Bug772ChainTest ("tcp-chain-test", "ns3::TcpSocketFactory", Seconds (3), 10), TestCase::QUICK);
// Ping loopback test case
AddTestCase (new LoopbackTestCase (), TestCase::QUICK);
diff --git a/src/aodv/test/bug-772.h b/src/aodv/test/bug-772.h
index 4f2e60607..3891e3fb1 100644
--- a/src/aodv/test/bug-772.h
+++ b/src/aodv/test/bug-772.h
@@ -31,7 +31,7 @@ namespace aodv {
/**
* \ingroup aodv
*
- * \brief AODV deferred route lookup test case (see bug 772)
+ * \brief AODV deferred route lookup test case (see \bugid{772})
*
* \todo describe expected packet trace
*/
diff --git a/src/applications/test/udp-client-server-test.cc b/src/applications/test/udp-client-server-test.cc
index c767bbc15..b38f0bd6c 100644
--- a/src/applications/test/udp-client-server-test.cc
+++ b/src/applications/test/udp-client-server-test.cc
@@ -257,7 +257,7 @@ void PacketLossCounterTestCase::DoRun (void)
}
/**
- * Test fix for bug 1378
+ * Test fix for \bugid{1378}
*/
class UdpEchoClientSetFillTestCase : public TestCase
diff --git a/src/core/model/int64x64.cc b/src/core/model/int64x64.cc
index fd04f16ea..b83c4a0fe 100644
--- a/src/core/model/int64x64.cc
+++ b/src/core/model/int64x64.cc
@@ -43,7 +43,8 @@ std::ostream &operator << (std::ostream &os, const int64x64_t &value)
// Save stream format flags
std::ios_base::fmtflags ff = os.flags ();
- { // See bug 1737: gcc libstc++ 4.2 bug
+ { /// \internal
+ /// See \bugid{1737}: gcc libstc++ 4.2 bug
if (hi == 0)
{
os << '+';
diff --git a/src/core/model/log.cc b/src/core/model/log.cc
index c30aa2009..2c6601065 100644
--- a/src/core/model/log.cc
+++ b/src/core/model/log.cc
@@ -558,8 +558,10 @@ static void CheckEnvironmentVariables (void)
void LogSetTimePrinter (LogTimePrinter printer)
{
g_logTimePrinter = printer;
- // This is the only place where we are more or less sure that all log variables
- // are registered. See bug 1082 for details.
+ /** \internal
+ * This is the only place where we are more or less sure that all log variables
+ * are registered. See \bugid{1082} for details.
+ */
CheckEnvironmentVariables();
}
LogTimePrinter LogGetTimePrinter (void)
diff --git a/src/core/test/int64x64-test-suite.cc b/src/core/test/int64x64-test-suite.cc
index b7f97e91e..4208bf50e 100644
--- a/src/core/test/int64x64-test-suite.cc
+++ b/src/core/test/int64x64-test-suite.cc
@@ -170,6 +170,9 @@ Int64x64ArithmeticTestCase::DoRun (void)
CHECK_EXPECTED (V (2000000000) / V (3) * V (3), 1999999999);
}
+/**
+ * See \bugid{455}
+ */
class Int64x64Bug455TestCase : public TestCase
{
public:
@@ -201,6 +204,9 @@ Int64x64Bug455TestCase::DoRun (void)
NS_TEST_ASSERT_MSG_EQ (a.GetDouble (), -2.5, "only second operand negative");
}
+/**
+ * See \bugid{863}
+ */
class Int64x64Bug863TestCase : public TestCase
{
public:
diff --git a/src/dsr/model/dsr-routing.cc b/src/dsr/model/dsr-routing.cc
index 96980c554..552f5735c 100644
--- a/src/dsr/model/dsr-routing.cc
+++ b/src/dsr/model/dsr-routing.cc
@@ -489,11 +489,11 @@ void DsrRouting::NotifyDataReceipt (std::string context, Ptr p)
return;
}
newP->RemoveHeader(llc);
- /*
+ /** \internal
* Tried to use peekheader here, but for ipv4 header here,
* dsr removes the Ipv4Header and then pass the packet and the header
* separately to Ipv4L3Protocol. Ipv4L3Protocol then re-adds them
- * together, which causes the problem. Check Bug 1479
+ * together, which causes the problem. Check \bugid{1479}
*/
ArpHeader arp;
if(newP->PeekHeader (arp))
diff --git a/src/internet/model/arp-l3-protocol.cc b/src/internet/model/arp-l3-protocol.cc
index b1429e34b..715e6a193 100644
--- a/src/internet/model/arp-l3-protocol.cc
+++ b/src/internet/model/arp-l3-protocol.cc
@@ -187,9 +187,9 @@ ArpL3Protocol::Receive (Ptr device, Ptr p, uint16_t pro
NS_LOG_LOGIC (cache->GetInterface ()->GetAddress (i).GetLocal () << ", ");
}
- /**
+ /** \internal
* Note: we do not update the ARP cache when we receive an ARP request
- * from an unknown node. See bug #107
+ * from an unknown node. See \bugid{107}
*/
bool found = false;
for (uint32_t i = 0; i < cache->GetInterface ()->GetNAddresses (); i++)
diff --git a/src/internet/model/nsc-tcp-l4-protocol.cc b/src/internet/model/nsc-tcp-l4-protocol.cc
index 5f9e55e8b..dec8a4e20 100644
--- a/src/internet/model/nsc-tcp-l4-protocol.cc
+++ b/src/internet/model/nsc-tcp-l4-protocol.cc
@@ -450,7 +450,7 @@ void NscTcpL4Protocol::AddInterface (void)
// IP address of the subnet but this was found to fail for
// some use cases in /30 subnets.
- /// \todo Bug 1398 NSC's limitation to single-interface nodes
+ /// \todo \bugid{1398} NSC's limitation to single-interface nodes
m_nscStack->add_default_gateway (addrOss.str ().c_str ());
}
}
diff --git a/src/internet/model/tcp-socket-base.cc b/src/internet/model/tcp-socket-base.cc
index 45ff45178..87c641396 100644
--- a/src/internet/model/tcp-socket-base.cc
+++ b/src/internet/model/tcp-socket-base.cc
@@ -446,8 +446,9 @@ int
TcpSocketBase::Close (void)
{
NS_LOG_FUNCTION (this);
- // First we check to see if there is any unread rx data
- // Bug number 426 claims we should send reset in this case.
+ /// \internal
+ /// First we check to see if there is any unread rx data.
+ /// \bugid{426} claims we should send reset in this case.
if (m_rxBuffer.Size () != 0)
{
NS_LOG_INFO ("Socket " << this << " << unread rx data during close. Sending reset");
diff --git a/src/lte/model/epc-enb-application.cc b/src/lte/model/epc-enb-application.cc
index a5cf7ab36..cf3efc1ac 100644
--- a/src/lte/model/epc-enb-application.cc
+++ b/src/lte/model/epc-enb-application.cc
@@ -243,7 +243,8 @@ EpcEnbApplication::RecvFromLteSocket (Ptr socket)
NS_ASSERT (socket == m_lteSocket);
Ptr packet = socket->Recv ();
- // workaround for bug 231 https://www.nsnam.org/bugzilla/show_bug.cgi?id=231
+ /// \internal
+ /// Workaround for \bugid{231}
SocketAddressTag satag;
packet->RemovePacketTag (satag);
@@ -279,7 +280,8 @@ EpcEnbApplication::RecvFromS1uSocket (Ptr socket)
std::map::iterator it = m_teidRbidMap.find (teid);
NS_ASSERT (it != m_teidRbidMap.end ());
- // workaround for bug 231 https://www.nsnam.org/bugzilla/show_bug.cgi?id=231
+ /// \internal
+ /// Workaround for \bugid{231}
SocketAddressTag tag;
packet->RemovePacketTag (tag);
diff --git a/src/lte/model/epc-sgw-pgw-application.cc b/src/lte/model/epc-sgw-pgw-application.cc
index 681679220..75cdfde8f 100644
--- a/src/lte/model/epc-sgw-pgw-application.cc
+++ b/src/lte/model/epc-sgw-pgw-application.cc
@@ -176,7 +176,8 @@ EpcSgwPgwApplication::RecvFromS1uSocket (Ptr socket)
packet->RemoveHeader (gtpu);
uint32_t teid = gtpu.GetTeid ();
- // workaround for bug 231 https://www.nsnam.org/bugzilla/show_bug.cgi?id=231
+ /// \internal
+ /// Workaround for \bugid{231}
SocketAddressTag tag;
packet->RemovePacketTag (tag);
diff --git a/src/mpi/examples/nms-p2p-nix-distributed.cc b/src/mpi/examples/nms-p2p-nix-distributed.cc
index 1841edfc6..36dfe47c0 100644
--- a/src/mpi/examples/nms-p2p-nix-distributed.cc
+++ b/src/mpi/examples/nms-p2p-nix-distributed.cc
@@ -62,6 +62,11 @@ typedef struct timeval TIMER_TYPE;
NS_LOG_COMPONENT_DEFINE ("CampusNetworkModelDistributed");
+ /**
+ * \internal
+ * \c #defines for \c nCN and \c nLANClients are a temporary fix,
+ * see \bugid{1560}
+ */
int
main (int argc, char *argv[])
{
diff --git a/src/network/model/address.cc b/src/network/model/address.cc
index b537d9995..5223ef54c 100644
--- a/src/network/model/address.cc
+++ b/src/network/model/address.cc
@@ -123,7 +123,8 @@ Address::CheckCompatible (uint8_t type, uint8_t len) const
{
NS_LOG_FUNCTION (this << static_cast (type) << static_cast (len));
NS_ASSERT (len <= MAX_SIZE);
- // Mac address type/length detection is discussed in bug 1568
+ /// \internal
+ /// Mac address type/length detection is discussed in \bugid{1568}
return (m_len == len && m_type == type) || (m_len >= len && m_type == 0);
}
bool
diff --git a/src/network/test/buffer-test.cc b/src/network/test/buffer-test.cc
index 57e488a23..def6dbced 100644
--- a/src/network/test/buffer-test.cc
+++ b/src/network/test/buffer-test.cc
@@ -243,7 +243,8 @@ BufferTest::DoRun (void)
i.Prev (100);
i.WriteU8 (1, 100);
- // Bug #54
+ /// \internal
+ /// See \bugid{54}
{
const uint32_t actualSize = 72602;
const uint32_t chunkSize = 67624;
@@ -301,7 +302,7 @@ BufferTest::DoRun (void)
i.Write (buffer.Begin (), buffer.End ());
ENSURE_WRITTEN_BYTES (other, 9, 0x1, 0x2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3, 0x4);
- // BUG #1001
+ /// \internal See \bugid{1001}
std::string ct ("This is the next content of the buffer.");
buffer = Buffer ();
buffer.AddAtStart (ct.size ());
diff --git a/src/network/test/packet-metadata-test.cc b/src/network/test/packet-metadata-test.cc
index 762b39433..1066739fd 100644
--- a/src/network/test/packet-metadata-test.cc
+++ b/src/network/test/packet-metadata-test.cc
@@ -696,7 +696,8 @@ PacketMetadataTest::DoRun (void)
p = Create (16384);
- // bug 179.
+ /// \internal
+ /// See \bugid{179}
p = Create (40);
p2 = p->CreateFragment (5, 5);
p3 = p->CreateFragment (10, 30);
@@ -768,7 +769,8 @@ PacketMetadataTest::DoRun (void)
p->RemoveAtStart (10);
CHECK_HISTORY (p, 1, 490);
- // bug 1072
+ /// \internal
+ /// See \bugid{1072}
p = Create (500);
ADD_HEADER (p, 10);
ADD_HEADER (p, 20);
@@ -778,7 +780,8 @@ PacketMetadataTest::DoRun (void)
p2 = p->CreateFragment (6,535-6);
p1->AddAtEnd (p2);
- // bug 1072#2
+ /// \internal
+ /// See \bugid{1072}
p = Create (reinterpret_cast ("hello world"), 11);
ADD_HEADER (p, 2);
CHECK_HISTORY (p, 2, 2, 11);
diff --git a/src/network/test/packet-test-suite.cc b/src/network/test/packet-test-suite.cc
index 882cc4365..343a4b799 100644
--- a/src/network/test/packet-test-suite.cc
+++ b/src/network/test/packet-test-suite.cc
@@ -437,7 +437,8 @@ PacketTest::DoRun (void)
}
{
- // bug 572
+ /// \internal
+ /// See \bugid{572}
Ptr tmp = Create (1000);
tmp->AddByteTag (ATestTag<20> ());
CHECK (tmp, 1, E (20, 0, 1000));
diff --git a/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc b/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc
index 76118054f..8706c51a0 100644
--- a/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc
+++ b/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc
@@ -136,7 +136,8 @@ Ipv4NixVectorRouting::GetNixVector (Ptr source, Ipv4Address dest, Ptr