ctp: add ctp api source code

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>