net: Introduce read_pnet() and write_pnet() helpers