Move from naked int to a structure in net.c

Provides more flexibility for future changes/extensions.
3 files changed