If you mean
Debth
Based
Routing (DBR) Protocol, then there is no need to implement DBR in ns-3. It is already implemented and available with aquasim-ng extension.
Check the official site of aquasim-ng for the installation procedure
or
You may get an abstract idea about the installation of aquasim-ng on ns-3.38 in this
link.
But you should understand that the default examples available in aquasim-ng will only create flat 2D topology like the below one.
So, to run DBR you need to create a 3D topology like the below one :

Then only it will be meaningful 😊 to run a "
Debth based routing protocol" -DBR
You may get some idea of setting DBR as UWSN routing protocol and setting a suitable mobility model from this
link.
As shown in that example, the DBR routing protocol is set at the line :
asHelper.SetRouting("ns3::AquaSimDBR");
A 3D mobility has been set at the lines :
mobility.SetMobilityModel ("ns3::RandomWalk3dMobilityModel",
"Mode", StringValue ("Time"),
"Time", StringValue ("10s"),
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=25.0]"),
"Bounds", BoxValue (Box (0.0, 300.0, 0.0, 300.0, 0.0, 200.0)));Explore all the examples provided in aqua-sim-ng. You will get the idea of using it.