reconstruct code, and complete basic function of 'ip packets forwarding'