[dtport] switch dtport to c++