add peer side send and recv function to pkt.c