Added some typedefs for thincrust and also included the protocol entry functions.