build PDDI plugin, almostly finish marshaling and unmarshaling