
Synchronous C API Functions
Description
This function initializes the 5800 system API and must be called before calling any of the other functions in this API. It downloads a copy of the schema for a particular host or port. The schema is used to validate the
Both the synchronous and the nonsynchronous C APIs are fully
Note – hc_init should be called once per process before any thread calls
hc_session_create_ez. If hc_session_create_ez is called before hc_init, an implicit call is made to hc_init from that thread. But that call to hc_init is not interlocked with other threads, and it uses the C API shared library’s version of malloc and free, which might be different than the application’s version of malloc and free. It is strongly recommended that all applications call hc_init once per process with their own allocator and deallocator.
For more information on hc_init, see “Initializing a Global Session” on page 41
Parameters
host
IN: The name or IP address of a 5800 system server.
port
IN: The port number of the 5800 system server (normally 8080).
sessionp
OUT: Updated to point to a session object.
Return Codes
HCERR_OK
HCERR_BAD_REQUEST
HCERR_OOM
HCERR_ILLEGAL_ARGUMENT
54 | Sun StorageTek 5800 System Client API Reference Manual • June 2008 |