add net.c and net.h
Merge branch 'trunk'