Extended the D API to transport functions

- Included also a new example using the D API