add ring.c, modify Makefile and hostfile