This happens because, after updating OS, the library /usr/include/c++/11/bits/
stl_algobase.h receives functions max() and min() that have the same function names
used by the TCP protocol in NS-2. The affected files are located within the folders
∼/ns-allinone-2.34/ns-2.34/tcp: template.h, tcp-asym-sink.cc, tcp-asym.cc,
tcp-full.cc, tcp-linux.cc, tcp-session.cc, chost.cc, ack-recons.cc, and
snoop.h; ∼/ns-allinone-2.34/ns-2.34/baytcp/: tcp-full-bay.cc; ∼/ns-allinone-
2.34/ns-2.34/rap/: media-app.cc; and ∼/ns-allinone-2.34/ns-2.34/queue/: red.cc.
Error Solution in Linux Mint and Derivatives:
Open the following files: template.h, tcp-asym-sink.cc, tcp-asym.cc,
tcp-full.cc, tcp-linux.cc, tcp-session.cc, chost.cc, ack-recons.cc,
snoop.h, tcp-full-bay.cc, media-app.cc, and red.cc (e.g. located in
~/ns-allinone-2.34/ns-2.34/tcp; ~/ns-allinone-2.34/ns-2.34/baytcp/,
~/ns-allinone-2.34/ns-2.34/rap/, and ~/ns-allinone-2.34/ns-2.34/queue/)
and replace the max() and min() functions with max_( ) min_(). Ex:
Replace max(latest_susp_loss, cur->sessionSeqno_) with max_(latest_susp
_loss, cur->sessionSeqno_).
After making all the substitutions, recompile NS-2 and the problem will be solved;