Sun StorageTek 5800 System Client API Reference Guide


Data destination template used to download object data to the cluster.


    typedef long (*write_to_data_destination) 
    (void *cookie, char *buff, long buff_len);


Function pointers of write_to_data_destination type are used to download object data to a network or other destination from the 5800 system server using hc_retrieve_ez. The function pointer and opaque cookie reference are supplied as arguments to hc_retrieve_ez, and the function will be called with the supplied cookie argument to deliver the downloaded data to a local data storage function.

A write_to_data_destination function should write exactly buff_len bytes to the data destination indicated by cookie, reading the bytes from the buffer at location buff. It should return a long value indicating the number of bytes actually processed. A return code that differs from buff_len indicates that the transfer should be terminated.



An opaque data structure to identify this data cookie. The cookie is likely to be an open file descriptor.


Where to copy the data from.


The number of bytes of space in buff.

See Also