network: write network units with user units

This allows us to test the network unit generation as well as removing
some special-cased code.