I am fairly happy with the example codel code that is now in the ns3 branch, which is pure c++, and quite a bit easier to understand than tcl, to my eye. https://www.nsnam.org/doxygen/codel-vs-droptail-asymmetric_8cc.html regrettably the fq_codel version for ns3 is still out of tree.