move more protocol related stuff to ubusd_proto.c