api_generic_packet is useless
More sanity checks
Fix wrong pointer type pass on some callback routines
Change default test url
Formatting and user_data tests