os_net fixes

fix some compiler warnings and tighten function headers