Use NULL instead of 0 for null arguments.
Fix a cast.
Merge branch '20130421-ip-provider' into 20130427-udp-provider
Merge branch '20130427-udp-provider' into 20130428-tcp-provider