net helper functions

Not used anywhere (yet)