Get these arguments the right way round.
Make this trace more accurate and readable.
Get this function right.

Terminate strings properly and get the last field right.
Fix this function.

No more looping of recvfrom() because that's not how UDP works.
More error reporting.
Fix levels of pointer indirection.
Change CC setting to not be conditional.

I'm sure this works on some systems (make versions?) but on this one the CC ?= clang line doesn't seem to be having an effect. I guess this is because CC is considered set already, by the system. This change means one can't change compiler in a sub-makefile, but that probably shouldn't be a per-build configuration thing anyway.
What to do, and ways to do it.