sam_getdigest - Returns message-digest hash value for a file over a network connection
cc [
flag
… ]
file
… -L∕opt∕SUNWsamfs∕lib -lsamrpc [ -lnsl ] [
library … ]
#include "∕opt∕SUNWsamfs∕include∕lib.h"
int sam_getdigest(const char *
path,
char *
digest,
int
size );
The
-lnsl
is needed after the
-lsamrpc
when building on Solaris systems.
This is the RPC-based version of
sam_getdigest
(3x).
sam_getdigest
(3x)
returns a file's message-digest hash value as a ASCII character string by
sending a request to the Oracle HSM RPC server, sam-rpcd
.
If the server machine is different from the local machine, path must be an absolute path. If the server machine is the local machine, path may be an absolute path or relative to the user's current working directory.
A call to
sam_initrpc
(3x)
or
sam_initrpc_timeout
(3x)
must be issued before these calls.
Upon successful completion a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. The inode generation number.
Upon successful completion, a value of 0
is returned.
Otherwise, a value of -1
is returned and errno
is set to indicate the error.
EDESTADDRREQ
sam_initrpc
was not successfully called, as required, before making this call.
EINVAL
path is not an absolute pathname and the server (SAMHOST) machine is not the same as the local machine.
ETIMEDOUT
The operations performed on path exceeded the RPC call timeout value.