Classes | Defines | Typedefs | Enumerations | Functions | Variables

Common, basic classes, functions and types
[Common modules]

Entities that are used widely accross the IVD product. More...

Collaboration diagram for Common, basic classes, functions and types:

Classes

class  cmn_DirLst
 DirLst class could list (return) directory entries by its name. More...
class  cmn_FastDirLst
 class cmn_FastDirLst is a differrent inplementation of cmn_DirLst class it use getdents instead of readdir on Linux. More...
class  cmn_File
 Basic (super) class for File IO. More...
class  cmn_Global
class  cmn_LockID< _T >
 Is a template to lock object by its ID. More...
class  cmn_IDOwn< _T >
 is used as LockIDhash element. More...
class  cmn_LockIDbyOwn< _T, _size >
class  cmn_LockIDHash< _V, _T >
 Template cmn_LockIDHash use many small cmn_LockIDbyOwn classes to store lock elements. More...
class  cmn_SysInfo
class  cmn_Time
struct  fname_inode_t
class  cmn_TreeWalk
class  cmn_UTF8Converter
 Converts from a specified code page to UTF-8 and back. More...
struct  ivd_hsmattr_t
 HSM Attributes - stored in IVD file system (typically as EA). More...
class  ivd_Directories
class  ivd_Product
class  ivd_ModVersion
class  ivd_Versions
class  ivd_BaseException
 The base exception class. More...
class  ivd_Exception
 Root exception class, used in IVD. More...
class  ivd_InternalError
 ivd_InternalError is thrown when an unexpected critical situation is detected. More...
class  ivd_SysError
 system errors. More...
class  ivd_Error
 ivd_Error is thrown when an IVD erroneous situation is detected. More...
class  ivd_DFError
struct  ivd_FileSystemSize_t
 File System sizes - platform independant structure. More...
struct  cmn_FileInfo_t
class  stx_CacheEl
class  stx_CacheElRef
class  stx_CacheVec
class  stx_Cache
 stx_CacheEl objects. More...
class  stx_CacheArray< _MaxCacheSize >
class  stx_CacheArrayOfRefEl< _MaxCacheSize >
class  stx_XStack
 stored in stack when some one need an ID ask IDmgr. More...
class  cmn_LockOwn
class  stx_GroupOfEl< _T, _defGroupEl >
 vector of _size number reserved elements with reference to owner More...
class  stx_Groups< _G, _T >
 Each owner reserve a groupID as handler to access to stx_Groups. More...
class  stx_Stream
 Base class to for IVD specific streams. More...
class  cmn_Mutex
 Mutex Class implemented in cmn_thread.cpp. More...
class  cmn_MutexLock
 cmn_MutexLock Automatic Mutex Class More...
class  cmn_Condition
class  cmn_Semaphore
class  cmn_SemaphoreLock
class  cmn_Thread
 Platform independent class for handling execution threads. More...
class  cmn_oneWRmanyRD
class  cmn_WantReadLock
class  cmn_WantWriteLock
class  cmn_ThreadCounter
class  cmn_UUID_t
 Struct encapsulates UUID generation, comparison, copying, making string versions,... More...
struct  UInt48_t

Defines

#define ivd_MIN_BLOCK_SIZE_KB   (32)
 Smallest reasonable data block size.
#define ivd_MAX_BLOCK_SIZE_KB   (16384)
 Largest block size supported by SCSI subsystem.
#define ivd_MIN_BLOCK_SIZE   (ivd_MIN_BLOCK_SIZE_KB*1024)
#define ivd_MAX_BLOCK_SIZE   (ivd_MAX_BLOCK_SIZE_KB*1024)
#define ivd_MAX_HOSTNAME_SIZE   (192)
 Max hostname size is less than RFC size because of IVD internal database restrictions.
#define ivd_MAX_HOSTNAME_IDENTIFIER_SIZE   (63)
#define ivd_MAX_FILENAME   (255)
#define ivd_MAX_PATHNAME   (4096)
#define ivd_UUID_SIZE_d   (16)
#define ivd_UUID_STR_SIZE_d   (36)
#define fom_READ   (1 << 0)
 File open mode/flags (bit flags).
#define fom_WRITE   (1 << 1)
#define fom_READWRITE   (fom_READ|fom_WRITE)
#define fom_OPEN_EXISTING   (1 << 4)
 Create disposition.
#define fom_OPEN_ALWAYS   (1 << 5)
#define fom_CREATE_NEW   (1 << 6)
#define fom_CREATE_ALWAYS   (1 << 7)
#define fom_STREAM   (1 << 8)
 File stream I/O.
#define fom_STREAM_NO_DATA   (1 << 9)
#define fom_NO_BUFFERING   (1 << 10)
#define fom_APPEND   (1 << 11)
#define fom_LINK   (1 << 12)
#define fom_FILE_NO_SHARE_READ   (1 << 13)
 Share flags.
#define fom_FILE_NO_SHARE_WRITE   (1 << 14)
#define fom_DEFAULT_MODE_d   (fom_READWRITE | fom_OPEN_EXISTING)
 Default mode for OpenF(): read/write and open existing file (used when OpenF() is called without parameter).
#define fom_READ_MODE_d   (fom_READ | fom_OPEN_EXISTING)
 Read mode for OpenF(): read and open existing file.
#define stt_NONE   0
 File stream types.
#define stt_DATA   1
#define stt_ALTDATA   2
#define stt_META   3
#define stn_WIN_SECURITY   "WIN.SEC"
 File stream names/IDs.
#define stn_WIN_EA   "WIN.EA"
#define stn_WIN_LINK   "WIN.LINK"
#define stn_WIN_OBJID   "WIN.OBJID"
#define stn_WIN_PROPERTY   "WIN.PROPERTY"
#define stn_WIN_REPARSE   "WIN.REPARSE"
#define stn_WIN_SPARSE   "WIN.SPARSE"
#define ToUInt64(_h, _l)   ((static_cast<UInt64_t>(_h) << 32) | _l)
#define UInt64ToFILETIME_m(_ui, _ft)
#define elementIsNotLocked_d   -9999
 Class lock ID by owner or individual.
#define cmn_EXEC_WAIT   (1 << 0)
 Flags for cmn_ExecCommand functions.
#define cmn_EXEC_GET_STDOUT   (1 << 1)
#define cmn_EXEC_GET_STDERR   (1 << 2)
#define __hpux__
#define __hppa__
#define __OSVERSION__   = 11
#define _INCLUDE_STDC__SOURCE_199901
#define LLONG_MAX   (9223372036854775807LL)
#define LLONG_MIN   (-9223372036854775807LL -1)
#define ULLONG_MAX   (18446744073709551615ULL)
#define PATH_SEPARATOR   '/'
#define WRONG_PATH_SEPARATOR   '\\'
#define WRONG_CHARS_IN_PATH   ""
#define IVD_MAX_PATH   32767
#define O_BINARY   0
#define ivd_GETTID   pthread_self
#define ivd_THREAD_EQUAL(_th1, _th2)   (pthread_equal(_th1, _th2))
#define ivd_STAT(_file, _data)   ::stat(_file, _data)
#define ivd_Sleep(_sleepInSeconds)   ::sleep(_sleepInSeconds)
#define ivd_USleep(_sleepInMicroSec)   ::usleep(_sleepInMicroSec)
#define ivd_FTime(_tp)   ::ftime(_tp)
#define _LARGEFILE64_SOURCE
#define _FILE_OFFSET_BITS   64
#define _tmain   main
#define _TCHAR   char
#define UTF8_TO_CONSOLE(_str)   (cmn_UTF8ToLocale(string(_str)))
#define CONSOLE_TO_UTF8(_str)   (cmn_LocaleToUTF8(string(_str)))
#define IVD_IPC_DECL_d
#define IVD_CMN_DECL_d
#define IVD_PARSER_DECL_d
#define IVD_FILEIO_DECL_d
#define IVD_DF_DECL_d
#define IVD_UI_DECL_d
#define IVD_RMDB_DECL_d
#define IVD_FSC_DECL_d
#define IVD_JOBS_DECL_d
#define IVD_FSLIB_DECL_d
#define IVD_FSAPI_DECL_d
#define IVD_HSMDB_DECL_d
#define IVD_SCSI_DECL_d
#define IVD_UT_DECL_d
#define ia_HSMATTR_NAME   "user.IVD"
 HSM Attributes name - used for naming IVD attributes (for example is stored in FS's Extended attributes).
#define ia_F_DIRTY   fs_DIRTY
 File Status Flags.
#define ia_F_OFFLINE   fs_OFFLINE
#define ivd_NULLCHK_m(_pointer, _type)
#define CATCH_ALL_IVD_EXCEPTION
#define ivd_ATTR_d   ( 1 << 0 )
 data/stream type masks (only 4-bit in FSC!)
#define ivd_META_d   ( 1 << 1 )
#define ivd_ALTDATA_d   ( 1 << 2 )
#define ivd_DATA_d   ( 1 << 3 )
#define ivd_MAX_NUM_OF_DIF_VECTOR_IN_REL_FILES_d   256
#define ivd_SIZE_OF_FIO_VECTOR_QUALIFERS_d   8
#define ivd_MAX_STREAM_SIZE(_recordSize)   (_recordSize * ivd_MAX_NUM_OF_DIF_VECTOR_IN_REL_FILES_d) - ivd_SIZE_OF_FIO_VECTOR_QUALIFERS_d
#define IVD_FILE_ID_FS(_ino, _gen)   (((UInt64_t)(_gen) << 32) + (_ino))
 ID of file in UNIX filesystem = inode number + generation number.
#define IVD_FILE_INO(_id_fs)   ((UInt32_t)(_id_fs & 0xFFFFFFFF))
#define IVD_FILE_GEN(_id_fs)   ((UInt32_t)(_id_fs >> 32))
#define CHG_CLEAN_d   0x0000
#define CHG_CREATE_d   0x0001
#define CHG_DELETED_d   0x0002
#define CHG_NAMEOWN_d   0x0004
#define CHG_DATA_d   0x0100
#define CHG_ATTR_d   0x0200
#define CHG_META_d   0x0400
#define CHG_ALTDATA_d   0x0800
#define CHG_CHGSTREAM_d   0x0D00
#define CHG_CHGFILE_d   0x0F00
#define __linux__
#define __x86__
#define __OSVERSION__   = 2
#define __STRICT_ANSI__   1
#define _XOPEN_SOURCE   600
#define _BSD_SOURCE   1
#define _REENTRANT
#define _LARGEFILE64_SOURCE
#define _FILE_OFFSET_BITS   64
#define LLONG_MAX   (0x7FFFFFFFFFFFFFFFLL)
#define LLONG_MIN   (-LONG_LONG_MAX - 1LL)
#define ULLONG_MAX   (0xFFFFFFFFFFFFFFFFULL)
#define PATH_SEPARATOR   '/'
#define WRONG_PATH_SEPARATOR   '\\'
#define WRONG_CHARS_IN_PATH   ""
#define IVD_MAX_PATH   32767
#define O_BINARY   0
#define ivd_GETTID   pthread_self
#define ivd_THREAD_EQUAL(_th1, _th2)   (pthread_equal(_th1, _th2))
#define ivd_STAT(_file, _data)   ::stat(_file, _data)
#define ivd_Sleep(_sleepInSeconds)   ::sleep(_sleepInSeconds)
#define ivd_USleep(_sleepInMicroSec)   ::usleep(_sleepInMicroSec)
#define ivd_FTime(_tp)   ::ftime(_tp)
#define _tmain   main
#define _TCHAR   char
#define UTF8_TO_CONSOLE(_str)   (cmn_UTF8ToLocale(string(_str)))
#define CONSOLE_TO_UTF8(_str)   (cmn_LocaleToUTF8(string(_str)))
#define IVD_IPC_DECL_d
#define IVD_CMN_DECL_d
#define IVD_PARSER_DECL_d
#define IVD_FILEIO_DECL_d
#define IVD_DF_DECL_d
#define IVD_UI_DECL_d
#define IVD_RMDB_DECL_d
#define IVD_FSC_DECL_d
#define IVD_JOBS_DECL_d
#define IVD_FSLIB_DECL_d
#define IVD_FSAPI_DECL_d
#define IVD_HSMDB_DECL_d
#define IVD_SCSI_DECL_d
#define CMN_HL7_DECL_d
#define IVD_UT_DECL_d
#define _VER(_major, _minor, _patch)   (((_major) << 24) + ((_minor) << 16) + (_patch))
#define _VER_MAJOR(_ver)   ((_ver) >> 24)
#define _VER_MINOR(_ver)   (((_ver) >> 16) & 0xFF)
#define _VER_PATCH(_ver)   ((_ver) & 0xFFFF)
#define IVD_POSIX_OS   1
#define IVD_ENDIAN_LITTLE   (TGT_ARCH_ia32) || (TGT_ARCH_amd64)
#define IVD_ENDIAN_BIG   !(IVD_ENDIAN_LITTLE)
#define cmn_OFFSETOF(_T, _M)   offsetof(_T, _M)
#define cmn_JOIN(A, B)   cmn_DO_JOIN(A, B)
#define cmn_DO_JOIN(A, B)   cmn_DO_JOIN2(A, B)
#define cmn_DO_JOIN2(A, B)   A##B
#define __NT__
#define __x86__
#define __OSVERSION__   5
#define __WIN32__
#define _WIN32_WINNT   0x0500
#define PATH_SEPARATOR   '\\'
#define WRONG_PATH_SEPARATOR   '/'
#define WRONG_CHARS_IN_PATH   "*?<>|\""
#define IVD_MAX_PATH   32767
#define LLONG_MIN   _I64_MIN
#define LLONG_MAX   _I64_MAX
#define ULLONG_MAX   _UI64_MAX
#define ivd_GETTID()   GetCurrentThreadId()
#define ivd_THREAD_EQUAL(_th1, _th2)   ((_th1)==(_th2))
#define ivd_STAT(_file, _data)   _stat(_file, _data)
#define ivd_FTime(_tp)   _ftime((_timeb *)(_tp))
#define ivd_Sleep(_sleepInSeconds)   ::Sleep((DWORD)(1000*(_sleepInSeconds)))
#define ivd_USleep(_sleepInMicroSec)   ::Sleep((DWORD)(_sleepInMicroSec)/1000 + 1)
#define strncasecmp(s1, s2, count)   _strnicmp(s1, s2, count)
#define strcasecmp(s1, s2)   _stricmp(s1, s2)
#define snprintf   _snprintf
#define isatty(_h)   _isatty(_h)
#define strtoll(_s, _e, _b)   _strtoi64(_s, _e, _b)
#define strtoull(_s, _e, _b)   _strtoui64(_s, _e, _b)
#define UTF8_TO_CONSOLE(_str)   cmn_MultiByteToOEMString(_str)
#define CONSOLE_TO_UTF8(_str)   cmn_OEMStringToMultiByte(_str)
#define IVD_IPC_DECL_d   __declspec(dllimport)
#define IVD_IPC_EXPIMP_d   extern
#define IVD_CMN_DECL_d   __declspec(dllimport)
#define IVD_CMN_EXPIMP_d   extern
#define IVD_PARSER_DECL_d   __declspec(dllimport)
#define IVD_PARSER_EXPIMP_d   extern
#define IVD_FILEIO_DECL_d   __declspec(dllimport)
#define IVD_FILEIO_EXPIMP_d   extern
#define IVD_DF_DECL_d   __declspec(dllimport)
#define IVD_DF_EXPIMP_d   extern
#define IVD_UI_DECL_d   __declspec(dllimport)
#define IVD_UI_EXPIMP_d   extern
#define IVD_RMDB_DECL_d   __declspec(dllimport)
#define IVD_RMDB_EXPIMP_d   extern
#define IVD_FSC_DECL_d   __declspec(dllimport)
#define IVD_FSC_EXPIMP_d   extern
#define IVD_JOBS_DECL_d   __declspec(dllimport)
#define IVD_JOBS_EXPIMP_d   extern
#define IVD_FSLIB_DECL_d   __declspec(dllimport)
#define IVD_FSAPI_DECL_d   __declspec(dllimport)
#define IVD_FSAPI_EXPIMP_d   extern
#define CMN_HL7_DECL_d   __declspec(dllimport)
#define CMN_HL7_EXPIMP_d   extern
#define IVD_HSMDB_DECL_d   __declspec(dllimport)
#define IVD_HSMDB_EXPIMP_d   extern
#define IVD_SCSI_DECL_d   __declspec(dllimport)
#define IVD_SCSI_EXPIMP_d   extern
#define IVD_UT_DECL_d   __declspec(dllimport)
#define IVD_UT_EXPIMP_d   extern
#define IVD_API_DECL_d   __declspec(dllimport)
#define IVD_API_EXPIMP_d   extern

Typedefs

typedef vector< fname_inode_tfname_inode_vec_t
typedef vector< fname_inode_vec_tfname_inode_vec_vec_t
typedef uint64_t UInt64_t
typedef uint32_t UInt32_t
typedef uint16_t UInt16_t
typedef uint8_t UInt8_t
typedef int64_t Int64_t
typedef int32_t Int32_t
typedef int16_t Int16_t
typedef int8_t Int8_t
typedef pthread_t ivd_ThreadID_t
typedef struct stat ivd_Stat_t
typedef int ivd_FileHandle_t
typedef size_t ivd_FileBufSize_t
typedef ssize_t ivd_FileRetSize_t
typedef off64_t ivd_FilePosition_t
typedef off64_t ivd_FileSize_t
typedef time_t ivd_Time32_t
typedef DIR * ivd_DirHandle_t
typedef UInt64_t ivd_Time_t
typedef UInt32_t ivd_RecordIDX_t
typedef UInt32_t ivd_PartitionID_t
typedef ivd_RecordIDX_t ivd_FileID_t
typedef UInt16_t ivd_VectorSize_t
typedef UInt8_t ivd_RelFileID_t
typedef int ivd_TransactionID_t
typedef UInt16_t ivd_DataType_t
 which bit mean which data
typedef UInt32_t ivd_MedVolNum_t
 Type of fileio record index.
typedef UInt32_t ivd_MediaKey_t
typedef UInt32_t ivd_BlockOffset_t
typedef UInt64_t ivd_MigrationID_t
typedef UInt16_t ivd_CopyID_t
typedef UInt32_t ivd_Inode_t
typedef UInt64_t ivd_GenInode_t
typedef UInt16_t hsm_ChgFlag_t
typedef vector< cmn_FileInfo_tcmn_FileInfo_t_v
typedef uint64_t UInt64_t
typedef uint32_t UInt32_t
typedef uint16_t UInt16_t
typedef uint8_t UInt8_t
typedef int64_t Int64_t
typedef int32_t Int32_t
typedef int16_t Int16_t
typedef int8_t Int8_t
typedef UInt64_t stx_CacheKey_t
 Key is by default 64 bit, shorter integer can be used.
typedef vector< stx_CacheEl * >
::iterator 
stx_CacheVec_i
typedef vector< stx_CacheVec >
::iterator 
stx_Cache_i
typedef __int64 Int64_t
typedef long Int32_t
typedef short Int16_t
typedef char Int8_t
typedef char Char_t
typedef unsigned __int64 UInt64_t
typedef unsigned long UInt32_t
typedef unsigned short UInt16_t
typedef unsigned char UInt8_t
typedef wchar_t WChar_t

Enumerations

enum  cmn_Lock_e {
  eNotLocked = 0, eLocked,
  eLckSameOwn, eLckOtherOwn
}
enum  ivd_ByteOrder_e { ibo_ENDIAN_LITTLE = 1, ibo_ENDIAN_BIG = 2 }
enum  ivd_FileState_e {
  ifs_NOSTATE = 0, ifs_FORMIGRATION = 1,
  ifs_DOMIGRATION = 2, ifs_MIGRATED = 3
}
enum  ivd_CommonArg_e {
  ica_NO_CMN_ARG = 0, ica_HELP = 1,
  ica_NODAEMON = 2
}
enum  ivd_ShowFlags_e {
  isf_DETAIL = 1 << 0, isf_VERBOSE = 1 << 1,
  isf_SH_DIRTY = 1 << 2, isf_SH_MIG_CAN = 1 << 3,
  isf_SENTINEL = 0x03
}
 

What information user need.

More...
enum  ivd_FileType_e {
  ift_UNKNOWN = 0, ift_FILE = 1,
  ift_DIR = 2, ift_CHR_DEV = 3,
  ift_BLK_DEV = 4, ift_FIFO = 5,
  ift_SYMLINK = 6, ift_SOCKET = 7
}
 

File type - platform independant type (should cover all platforms).

More...

Functions

cmn_Path IVD_CMN_DECL_d cmn_GetCurrentDir ()
void IVD_CMN_DECL_d cmn_SetCurrentDir (const string &a_name)
void IVD_CMN_DECL_d cmn_CopyFile (const cmn_Path &a_source, const cmn_Path &a_destination)
void IVD_CMN_DECL_d cmn_MoveFile (const cmn_Path &a_old, const cmn_Path &a_destination)
int IVD_CMN_DECL_d cmn_ExecCommand (const string a_cmd, vector< string > &a_args, const UInt32_t a_flags=0, void(*a_outcb)()=NULL)
 Execute command: specified command is executed with specifed arguments.
void IVD_CMN_DECL_d cmn_DaemonInit ()
 Daemonize currect process: fork() another process and continute execution in that process, while parent process exit() immedeatelly.
ostream & operator<< (ostream &os, const fname_inode_vec_t &fv)
istream & operator>> (istream &is, fname_inode_vec_t &fv)
IVD_CMN_DECL_d string cmn_LocaleToUTF8 (const string &a_locale)
IVD_CMN_DECL_d string cmn_UTF8ToLocale (const string &a_utf8)
UInt64_t hton (UInt64_t a_hostll)
UInt64_t ntoh (UInt64_t a_netll)
UInt32_t hton (UInt32_t a_hostll)
UInt32_t ntoh (UInt32_t a_netll)
UInt16_t hton (UInt16_t a_hostll)
UInt16_t ntoh (UInt16_t a_netll)
UInt32_t hton24 (UInt32_t a_hostll)
UInt32_t ntoh24 (UInt32_t a_netll)
void ivd_ThrowNullChk (const string a_type)
IVD_CMN_DECL_d ostream & operator<< (ostream &a_ostream, const cmn_UUID_t &a_uuid)

Variables

IVD_CMN_DECL_d cmn_Global g_cmn
const UInt32_t cmn_MAX_UTF8_CHAR_SIZE_c

Exit codes

Exit codes for all IVD binaries



#define ivd_EC_OK   0
#define ivd_EC_ERROR   1
#define ivd_EC_NOT_ENOUGH_ARG   10
#define ivd_EC_INVALID_ARG   11
#define ivd_EC_ENVIRONMENT   20
#define ivd_EC_STD_EXCEPTION   21
#define ivd_EC_UNKNOWN_EXCEPTION   22

Detailed Description

Entities that are used widely accross the IVD product.

See also:
cmn_Thread
ivderrcodes
cmnlog

Define Documentation

#define __hppa__

Definition at line 48 of file hpux.h.

#define __hpux__

Definition at line 39 of file hpux.h.

#define __linux__

Definition at line 39 of file linux.h.

#define __NT__

Definition at line 46 of file windows.h.

#define __OSVERSION__   5

Definition at line 54 of file windows.h.

#define __OSVERSION__   = 11

Definition at line 53 of file hpux.h.

#define __OSVERSION__   = 2

Definition at line 47 of file linux.h.

#define __STRICT_ANSI__   1

Definition at line 73 of file linux.h.

#define __WIN32__

Definition at line 58 of file windows.h.

#define __x86__

Definition at line 50 of file windows.h.

#define __x86__

Definition at line 43 of file linux.h.

#define _BSD_SOURCE   1

Definition at line 75 of file linux.h.

#define _FILE_OFFSET_BITS   64

Definition at line 96 of file hpux.h.

#define _FILE_OFFSET_BITS   64

Definition at line 83 of file linux.h.

#define _INCLUDE_STDC__SOURCE_199901

Definition at line 57 of file hpux.h.

#define _LARGEFILE64_SOURCE

Definition at line 95 of file hpux.h.

#define _LARGEFILE64_SOURCE

Definition at line 82 of file linux.h.

#define _REENTRANT

Definition at line 78 of file linux.h.

#define _TCHAR   char

Definition at line 145 of file linux.h.

#define _TCHAR   char
#define _tmain   main

Definition at line 123 of file hpux.h.

#define _tmain   main

Definition at line 144 of file linux.h.

#define _VER (   _major,
  _minor,
  _patch 
)    (((_major) << 24) + ((_minor) << 16) + (_patch))

Definition at line 65 of file target.h.

#define _VER_MAJOR (   _ver  )     ((_ver) >> 24)

Definition at line 70 of file target.h.

#define _VER_MINOR (   _ver  )     (((_ver) >> 16) & 0xFF)

Definition at line 71 of file target.h.

#define _VER_PATCH (   _ver  )     ((_ver) & 0xFFFF)

Definition at line 72 of file target.h.

#define _WIN32_WINNT   0x0500

Definition at line 67 of file windows.h.

#define _XOPEN_SOURCE   600

Definition at line 74 of file linux.h.

#define CATCH_ALL_IVD_EXCEPTION
Value:
catch (ivd_DFError &ie) { \
        log_ERR_m(ie);\
        return 1;\
    }\
    catch (ivd_Error &ie) { \
        log_ERR_m(ie);\
        return 1;\
    }\
    catch (ivd_SysError &ie) { \
        log_ERR_m(ie);\
        return 1;\
    }\
    catch (ivd_InternalError &iie) {\
        log_ERR_m(iie);\
        return 1;\
    }\
    catch (...) {\
        log_ERR_m("Caught unknown exception.");\
        return 1;\
    }

Definition at line 306 of file ivderror.h.

#define CHG_ALTDATA_d   0x0800

Definition at line 332 of file ivdtypes.h.

#define CHG_ATTR_d   0x0200

Definition at line 330 of file ivdtypes.h.

Referenced by hsm_FileHeader::Event(), and log_ivdfs::Write().

#define CHG_CHGFILE_d   0x0F00

Definition at line 334 of file ivdtypes.h.

Referenced by hsm_FileHeader::MigrationIsDone(), and i_HSM_i::PackFile().

#define CHG_CHGSTREAM_d   0x0D00

Definition at line 333 of file ivdtypes.h.

Referenced by log_ivdfs::Write().

#define CHG_CLEAN_d   0x0000

Definition at line 322 of file ivdtypes.h.

#define CHG_CREATE_d   0x0001

Definition at line 324 of file ivdtypes.h.

Referenced by hsm_FileHeader::Event(), and log_ivdfs::Write().

#define CHG_DATA_d   0x0100
#define CHG_DELETED_d   0x0002
#define CHG_META_d   0x0400

Definition at line 331 of file ivdtypes.h.

#define CHG_NAMEOWN_d   0x0004
#define cmn_DO_JOIN (   A,
  B 
)    cmn_DO_JOIN2(A, B)

Definition at line 101 of file target.h.

#define cmn_DO_JOIN2 (   A,
  B 
)    A##B

Definition at line 102 of file target.h.

#define cmn_EXEC_GET_STDERR   (1 << 2)

Definition at line 42 of file cmn_proc.h.

Referenced by cmn_ExecCommand().

#define cmn_EXEC_GET_STDOUT   (1 << 1)

Definition at line 41 of file cmn_proc.h.

Referenced by cmn_ExecCommand().

#define cmn_EXEC_WAIT   (1 << 0)

Flags for cmn_ExecCommand functions.

Definition at line 40 of file cmn_proc.h.

Referenced by cmn_ExecCommand(), fs_api::EventDataOffline(), and ivd_DD::Run().

#define CMN_HL7_DECL_d

Definition at line 166 of file linux.h.

#define CMN_HL7_DECL_d   __declspec(dllimport)

Definition at line 315 of file windows.h.

#define CMN_HL7_EXPIMP_d   extern

Definition at line 316 of file windows.h.

#define cmn_JOIN (   A,
  B 
)    cmn_DO_JOIN(A, B)

Definition at line 100 of file target.h.

#define cmn_OFFSETOF (   _T,
  _M 
)    offsetof(_T, _M)

Definition at line 87 of file target.h.

Referenced by data_Attribute::GetAttrIDListLength().

#define CONSOLE_TO_UTF8 (   _str  )     (cmn_LocaleToUTF8(string(_str)))

Definition at line 150 of file linux.h.

#define CONSOLE_TO_UTF8 (   _str  )     (cmn_LocaleToUTF8(string(_str)))

Definition at line 129 of file hpux.h.

Referenced by InputFile2IPCFileList().

#define CONSOLE_TO_UTF8 (   _str  )     cmn_OEMStringToMultiByte(_str)

Definition at line 168 of file windows.h.

#define elementIsNotLocked_d   -9999

Class lock ID by owner or individual.

OwnerID is negative at individual lock and vice versa.

Definition at line 92 of file cmn_lockidbyown.h.

Referenced by fio_TransGroupLock< _T, _defTransEl >::LockByIDOwn().

#define fom_APPEND   (1 << 11)
#define fom_CREATE_ALWAYS   (1 << 7)
#define fom_CREATE_NEW   (1 << 6)
#define fom_DEFAULT_MODE_d   (fom_READWRITE | fom_OPEN_EXISTING)

Default mode for OpenF(): read/write and open existing file (used when OpenF() is called without parameter).

Definition at line 71 of file cmn_File.h.

#define fom_FILE_NO_SHARE_READ   (1 << 13)

Share flags.

Definition at line 64 of file cmn_File.h.

#define fom_FILE_NO_SHARE_WRITE   (1 << 14)

Definition at line 65 of file cmn_File.h.

#define fom_LINK   (1 << 12)

Definition at line 61 of file cmn_File.h.

#define fom_NO_BUFFERING   (1 << 10)

Definition at line 57 of file cmn_File.h.

Referenced by ivd_FS_File::Open().

#define fom_OPEN_ALWAYS   (1 << 5)
#define fom_OPEN_EXISTING   (1 << 4)
#define fom_READ   (1 << 0)
#define fom_READ_MODE_d   (fom_READ | fom_OPEN_EXISTING)

Read mode for OpenF(): read and open existing file.

Definition at line 76 of file cmn_File.h.

Referenced by cmn_CopyFile(), GetPDBI(), ivd_AccessFsAttr(), and main().

#define fom_READWRITE   (fom_READ|fom_WRITE)
#define fom_STREAM   (1 << 8)

File stream I/O.

Definition at line 55 of file cmn_File.h.

Referenced by cmn_File::GetStreamHeader(), ivd_FS_File::Open(), cmn_File::SetStreamHeader(), and UnpackFile().

#define fom_STREAM_NO_DATA   (1 << 9)

Definition at line 56 of file cmn_File.h.

Referenced by cmn_File::GetStreamHeader(), and ivd_FS_File::Open().

#define fom_WRITE   (1 << 1)
#define ia_F_DIRTY   fs_DIRTY

File Status Flags.

Definition at line 41 of file include/ivd/hsm_attr.h.

#define ia_F_OFFLINE   fs_OFFLINE

Definition at line 42 of file include/ivd/hsm_attr.h.

#define ia_HSMATTR_NAME   "user.IVD"

HSM Attributes name - used for naming IVD attributes (for example is stored in FS's Extended attributes).

Definition at line 35 of file include/ivd/hsm_attr.h.

#define isatty (   _h  )     _isatty(_h)

Definition at line 157 of file windows.h.

#define ivd_ALTDATA_d   ( 1 << 2 )

Definition at line 120 of file ivdtypes.h.

Referenced by cmn_GetMigFlags(), and fsc_Split::IsZeroSizeSplit().

#define IVD_API_DECL_d   __declspec(dllimport)

Definition at line 363 of file windows.h.

#define IVD_API_EXPIMP_d   extern

Definition at line 364 of file windows.h.

#define ivd_ATTR_d   ( 1 << 0 )

data/stream type masks (only 4-bit in FSC!)

Definition at line 118 of file ivdtypes.h.

Referenced by fsc_VolumeCheck::Check(), and cmn_GetMigFlags().

#define IVD_CMN_DECL_d

Definition at line 154 of file linux.h.

#define IVD_CMN_DECL_d

Definition at line 133 of file hpux.h.

#define IVD_CMN_DECL_d   __declspec(dllimport)

Definition at line 197 of file windows.h.

#define IVD_CMN_EXPIMP_d   extern

Definition at line 198 of file windows.h.

#define ivd_DATA_d   ( 1 << 3 )
#define IVD_DF_DECL_d

Definition at line 157 of file linux.h.

#define IVD_DF_DECL_d

Definition at line 136 of file hpux.h.

#define IVD_DF_DECL_d   __declspec(dllimport)

Definition at line 233 of file windows.h.

#define IVD_DF_EXPIMP_d   extern

Definition at line 234 of file windows.h.

#define ivd_EC_ENVIRONMENT   20

Definition at line 63 of file cmn_defines.h.

Referenced by main().

#define ivd_EC_ERROR   1

Definition at line 58 of file cmn_defines.h.

Referenced by main().

#define ivd_EC_INVALID_ARG   11

Definition at line 61 of file cmn_defines.h.

#define ivd_EC_NOT_ENOUGH_ARG   10

Definition at line 60 of file cmn_defines.h.

Referenced by main().

#define ivd_EC_OK   0

Definition at line 56 of file cmn_defines.h.

Referenced by main(), Parse(), and ServiceLoop().

#define ivd_EC_STD_EXCEPTION   21

Definition at line 64 of file cmn_defines.h.

Referenced by api_Base::~api_Base().

#define ivd_EC_UNKNOWN_EXCEPTION   22

Definition at line 65 of file cmn_defines.h.

Referenced by main(), and api_Base::~api_Base().

#define IVD_ENDIAN_BIG   !(IVD_ENDIAN_LITTLE)

Definition at line 85 of file target.h.

#define IVD_ENDIAN_LITTLE   (TGT_ARCH_ia32) || (TGT_ARCH_amd64)

Definition at line 84 of file target.h.

#define IVD_FILE_GEN (   _id_fs  )     ((UInt32_t)(_id_fs >> 32))

Definition at line 293 of file ivdtypes.h.

#define IVD_FILE_ID_FS (   _ino,
  _gen 
)    (((UInt64_t)(_gen) << 32) + (_ino))

ID of file in UNIX filesystem = inode number + generation number.

Definition at line 291 of file ivdtypes.h.

#define IVD_FILE_INO (   _id_fs  )     ((UInt32_t)(_id_fs & 0xFFFFFFFF))

Definition at line 292 of file ivdtypes.h.

#define IVD_FILEIO_DECL_d

Definition at line 156 of file linux.h.

#define IVD_FILEIO_DECL_d

Definition at line 135 of file hpux.h.

#define IVD_FILEIO_DECL_d   __declspec(dllimport)

Definition at line 221 of file windows.h.

#define IVD_FILEIO_EXPIMP_d   extern

Definition at line 222 of file windows.h.

#define IVD_FSAPI_DECL_d   __declspec(dllimport)

Definition at line 303 of file windows.h.

#define IVD_FSAPI_DECL_d

Definition at line 163 of file linux.h.

#define IVD_FSAPI_DECL_d

Definition at line 142 of file hpux.h.

#define IVD_FSAPI_EXPIMP_d   extern

Definition at line 304 of file windows.h.

#define IVD_FSC_DECL_d

Definition at line 160 of file linux.h.

#define IVD_FSC_DECL_d

Definition at line 139 of file hpux.h.

#define IVD_FSC_DECL_d   __declspec(dllimport)

Definition at line 269 of file windows.h.

#define IVD_FSC_EXPIMP_d   extern

Definition at line 270 of file windows.h.

#define IVD_FSLIB_DECL_d

Definition at line 162 of file linux.h.

#define IVD_FSLIB_DECL_d

Definition at line 141 of file hpux.h.

#define IVD_FSLIB_DECL_d   __declspec(dllimport)

Definition at line 292 of file windows.h.

#define ivd_FTime (   _tp  )     ::ftime(_tp)

Definition at line 92 of file hpux.h.

Referenced by cmn_Time::cmn_Time(), and cmn_Time::Refresh().

#define ivd_FTime (   _tp  )     ::ftime(_tp)

Definition at line 122 of file linux.h.

#define ivd_FTime (   _tp  )     _ftime((_timeb *)(_tp))

Definition at line 147 of file windows.h.

#define ivd_GETTID   pthread_self

Definition at line 115 of file linux.h.

#define ivd_GETTID (  )     GetCurrentThreadId()

Definition at line 143 of file windows.h.

#define ivd_GETTID   pthread_self
#define IVD_HSMDB_DECL_d

Definition at line 164 of file linux.h.

#define IVD_HSMDB_DECL_d   __declspec(dllimport)

Definition at line 327 of file windows.h.

#define IVD_HSMDB_DECL_d

Definition at line 143 of file hpux.h.

#define IVD_HSMDB_EXPIMP_d   extern

Definition at line 328 of file windows.h.

#define IVD_IPC_DECL_d

Definition at line 153 of file linux.h.

#define IVD_IPC_DECL_d

Definition at line 132 of file hpux.h.

#define IVD_IPC_DECL_d   __declspec(dllimport)

Definition at line 185 of file windows.h.

#define IVD_IPC_EXPIMP_d   extern

Definition at line 186 of file windows.h.

#define IVD_JOBS_DECL_d

Definition at line 140 of file hpux.h.

#define IVD_JOBS_DECL_d   __declspec(dllimport)

Definition at line 281 of file windows.h.

#define IVD_JOBS_DECL_d

Definition at line 161 of file linux.h.

#define IVD_JOBS_EXPIMP_d   extern

Definition at line 282 of file windows.h.

#define ivd_MAX_BLOCK_SIZE   (ivd_MAX_BLOCK_SIZE_KB*1024)

Definition at line 75 of file cmn_defines.h.

Referenced by df_BlockManager::CreateBuffer().

#define ivd_MAX_BLOCK_SIZE_KB   (16384)

Largest block size supported by SCSI subsystem.

Definition at line 72 of file cmn_defines.h.

#define ivd_MAX_FILENAME   (255)

Definition at line 84 of file cmn_defines.h.

#define ivd_MAX_HOSTNAME_IDENTIFIER_SIZE   (63)

Definition at line 82 of file cmn_defines.h.

#define ivd_MAX_HOSTNAME_SIZE   (192)

Max hostname size is less than RFC size because of IVD internal database restrictions.

Definition at line 81 of file cmn_defines.h.

Referenced by cmn_SysInfo::ParseServices().

#define ivd_MAX_NUM_OF_DIF_VECTOR_IN_REL_FILES_d   256

Definition at line 123 of file ivdtypes.h.

#define IVD_MAX_PATH   32767

Definition at line 108 of file linux.h.

#define IVD_MAX_PATH   32767
#define IVD_MAX_PATH   32767

Definition at line 125 of file windows.h.

#define ivd_MAX_PATHNAME   (4096)

Definition at line 85 of file cmn_defines.h.

Referenced by ServiceInstall().

#define ivd_MAX_STREAM_SIZE (   _recordSize  )     (_recordSize * ivd_MAX_NUM_OF_DIF_VECTOR_IN_REL_FILES_d) - ivd_SIZE_OF_FIO_VECTOR_QUALIFERS_d

Definition at line 132 of file ivdtypes.h.

#define ivd_META_d   ( 1 << 1 )

Definition at line 119 of file ivdtypes.h.

Referenced by cmn_GetMigFlags().

#define ivd_MIN_BLOCK_SIZE   (ivd_MIN_BLOCK_SIZE_KB*1024)

Definition at line 74 of file cmn_defines.h.

Referenced by df_BlockManager::CreateBuffer().

#define ivd_MIN_BLOCK_SIZE_KB   (32)

Smallest reasonable data block size.

Definition at line 70 of file cmn_defines.h.

#define ivd_NULLCHK_m (   _pointer,
  _type 
)
#define IVD_PARSER_DECL_d

Definition at line 155 of file linux.h.

#define IVD_PARSER_DECL_d

Definition at line 134 of file hpux.h.

#define IVD_PARSER_DECL_d   __declspec(dllimport)

Definition at line 209 of file windows.h.

#define IVD_PARSER_EXPIMP_d   extern

Definition at line 210 of file windows.h.

#define IVD_POSIX_OS   1

Definition at line 80 of file target.h.

#define IVD_RMDB_DECL_d

Definition at line 138 of file hpux.h.

#define IVD_RMDB_DECL_d   __declspec(dllimport)

Definition at line 257 of file windows.h.

#define IVD_RMDB_DECL_d

Definition at line 159 of file linux.h.

#define IVD_RMDB_EXPIMP_d   extern

Definition at line 258 of file windows.h.

#define IVD_SCSI_DECL_d

Definition at line 165 of file linux.h.

#define IVD_SCSI_DECL_d

Definition at line 144 of file hpux.h.

#define IVD_SCSI_DECL_d   __declspec(dllimport)

Definition at line 339 of file windows.h.

#define IVD_SCSI_EXPIMP_d   extern

Definition at line 340 of file windows.h.

#define ivd_SIZE_OF_FIO_VECTOR_QUALIFERS_d   8

Definition at line 130 of file ivdtypes.h.

#define ivd_Sleep (   _sleepInSeconds  )     ::sleep(_sleepInSeconds)
#define ivd_Sleep (   _sleepInSeconds  )     ::sleep(_sleepInSeconds)

Definition at line 119 of file linux.h.

#define ivd_Sleep (   _sleepInSeconds  )     ::Sleep((DWORD)(1000*(_sleepInSeconds)))

Definition at line 149 of file windows.h.

#define ivd_STAT (   _file,
  _data 
)    ::stat(_file, _data)

Definition at line 88 of file hpux.h.

Referenced by ivd_FS_Event::GetRootDir().

#define ivd_STAT (   _file,
  _data 
)    _stat(_file, _data)

Definition at line 146 of file windows.h.

#define ivd_STAT (   _file,
  _data 
)    ::stat(_file, _data)

Definition at line 118 of file linux.h.

#define ivd_THREAD_EQUAL (   _th1,
  _th2 
)    (pthread_equal(_th1, _th2))

Definition at line 86 of file hpux.h.

#define ivd_THREAD_EQUAL (   _th1,
  _th2 
)    ((_th1)==(_th2))

Definition at line 144 of file windows.h.

#define ivd_THREAD_EQUAL (   _th1,
  _th2 
)    (pthread_equal(_th1, _th2))

Definition at line 116 of file linux.h.

#define IVD_UI_DECL_d

Definition at line 137 of file hpux.h.

#define IVD_UI_DECL_d

Definition at line 158 of file linux.h.

#define IVD_UI_DECL_d   __declspec(dllimport)

Definition at line 245 of file windows.h.

#define IVD_UI_EXPIMP_d   extern

Definition at line 246 of file windows.h.

#define ivd_USleep (   _sleepInMicroSec  )     ::usleep(_sleepInMicroSec)
#define ivd_USleep (   _sleepInMicroSec  )     ::Sleep((DWORD)(_sleepInMicroSec)/1000 + 1)

Definition at line 150 of file windows.h.

#define ivd_USleep (   _sleepInMicroSec  )     ::usleep(_sleepInMicroSec)

Definition at line 120 of file linux.h.

#define IVD_UT_DECL_d

Definition at line 168 of file linux.h.

#define IVD_UT_DECL_d

Definition at line 146 of file hpux.h.

#define IVD_UT_DECL_d   __declspec(dllimport)

Definition at line 351 of file windows.h.

#define IVD_UT_EXPIMP_d   extern

Definition at line 352 of file windows.h.

#define ivd_UUID_SIZE_d   (16)

Definition at line 87 of file cmn_defines.h.

#define ivd_UUID_STR_SIZE_d   (36)
#define LLONG_MAX   (0x7FFFFFFFFFFFFFFFLL)

Definition at line 91 of file linux.h.

#define LLONG_MAX   _I64_MAX

Definition at line 135 of file windows.h.

#define LLONG_MAX   (9223372036854775807LL)

Definition at line 61 of file hpux.h.

Referenced by val_Size::Assign(), and val_Integer::Assign().

#define LLONG_MIN   _I64_MIN

Definition at line 132 of file windows.h.

#define LLONG_MIN   (-9223372036854775807LL -1)

Definition at line 64 of file hpux.h.

Referenced by val_Integer::Assign().

#define LLONG_MIN   (-LONG_LONG_MAX - 1LL)

Definition at line 94 of file linux.h.

#define O_BINARY   0

Definition at line 81 of file hpux.h.

Referenced by blk_StdIOReader::blk_StdIOReader(), and blk_StdIOWriter::blk_StdIOWriter().

#define O_BINARY   0

Definition at line 111 of file linux.h.

#define PATH_SEPARATOR   '\\'

Definition at line 118 of file windows.h.

#define PATH_SEPARATOR   '/'

Definition at line 101 of file linux.h.

#define PATH_SEPARATOR   '/'
#define snprintf   _snprintf
#define stn_WIN_EA   "WIN.EA"

Definition at line 91 of file cmn_File.h.

Referenced by GetAttrType(), and df_SplitInfoUnpacker::ProcRecEmbData().

#define stn_WIN_LINK   "WIN.LINK"

Definition at line 92 of file cmn_File.h.

Referenced by GetAttrType().

#define stn_WIN_OBJID   "WIN.OBJID"

Definition at line 93 of file cmn_File.h.

Referenced by GetAttrType().

#define stn_WIN_PROPERTY   "WIN.PROPERTY"

Definition at line 94 of file cmn_File.h.

Referenced by GetAttrType().

#define stn_WIN_REPARSE   "WIN.REPARSE"

Definition at line 95 of file cmn_File.h.

Referenced by GetAttrType().

#define stn_WIN_SECURITY   "WIN.SEC"

File stream names/IDs.

Definition at line 90 of file cmn_File.h.

Referenced by GetAttrType().

#define stn_WIN_SPARSE   "WIN.SPARSE"

Definition at line 96 of file cmn_File.h.

Referenced by GetAttrType().

#define strcasecmp (   s1,
  s2 
)    _stricmp(s1, s2)
#define strncasecmp (   s1,
  s2,
  count 
)    _strnicmp(s1, s2, count)

Definition at line 152 of file windows.h.

#define strtoll (   _s,
  _e,
  _b 
)    _strtoi64(_s, _e, _b)

Definition at line 158 of file windows.h.

Referenced by val_Integer::Assign().

#define strtoull (   _s,
  _e,
  _b 
)    _strtoui64(_s, _e, _b)

Definition at line 159 of file windows.h.

Referenced by val_Integer::Assign().

#define stt_ALTDATA   2

Definition at line 84 of file cmn_File.h.

Referenced by i_HSM_i::PackFile(), and PackFile().

#define stt_DATA   1
#define stt_META   3

Definition at line 85 of file cmn_File.h.

Referenced by i_HSM_i::PackFile(), PackFile(), and hsm_IVDFSRecoverer::ProcRecBSStart().

#define stt_NONE   0

File stream types.

Definition at line 82 of file cmn_File.h.

Referenced by i_HSM_i::PackFile(), and PackFile().

#define ToUInt64 (   _h,
  _l 
)    ((static_cast<UInt64_t>(_h) << 32) | _l)

Definition at line 99 of file cmn_File.h.

#define UInt64ToFILETIME_m (   _ui,
  _ft 
)
Value:
_ft.dwLowDateTime = (DWORD)((_ui) & 0xffffffff);\
    _ft.dwHighDateTime = (DWORD)((_ui) >> 32);

Definition at line 100 of file cmn_File.h.

#define ULLONG_MAX   (0xFFFFFFFFFFFFFFFFULL)

Definition at line 97 of file linux.h.

#define ULLONG_MAX   _UI64_MAX

Definition at line 138 of file windows.h.

#define ULLONG_MAX   (18446744073709551615ULL)

Definition at line 67 of file hpux.h.

Referenced by val_Integer::Assign().

#define UTF8_TO_CONSOLE (   _str  )     (cmn_UTF8ToLocale(string(_str)))

Definition at line 148 of file linux.h.

#define UTF8_TO_CONSOLE (   _str  )     cmn_MultiByteToOEMString(_str)

Definition at line 164 of file windows.h.

#define UTF8_TO_CONSOLE (   _str  )     (cmn_UTF8ToLocale(string(_str)))
#define WRONG_CHARS_IN_PATH   "*?<>|\""

Definition at line 120 of file windows.h.

#define WRONG_CHARS_IN_PATH   ""

Definition at line 73 of file hpux.h.

Referenced by val_Path::Validate().

#define WRONG_CHARS_IN_PATH   ""

Definition at line 103 of file linux.h.

#define WRONG_PATH_SEPARATOR   '/'

Definition at line 119 of file windows.h.

#define WRONG_PATH_SEPARATOR   '\\'

Definition at line 102 of file linux.h.

#define WRONG_PATH_SEPARATOR   '\\'

Definition at line 72 of file hpux.h.


Typedef Documentation

typedef char Char_t

Definition at line 101 of file windows.h.

Definition at line 344 of file ivdtypes.h.

Definition at line 67 of file cmn_TreeWalk.h.

Definition at line 80 of file cmn_TreeWalk.h.

Definition at line 320 of file ivdtypes.h.

typedef int16_t Int16_t

Definition at line 118 of file hpux.h.

typedef int16_t Int16_t

Definition at line 140 of file linux.h.

typedef short Int16_t

Definition at line 99 of file windows.h.

typedef int32_t Int32_t

Definition at line 117 of file hpux.h.

typedef int32_t Int32_t

Definition at line 139 of file linux.h.

typedef long Int32_t

Definition at line 98 of file windows.h.

typedef int64_t Int64_t

Definition at line 138 of file linux.h.

typedef int64_t Int64_t

Definition at line 116 of file hpux.h.

typedef __int64 Int64_t

Definition at line 97 of file windows.h.

typedef int8_t Int8_t

Definition at line 119 of file hpux.h.

typedef int8_t Int8_t

Definition at line 141 of file linux.h.

typedef char Int8_t

Definition at line 100 of file windows.h.

Definition at line 143 of file ivdtypes.h.

Definition at line 147 of file ivdtypes.h.

which bit mean which data

Definition at line 115 of file ivdtypes.h.

typedef DIR* ivd_DirHandle_t

Definition at line 58 of file ivdtypes.h.

typedef size_t ivd_FileBufSize_t

Definition at line 51 of file ivdtypes.h.

typedef int ivd_FileHandle_t

Definition at line 50 of file ivdtypes.h.

Definition at line 107 of file ivdtypes.h.

typedef off64_t ivd_FilePosition_t

Definition at line 53 of file ivdtypes.h.

typedef ssize_t ivd_FileRetSize_t

Definition at line 52 of file ivdtypes.h.

typedef off64_t ivd_FileSize_t

Definition at line 54 of file ivdtypes.h.

Definition at line 156 of file ivdtypes.h.

Definition at line 155 of file ivdtypes.h.

Definition at line 142 of file ivdtypes.h.

Type of fileio record index.

It's 32 bit long, but can be extended to 64 bit in the future. In that case all unused vector list inside fileio lib must be updated.

Definition at line 141 of file ivdtypes.h.

Definition at line 145 of file ivdtypes.h.

Definition at line 106 of file ivdtypes.h.

Definition at line 105 of file ivdtypes.h.

Definition at line 110 of file ivdtypes.h.

typedef struct stat ivd_Stat_t

Definition at line 47 of file ivdtypes.h.

typedef pthread_t ivd_ThreadID_t

Definition at line 46 of file ivdtypes.h.

typedef time_t ivd_Time32_t

Definition at line 55 of file ivdtypes.h.

Definition at line 99 of file ivdtypes.h.

typedef int ivd_TransactionID_t

Definition at line 112 of file ivdtypes.h.

Definition at line 108 of file ivdtypes.h.

typedef vector<stx_CacheVec>::iterator stx_Cache_i

Definition at line 120 of file stx_Cache.h.

Key is by default 64 bit, shorter integer can be used.

Definition at line 37 of file stx_Cache.h.

typedef vector<stx_CacheEl*>::iterator stx_CacheVec_i

Definition at line 92 of file stx_Cache.h.

typedef unsigned short UInt16_t

Definition at line 105 of file windows.h.

typedef uint16_t UInt16_t

Definition at line 135 of file linux.h.

typedef uint16_t UInt16_t

Definition at line 113 of file hpux.h.

typedef unsigned long UInt32_t

Definition at line 104 of file windows.h.

typedef uint32_t UInt32_t

Definition at line 134 of file linux.h.

typedef uint32_t UInt32_t

Definition at line 112 of file hpux.h.

typedef uint64_t UInt64_t

Definition at line 133 of file linux.h.

typedef unsigned __int64 UInt64_t

Definition at line 103 of file windows.h.

typedef uint64_t UInt64_t

Definition at line 111 of file hpux.h.

typedef unsigned char UInt8_t

Definition at line 106 of file windows.h.

typedef uint8_t UInt8_t

Definition at line 136 of file linux.h.

typedef uint8_t UInt8_t

Definition at line 114 of file hpux.h.

typedef wchar_t WChar_t

Definition at line 113 of file windows.h.


Enumeration Type Documentation

enum cmn_Lock_e
Enumerator:
eNotLocked 
eLocked 
eLckSameOwn 
eLckOtherOwn 

Definition at line 40 of file cmn_lockidbyown.h.

             { 
    eNotLocked = 0,
    eLocked,
    eLckSameOwn,
    eLckOtherOwn
} cmn_Lock_e;

Enumerator:
ibo_ENDIAN_LITTLE 
ibo_ENDIAN_BIG 

Definition at line 158 of file ivdtypes.h.

             {
    ibo_ENDIAN_LITTLE = 1,
    ibo_ENDIAN_BIG    = 2
} ivd_ByteOrder_e;

Enumerator:
ica_NO_CMN_ARG 
ica_HELP 
ica_NODAEMON 

Definition at line 172 of file ivdtypes.h.

             {
    ica_NO_CMN_ARG      = 0,    // no common argument specified
    ica_HELP            = 1,    // --help specified
    ica_NODAEMON        = 2     // --no-daemon specified
} ivd_CommonArg_e;

Enumerator:
ifs_NOSTATE 
ifs_FORMIGRATION 
ifs_DOMIGRATION 
ifs_MIGRATED 

Definition at line 164 of file ivdtypes.h.

             {
    ifs_NOSTATE       = 0,             // file undefined state
    ifs_FORMIGRATION  = 1,             // file prepared for migration - to check policies
    ifs_DOMIGRATION   = 2,             // file is migrated to first level (disk or memory cache)
    ifs_MIGRATED      = 3              // file is on the tape
} ivd_FileState_e;

File type - platform independant type (should cover all platforms).

Enumerator:
ift_UNKNOWN 
ift_FILE 
ift_DIR 
ift_CHR_DEV 
ift_BLK_DEV 
ift_FIFO 
ift_SYMLINK 
ift_SOCKET 

Definition at line 216 of file ivdtypes.h.

             {
    ift_UNKNOWN       = 0,             // unknown type (probably regular file)
    ift_FILE          = 1,             // regular file
    ift_DIR           = 2,             // directory
    ift_CHR_DEV       = 3,             // character device file (UX only)
    ift_BLK_DEV       = 4,             // block device file (UX only)
    ift_FIFO          = 5,             // FIFO pipe (UX only)
    ift_SYMLINK       = 6,             // symbolic link (UX only)
    ift_SOCKET        = 7              // UNIX domain socket (UX only)
} ivd_FileType_e;

What information user need.

Flags are passed to some CORBA interface as i_BitFlag_t by cli. Each object decide what information will show.

Enumerator:
isf_DETAIL 
isf_VERBOSE 
isf_SH_DIRTY 
isf_SH_MIG_CAN 
isf_SENTINEL 

Definition at line 182 of file ivdtypes.h.

             {
    isf_DETAIL     = 1 << 0,
    isf_VERBOSE    = 1 << 1,
    isf_SH_DIRTY   = 1 << 2,
    isf_SH_MIG_CAN = 1 << 3,

    isf_SENTINEL   = 0x03
} ivd_ShowFlags_e;


Function Documentation

void IVD_CMN_DECL_d cmn_CopyFile ( const cmn_Path a_source,
const cmn_Path a_destination 
)

Definition at line 801 of file cmn_File_LNX.cpp.

References cmn_CopyFile(), errno, fom_CREATE_ALWAYS, fom_READ_MODE_d, fom_WRITE, cmn_File::GetFullPathRef(), log_FUNC_m, cmn_File::OpenF(), cmn_File::ReadF(), and cmn_File::WriteF().

Referenced by cmn_CopyFile(), cmn_MoveFile(), RevertUpdate(), and Update().

                                                                           {
    log_FUNC_m(cmn_CopyFile);

    const int buffSize = 0x4000; // 16k buffer
    vector<char> buffer;
    buffer.resize(buffSize);
    char *buff_p = &buffer[0];

    cmn_File sourf(a_source);
    cmn_File destf(a_destination);
    sourf.OpenF(fom_READ_MODE_d);
    destf.OpenF(fom_WRITE | fom_CREATE_ALWAYS);

    int read = sourf.ReadF(buff_p, buffSize);
    if (read == -1) {
        int lastError = errno;

        ostringstream sstr;
        sstr << " read(" << a_source << ")";

        throw ivd_SysError(lastError, sstr.str(), true);
    }

    while (read > 0) {
        int written = destf.WriteF(buff_p, read);
        if (written < read) {
            ostringstream sstr;
            sstr << "Write to " << destf.GetFullPathRef() << ", size " << read <<
                ", but write only " << written;
            throw ivd_SysError(ENOSPC, sstr.str(), true);
        }
        read = sourf.ReadF(buff_p, buffSize);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_DaemonInit (  ) 

Daemonize currect process: fork() another process and continute execution in that process, while parent process exit() immedeatelly.

After successful return of this function, you will be running in deamon. Function disconnects from the control terminal, sets working directory to root (/) and resets umask.

See also:
cmn_ExecCommand

Daemonize currect process: fork() another process and continute execution in that process, while parent process exit() immedeatelly.

See also:
cmn_ExecCommand

Definition at line 239 of file cmn_proc_LNX.cpp.

References cmn_DaemonInit(), dbg_DETAIL, errno, g_cmn, log_DBG_m, log_FUNC_m, pid_t, cmn_SysInfo::RefreshPid(), and cmn_Global::si.

Referenced by cmn_DaemonInit(), and main().

                 {

    log_FUNC_m(cmn_DaemonInit);

    pid_t pid = fork();

    if (pid == -1)
        throw ivd_SysError(errno, "fork()", true);

    // Parent process should go down
    if (pid != 0) {
        log_DBG_m(dbg_DETAIL, "Deamon forked, pid=" << pid);
        exit(0);
    }

    // new process should be started in own session
    if (setsid() == -1)
        throw ivd_SysError(errno, "setsid()", true);

    // ensure that we are not on mounted directory
    if (chdir("/") == -1)
        throw ivd_SysError(errno, "chdir(\"/\")", true);

    // ensure that umask will not impact file permissions
    umask(0); // umask() always succeeds

    // set new PID in system info structure
    g_cmn.si.RefreshPid();
}

Here is the call graph for this function:

Here is the caller graph for this function:

int IVD_CMN_DECL_d cmn_ExecCommand ( const string  a_cmd,
vector< string > &  a_args,
const UInt32_t  a_flags,
void(*)()  a_outcb 
)

Execute command: specified command is executed with specifed arguments.

Parameters:
a_cmd Command to start (full pathname required)
a_args Command arguments
a_flags Flags (wait exit code, redirect output...)
a_outcb stdout/stderr callback (to receive cmd output)
See also:
cmn_DaemonInit
Warning:
Pre-NGTL pthread implementations don't support waitpid to be executed in another thread of the same process.

POSIX requires that waitpid can be executed in another thread. See v 4.8 of this file for implementation that is POSIX compliant.

The functionality for ignoring the exit code (start-and-forget) is currently not implemented.

Parameters:
a_cmd Command to start (full pathname required)
a_args Command arguments
a_flags Flags (wait exit code, redirect output...)
a_outcb stdout/stderr callback (to receive cmd output)
See also:
cmn_DaemonInit

Definition at line 133 of file cmn_proc_LNX.cpp.

References cmn_EXEC_GET_STDERR, cmn_EXEC_GET_STDOUT, cmn_EXEC_WAIT, cmn_ExecCommand(), cmn_ExecInChildProcess(), dbg_EXTAPI, dbg_LOW, dbg_NORM, errno, FALSE, ie_INVALID_ARG, ie_PROCESS, ivd_Error, log_DBG_m, log_FUNC_A_m, NULL, pid_t, WEXITSTATUS, WIFSIGNALED, and WIFSTOPPED.

Referenced by cmn_ExecCommand(), fs_api::EventDataOffline(), i_Service_i::Execute(), i_Service_i::ExecutePy(), ivd_DD::Run(), SendEmail(), and SendMsg().

                                                           {

    log_FUNC_A_m(
        cmn_ExecCommand,
        "cmd=" << a_cmd << ", #arg=" << a_args.size() <<
        ", a_flags=0x" << hex << a_flags << ", a_outcb=" << a_outcb
    );

    if (!(a_flags & cmn_EXEC_WAIT)
        && (a_flags & (cmn_EXEC_GET_STDOUT|cmn_EXEC_GET_STDERR))) {
        throw ivd_InternalError(ie_INVALID_ARG, "No wait, but want output!");
    }

    if ((a_flags & (cmn_EXEC_GET_STDOUT|cmn_EXEC_GET_STDERR))
        && a_outcb == NULL) {
        throw ivd_InternalError(ie_INVALID_ARG, "No callback specified!");
    }

    pid_t pid(-1);
    int   status(-1);
    {
        static cmn_Mutex fork_x;
        cmn_MutexLock l(fork_x);

        static bool initialised(false);
        if (!initialised) {
            initialised = true;
            struct sigaction action;
            memset(&action, 0, sizeof(action));
            action.sa_handler = SIG_DFL;
            sigemptyset(&action.sa_mask);
            action.sa_flags = SA_NOCLDSTOP;
            if (sigaction(SIGCHLD, &action, NULL) == -1) {
                throw ivd_SysError(errno, "sigaction(SIGCHLD)", true);
            }
        }

        pid = fork();
        if (pid == -1) {
            throw ivd_SysError(errno, "fork()", true);
        }

        if (pid == 0) {
            // ==> Child process
            try {
                cmn_ExecInChildProcess(a_cmd, a_args, a_flags);
            }
            catch (...) {
                // if we have returned here, something did not worked as expected
                // Error already logged.
                ::exit(255);
            }
            ::exit(0);
        }
    }

    // ==> Parent process

    log_DBG_m(dbg_NORM,
        "%% Parent: Child started, PID=" << pid << ", cmd=" << a_cmd);

    pid_t result = waitpid(pid, &status, 0);
    log_DBG_m(dbg_EXTAPI, "%% Parent: After waitpid() == " << result);

    if (result == -1) {
        throw ivd_SysError(errno, "waitpid()", true);
    }

    if (!(a_flags & cmn_EXEC_WAIT)) {
        log_DBG_m(dbg_NORM, "%% Parent: No waiting, returning pid=" << pid);
        return pid;
    }

    if (WIFSIGNALED(status)) {
        ostringstream sstr;
        sstr << "Child process terminated abnormally. pid = " << pid;
        throw ivd_Error(ie_PROCESS, sstr.str());
    }
    if (WIFSTOPPED(status)) {
        ostringstream sstr;
        sstr << "Child process is stopped. pid = " << pid;
        throw ivd_Error(ie_PROCESS, sstr.str());
    }

    int ret = WEXITSTATUS(status);

    log_DBG_m(
        dbg_NORM,
        "%% Parent: Child exited, pid=" << pid << ", cmd=" << a_cmd <<
        ", code=" << ret;
    );
    return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cmn_Path IVD_CMN_DECL_d cmn_GetCurrentDir (  ) 

Definition at line 176 of file cmn_Dir_LNX.cpp.

References cmn_GetCurrentDir(), errno, IVD_MAX_PATH, log_FUNC_m, NULL, and path.

Referenced by cmn_GetCurrentDir(), and cmn_Path::GetAbsolutePathName().

                             {
    log_FUNC_m(GetCurrentDir);
    char path[PATH_MAX];
    char *name = getcwd(path, PATH_MAX);
    
    if (name == NULL) {
        throw ivd_SysError(errno, "getcwd() returned error.");
    }
    
    return cmn_Path(name);
}

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_CMN_DECL_d string cmn_LocaleToUTF8 ( const string &  a_locale  ) 

Definition at line 59 of file cmn_utf8.cpp.

References cmn_Global::conv, cmn_UTF8Converter::ConvertToUTF8(), and g_cmn.

Referenced by cmn_Path::GetAbsolutePathName(), cmn_FastDirLst::GetNextName(), GetPathList(), cfg_CliBase::LocaleToUTF8Argv(), and cmn_File::ReadLink().

                                                {
    return g_cmn.conv.ConvertToUTF8(a_locale);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_MoveFile ( const cmn_Path a_old,
const cmn_Path a_destination 
)

Definition at line 837 of file cmn_File_LNX.cpp.

References cmn_CopyFile(), cmn_FileNameToLong(), cmn_MoveFile(), cmn_MultiByteToWString(), cmn_UTF8ToLocale(), dbg_NORM, cmn_File::DeleteFile(), errno, log_DBG_m, and log_FUNC_m.

Referenced by cmn_MoveFile(), hsm_IVDFSRecoverer::CreateParentDir(), hsm_HL7CacheFile::HandleCoruptedFile(), bea_FRI::MoveFromWorkToFRI(), hsm_IVDFSRecoverer::ProcRecFileHdr(), RenameToBadFile(), RevertUpdate(), bea_FRI::SaveFRIOnError(), and Update().

                                                                 {
    log_FUNC_m(cmn_MoveFile);

    // Convert file names from UTF8 to locale
    string csSrc(cmn_UTF8ToLocale(a_src));
    string csDest(cmn_UTF8ToLocale(a_dest));

    int ret = rename(csSrc.c_str(), csDest.c_str());

    if (ret == -1) {
        int lastError = errno;

        if (lastError == EXDEV) {
            log_DBG_m(dbg_NORM, "Moving from one FS to another. Using copy/detele.");
            cmn_CopyFile(a_src, a_dest);
            cmn_File::DeleteFile(a_src);
        }
        else {
            ostringstream sstr;
            sstr << " rename(" << a_src << ", " << a_dest << ")";

            throw ivd_SysError(lastError, sstr.str(), true);
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void IVD_CMN_DECL_d cmn_SetCurrentDir ( const string &  a_name  ) 

Definition at line 189 of file cmn_Dir_LNX.cpp.

References cmn_SetCurrentDir(), dbg_NORM, errno, IVD_MAX_PATH, log_DBG_m, and log_FUNC_m.

Referenced by cmn_SetCurrentDir().

                                             {
    log_FUNC_m(SetCurrentDir);
    int ret = chdir(a_name.c_str());
    if (ret == -1) {
        throw ivd_SysError(errno, string("chdir(") + a_name + string(")") );
    } 
}

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_CMN_DECL_d string cmn_UTF8ToLocale ( const string &  a_utf8  ) 
UInt64_t hton ( UInt64_t  a_hostll  )  [inline]

Definition at line 48 of file ivdbswap.h.

Referenced by df_FRI::BlockWritten(), cdb_Locate::cdb_Locate(), cdb_LogSelect::cdb_LogSelect(), cdb_LogSense::cdb_LogSense(), cdb_ReadAttribute::cdb_ReadAttribute(), cdb_ReportDensity::cdb_ReportDensity(), cdb_WriteAttribute::cdb_WriteAttribute(), df_FRIDistiller::CopyRecord(), df_Filter::CopyRecord(), data_Log::data_Log(), data_Attribute::FindAttrID(), fsc_nsFSrecovery::FlushBlock(), df_Writer::FlushBlock(), data_Log::GetParam(), df_TCMMediaVolume_t::HostToNet(), df_TCMMedium_t::HostToNet(), hton24(), data_Attribute::Init(), df_Packer::MakeSpaceForData(), df_FRI::MediumVolumeStart(), ntoh(), data_ElementStatus::ParseElemStatus(), df_Filter::ProcRecBSEnd(), df_Filter::ProcRecBSStart(), data_Attribute::SetAvailableData(), cdb_Locate::SetBlockNum(), cdb_MoveMedium::SetDestination(), cdb_ReadElementStatus::SetElementNum(), data_Mode::SetPartitions(), cdb_MoveMedium::SetSource(), cdb_ReadElementStatus::SetStartAddr(), cdb_MoveMedium::SetTransport(), data_Log::UpdateMICNoteSize(), df_BlockProxyWriter::WriteBlockHeader(), df_Packer::WriteRecBSEndRaw(), df_Packer::WriteRecBSStart(), df_Packer::WriteRecCmnRaw(), df_Packer::WriteRecFile(), df_Packer::WriteRecFileEnd(), df_Packer::WriteRecFileEndRaw(), df_Packer::WriteRecFRIEnd(), df_Packer::WriteRecFRISplitInfo(), df_Packer::WriteRecFRIStart(), and df_Packer::WriteRecMedVolHdr().

                                        {

#if IVD_ENDIAN_LITTLE
    #if TGT_OS_linux
        UInt64_t netll = a_hostll;
        return bswap_64(netll);
    #else
        union Split64_t {
            UInt64_t a;
            UInt32_t b[2];
        };

        register Split64_t netll;
        netll.a    = a_hostll;

        register UInt32_t x = netll.b[0];
        netll.b[0] = htonl(netll.b[1]);
        netll.b[1] = htonl(x);
        return netll.a;
    #endif
#else
    // Big endian computer
    return a_hostll;
#endif

}

Here is the caller graph for this function:

UInt32_t hton ( UInt32_t  a_hostll  )  [inline]

Definition at line 81 of file ivdbswap.h.

                                        {
    return htonl(a_hostll);
}

UInt16_t hton ( UInt16_t  a_hostll  )  [inline]

Definition at line 89 of file ivdbswap.h.

                                        {
    return htons(a_hostll);
}

UInt32_t hton24 ( UInt32_t  a_hostll  )  [inline]

Definition at line 97 of file ivdbswap.h.

References hton().

Referenced by cdb_Read::cdb_Read(), cdb_ReadElementStatus::cdb_ReadElementStatus(), cdb_Space::cdb_Space(), cdb_Write::cdb_Write(), cdb_WriteFileMarks::cdb_WriteFileMarks(), data_ElementStatus::GetReportSize(), data_ElementStatus::ParseElemStatus(), cdb_Write::SetBuffer(), and cdb_Read::SetBuffer().

                                          {
#if IVD_ENDIAN_LITTLE
    register UInt32_t n24 = hton(a_hostll & 0x00FFFFFF);
    return (n24 >> 8);
#else
    return a_hostll;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ivd_ThrowNullChk ( const string  a_type  )  [inline]

Definition at line 282 of file ivderror.h.

References errno.

                                                  {
   throw ivd_SysError(errno, "Cannot reserve memory for " + a_type, true);
}

UInt16_t ntoh ( UInt16_t  a_netll  )  [inline]

Definition at line 93 of file ivdbswap.h.

                                       {
    return ntohs(a_netll);
}

UInt32_t ntoh ( UInt32_t  a_netll  )  [inline]

Definition at line 85 of file ivdbswap.h.

                                       {
    return ntohl(a_netll);
}

UInt64_t ntoh ( UInt64_t  a_netll  )  [inline]

Definition at line 75 of file ivdbswap.h.

References hton().

Referenced by df_FRI::BlockWritten(), fsc_nsElement::CheckLastGen(), df_FRIDistiller::CopyRecord(), df_Filter::CopyRecord(), fsc_VolumeCheck::DisplayMessage(), DumpBSEnd(), DumpBSStart(), DumpEmbData(), DumpFile(), DumpFileEnd(), Ea(), data_Attribute::FindAttrID(), df_RecReader::FRIEndCheck(), data_Attribute::GetAttributeListLength(), df_Unpacker::GetBSData(), data_Density::GetCapacity(), data_Density::GetDensityCount(), fsc_nsElement::GetFileSize(), data_Attribute::GetMamCapacity(), data_Attribute::GetMamFreeSpace(), data_Density::GetMediaWidth(), data_Log::GetMICAvailSize(), data_Log::GetMICNoteLength(), data_Log::GetMICNoteSize(), df_BlockScanner::GetNextRecord(), df_RecReader::GetNextRecord(), data_Mode::GetPartSize(), data_Position::GetPosition(), scsi_IO::GetReadDifference(), data_Log::GetRemainingPartCap(), data_Log::GetSize(), data_Log::GetTotalPartCap(), data_Density::GetTracks(), df_RecCmn_t::GetVarDataNet(), df_BlockProxy::IsBlockHeaderPresent(), Mamdetect(), df_FRI::MediumVolumeStart(), df_StandardAttr_t::NetToHost(), df_TCMMediaVolume_t::NetToHost(), df_TCMMedium_t::NetToHost(), ntoh24(), operator<<(), ParseBlock(), df_BlockProxy::ParseBlockHeader(), ParseBSEnd(), ParseBSStart(), ParseECMAHeader(), data_ElementStatus::ParseElemStatus(), ParseEmbData(), ParseFile(), ParseFileEnd(), ParseFRIEnd(), ParseFRISpInfo(), ParseFRIStart(), ParseMICVolNote(), df_RecReader::PositionToRecord(), df_RecReader::PrepareDataStreamUnpacker(), df_SplitInfoUnpacker::ProcRecBSEnd(), df_FRIDistiller::ProcRecBSEnd(), df_Filter::ProcRecBSEnd(), hsm_Recall::ProcRecBSStart(), hsm_IVDFSRecoverer::ProcRecBSStart(), df_SplitInfoUnpacker::ProcRecBSStart(), df_FRIDistiller::ProcRecBSStart(), df_Filter::ProcRecBSStart(), hsm_Recall::ProcRecEmbData(), hsm_IVDFSRecoverer::ProcRecEmbData(), df_SplitInfoUnpacker::ProcRecEmbData(), df_FRIDistiller::ProcRecEmbData(), df_Filter::ProcRecEmbData(), df_SplitInfoUnpacker::ProcRecFileEnd(), df_FRIDistiller::ProcRecFileEnd(), df_Filter::ProcRecFileEnd(), hsm_Recall::ProcRecFileHdr(), hsm_IVDFSRecoverer::ProcRecFileHdr(), df_SplitInfoUnpacker::ProcRecFileHdr(), df_FRIDistiller::ProcRecFileHdr(), df_Filter::ProcRecFileHdr(), df_SplitInfoUnpacker::ProcRecFRIEnd(), df_SplitInfoUnpacker::ProcRecFRISpInfo(), la_SCSILibrary::ReadElementAssignment(), bea_FRI::ReadFRIStart(), df_Unpacker::ReadRecBSEnd(), df_Unpacker::ReadRecBSStart(), df_Unpacker::ReadRecFile(), df_Unpacker::ReadRecFileEnd(), bea_Volume::ReadVolInfoFromHeader(), scsi_GetSenseText(), df_BlockScanner::SetBlock(), df_RecReader::Unpack(), df_BlockProxy::VerifiedBlock(), df_RecReader::VerifiedRecCmn(), df_BlockProxy::VerifyBlockHeader(), and df_RecReader::VerifyRecHeader().

                                       {
    // Just call the above function. ntoh and hton do the same
    // thing!
    return hton(a_netll);
}

Here is the call graph for this function:

UInt32_t ntoh24 ( UInt32_t  a_netll  )  [inline]

Definition at line 106 of file ivdbswap.h.

References ntoh().

Referenced by data_Density::GetBitsPerMM(), and data_ElementStatus::ParseElemStatus().

                                         {
#if IVD_ENDIAN_LITTLE
    register UInt32_t h24 = ntoh(a_netll & 0x00FFFFFF);
    return (h24 >> 8);
#else
    return a_netll;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

ostream& operator<< ( ostream &  os,
const fname_inode_vec_t fv 
)

Definition at line 56 of file cmn_TreeWalk.cpp.

                                                 {
    os << "fname_inode_vec_t(" << endl;
    os << (UInt32_t)fv.size() << endl;
    for(fname_inode_vec_t::const_iterator i = fv.begin(); i != fv.end(); i++)
        os << i->m_name     << endl
           << i->m_iNode    << endl
           << (int)i->m_fileType << endl;
    os << ")" << endl;
    return os;
}

IVD_CMN_DECL_d ostream& operator<< ( ostream &  a_ostream,
const cmn_UUID_t a_uuid 
)

Definition at line 218 of file cmn_uuid.cpp.

References cmn_UUID_t::ToString().

                                                                   {
    a_ostream << a_uuid.ToString();
    return a_ostream;
}

Here is the call graph for this function:

istream& operator>> ( istream &  is,
fname_inode_vec_t fv 
)

Definition at line 70 of file cmn_TreeWalk.cpp.

References dbg_DETAIL, getline(), ie_STD_EXCEPTION, ivd_Error, len, log_DBG_m, log_FUNC_m, fname_inode_t::m_fileType, fname_inode_t::m_iNode, and fname_inode_t::m_name.

                                           {
    log_FUNC_m(operator>>);
    string s;
    int len;
    is >> s;
    log_DBG_m(dbg_DETAIL,  "s=" << s );

    if (s == "fname_inode_vec_t(") {
        is >> len;
        log_DBG_m(dbg_DETAIL,  "len=" << len );
        while (len != 0) {
            int pos = is.tellg();
            fv.push_back(fname_inode_t());
            fname_inode_t &fi = fv.back();
            int fileType;
            is >> ws; // NOTE!!! skip white spaces and read whole line
            getline(is, fi.m_name);
            log_DBG_m(dbg_DETAIL,  "fi.m_name=" << fi.m_name );
            is >> fi.m_iNode;
            is >> fileType;
            fi.m_fileType = (ivd_FileType_e)fileType;
            len--;
            if (is.rdstate()) {
                string stateBits;
                if (is.rdstate() & ios::failbit) {
                    stateBits += " failbit,";
                }
                if (is.rdstate() & ios::eofbit) {
                    stateBits += " eofbit,";
                }
                if (is.rdstate() & ios::badbit) {
                    stateBits += " badbit,";
                }
                if (stateBits.size() > 0) {
                    stateBits.resize(stateBits.size() - 1);
                }

                log_FUNC_m(operator>>);
                ostringstream sstr;
                sstr << "Unable to read stack. state " << is.rdstate()
                     << ". Bits:" << stateBits
                     << " at downcount " << len
                     << ", at stream position " << pos << "." << endl
                     << " Treewalk will continue from scratch.";
                throw ivd_Error(ie_STD_EXCEPTION, sstr.str(), true);
            }
        }
        is >> s;
    }
    return is;
}

Here is the call graph for this function:


Variable Documentation

const UInt32_t cmn_MAX_UTF8_CHAR_SIZE_c
IVD_CMN_DECL_d cmn_Global g_cmn

Definition at line 43 of file cmn_internal.cpp.

Referenced by _tmain(), i_ManagementInterface_i::AddMediumToPool(), blk_DiskFRIReader::blk_DiskFRIReader(), i_PartitionManager_i::BuildExpirationTree(), i_HSM_i::ChangeLogLevel(), log_Debugger::ChangeParams(), log_EventLog::ChangeQualifier(), bea_MigrationThread::CheckFRI(), pm_JobMgr::CheckFSCvsIVDFS(), i_HSM_i::CheckFSCvsIVDFS(), i_MaintFriJob_i::CheckReadFri(), rm_DiskBuffer::Clear(), CliConnectToHSM(), CliConnectToMIF(), bea_TapeDrive::Close(), bea_DiskDrive::Close(), i_BackEndAgent_i::CloseMediumVolume(), bea_FRI::CloseVolume(), cmn_DaemonInit(), cmn_GetComponentName(), cmn_LocaleToUTF8(), cmn_UTF8ToLocale(), bea_FRI::CreateFRI(), cmn_File::CreatePipe(), dbg_GetFlags(), dbg_GetLevel(), dbg_IsActive(), dbg_Off(), dbg_On(), dbg_SetArgs(), dbg_SetExternalDebugger(), dbg_SetFlags(), dbg_SetLevel(), dbg_SetProcName(), i_Service_i::DeleteFile(), i_AdminJob_i::DetectVolumeHeader(), rm_DiskBufAllocator::DetectVolumes(), i_ManagementInterface_i::DisableDebug(), i_HSM_i::DoMigrationJob(), i_ManagementInterface_i::EnableDebug(), hsm_FileHeader::EventOffline(), i_Service_i::Execute(), i_ReorgScanJob_i::Execute(), i_MigrationJob_i::Execute(), i_ManagementInterface_i::FileHistory(), ivd_BaseException::FormatText(), fsc_GetDir(), fsc_GetRedunCopyDir(), fsc_GetReorgDir(), cfg_CollocationInfo::GenerateCollocationInfoFile(), cfg_HL7Info::GenerateHL7InfoFile(), i_ManagementInterface_i::GetCollocationInfo(), log_EventLogger::GetComponent(), bea_DiskMedium::GetDiskMediumPath(), fsc_RawMedVolPathCollector::GetFileName(), i_MaintFriJob_i::GetFRI(), fsc_nsElement::GetFullPath(), log_EventLogger::GetHeader(), log_ErrorStream::GetHeader(), i_ManagementInterface_i::GetHl7Info(), i_HSM_i::GetInfo(), i_Component_i::GetVersion(), ut_Group::Header(), cfg_Cli_hsm::HelpDump(), hsm_HL7MessageProxy::hsm_HL7MessageProxy(), HsmApiEnableDebug(), i_BackEndAgent_i::i_BackEndAgent_i(), i_BackupAgent_i::i_BackupAgent_i(), i_DownloadAgent_i::i_DownloadAgent_i(), i_ManagementInterface_i::i_ManagementInterface_i(), i_MediumCheckJob_i::i_MediumCheckJob_i(), i_ResourceManager_i::i_ResourceManager_i(), i_RestoreAgent_i::i_RestoreAgent_i(), i_UploadAgent_i::i_UploadAgent_i(), log_ivdfs::Init(), ipc_Corba::Init(), ClientConf_t::Init(), bea_Volume::Init(), i_AdminJob_i::InitializeSingleVolume(), i_ReorgJob_i::InitializeVolumes(), fsc_DataL::Insert(), IsFileOffline(), ivd_FileSystemAPI::ivd_FileSystemAPI(), ivd_ParseCmnArgs(), i_ManagementInterface_i::ListDrives(), cfg_CliBase::LocaleToUTF8Argv(), log_ErrorStream::log_ErrorStream(), log_EventLog::log_EventLog(), log_FunctionTracer::log_FunctionTracer(), log_Output(), log_Stack::log_Stack(), log_WriteEvent(), main(), i_EfficientRecallJob_i::MediumOperationComplete(), df_FRI::MediumVolumeClosed(), bea_MigrationThread::Migrate(), hsm_JobListMgr::MigrateFailedJob(), bea_FRI::MoveFromWorkToFRI(), bea_Volume::MustDumpFRI(), nsc_ScanForIVDFSRecovery(), log_Debugger::Off(), log_Debugger::On(), la_SCSILibrary::Open(), bea_TapeDrive::Open(), bea_DiskDrive::Open(), blk_DiskFRIWriter::OpenFRIFile(), operator<<(), i_HSM_i::PackFile(), i_PartitionManager_i::ParseConfig(), i_ResourceManager_i::ParsePMConfig(), cmn_SysInfo::ParseServices(), i_MaintFriJob_i::PrepareVolumes(), PrintUsage(), i_RecoveryJob_i::ProcessFRI(), i_MediumCheckJob_i::ProcessFRI(), i_PartitionManager_i::ReadCollocationInfo(), i_LibraryAgentSCSI_i::ReadDriveInfo(), i_PartitionManager_i::ReadHl7Info(), bea_DupReadThread::ReadMedVolume(), ReadRefFromFile(), fio_uvListMgr::ReadUV(), rm_Queue::Recalc(), i_HSM_i::Recall(), i_ManagementInterface_i::RecallFile(), cfg_CliBase::Refresh(), bea_DiskMedium::Refresh(), ipc_Corba::RegisterFSEvtMgr(), ipc_Corba::RegisterLA(), ipc_Corba::RegisterMIF(), ipc_Corba::RegisterPMByPMID(), ipc_Corba::RegisterSvc(), rm_PartitionStatus::Release(), i_Job_i::ReleaseDiskBuffer(), rm_SysState::ReleaseSys(), i_ManagementInterface_i::RemovePartition(), rm_DiskBuffer::ReportContent(), rm_PartitionStatus::Reserve(), rm_SysState::ReserveSys(), rm_DiskBuffer::rm_DiskBuffer(), FSEvMgrThrd::Run(), pm_RecallClientThread::Run(), ivd_DD::Run(), hsm_FHmigc::Run(), RunOmniNames(), bea_FRI::SaveFRIOnError(), hsm_FHmigc::SendToPM(), ServerLoop(), i_Job_i::SetDriveProperties(), log_Debugger::SetFileName(), log_EventLogger::SetNewPath(), log_ErrorStream::SetNewPath(), mif_CfgRep::SetPath(), api_Partition::SetReferences(), bea_FRIThread::SetWorkDir(), hsm_FHmigc::ShouldMigrate(), i_HSM_i::ShowStatus(), SimulateMediumError(), SimulateUVStructureError(), mif_PartMgr::StartPM(), Suspend(), i_ManagementInterface_i::TrigMigration(), rm_SysState::UnRegisterPM(), Update(), rm_SysState::UpdatePM(), i_ManagementInterface_i::UpdatePool(), Usage(), i_BackEndAgent_i::UseResources(), log_EventLogger::Write(), fsc_DataL::Write2DB(), cfg_CollocationInfo::WriteCollocationInfo(), log_Debugger::WriteHeader(), cfg_HL7Info::WriteHL7Info(), bea_DupWriteThread::WriteMedVolume(), WriteRefToFile(), i_MediumDupl_i::~i_MediumDupl_i(), i_RedundantCopyJob_i::~i_RedundantCopyJob_i(), log_FunctionTracer::~log_FunctionTracer(), and log_Stack::~log_Stack().