[Reviewer Graeme] Various fixes to support RTR and PPR handling

This should be your changes to `diameterstack.h` and `diameterstack.cpp` that missed the move to cpp-common.  Please confirm, merge and tell Ellie it's done.