Add network permission and helper functions.