IN: The session for the host and port to talk to.
IN: The source of data to be stored. See read_from_data_source.
IN: An opaque data structure (cookie) to be provided to data_source_reader. For example, this could be a file descriptor.
IN: Pointer to a name-value record with the metadata.
OUT: Returned descriptor of a stored metadata record.