create a common function for parsing buffers of same type
events for receiving inventory and addresses