fixed some function in src/proto/tcp.cc and misc