Added some internal utility functions in protocol.rs in preparation for support of the rest of the native protocol extraction functions.