Prepare udp_driver for unit testing with unit

provided full exports if we are running tests or just public functions
for production code.