Skip Headers
Oracle Hierarchical Storage Manager and QFS Software Command Reference
Section 3x: Introduction to Library Functions
Release 6.1.1
E70305-03

NAME

sam_getdigest - Returns message-digest hash value for a file over a network connection

SYNOPSIS

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.

DESCRIPTION

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.

RETURN VALUES

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.

RETURN VALUES

Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.

ERRORS

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.

SEE ALSO

sam_getdigest (3x), sam_initrpc (3x), sam_initrpc_timeout (3x), sam_closerpc (3x), sam_settimeout (3x), fixity (7)