Cdp uses the new socket api

Adapted cdp to use the new socket api if the backend used is Linux.

Signed-off-by: Mihaela Martinas <martinas.mihaela21@gmail.com>