core: function for getting the name of a protocol