rpm  5.4.10
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
rpmiotypes.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rpmioItem_s
struct  rpmioP_s

Macros

#define rpmiobUnlink(_iob)   ((rpmiob)rpmioUnlinkPoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))
#define rpmiobLink(_iob)   ((rpmiob)rpmioLinkPoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))
#define rpmiobFree(_iob)   ((rpmiob)rpmioFreePoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))

Typedefs

typedef enum rpmRC_e rpmRC
 RPM return codes.
typedef unsigned char rpmuint8_t
 Private int typedefs to avoid C99 portability issues.
typedef unsigned short rpmuint16_t
typedef unsigned int rpmuint32_t
typedef unsigned long long rpmuint64_t
typedef int rpmint32_t
typedef struct yarnLock_s * yarnLock
typedef struct rpmioItem_srpmioItem
typedef struct rpmioPool_srpmioPool
typedef struct rpmiob_s * rpmiob
typedef struct rpmioP_srpmioP
typedef struct DIGEST_CTX_sDIGEST_CTX
typedef struct pgpPkt_s * pgpPkt
typedef struct pgpDig_s * pgpDig
typedef struct pgpDigParams_s * pgpDigParams
typedef rpmuint8_t pgpKeyID_t [8]
typedef rpmuint8_t pgpTime_t [4]
typedef enum pgpVSFlags_e pgpVSFlags
 Bit(s) to control digest and signature verification.
typedef const void * fnpyKey
typedef enum rpmCallbackType_e rpmCallbackType
 Bit(s) to identify progress callbacks.
typedef void * rpmCallbackData
typedef enum pgpHashAlgo_e pgpHashAlgo
 9.4.
typedef enum rpmDigestFlags_e rpmDigestFlags
 Bit(s) to control digest operation.
typedef void *(* rpmCallbackFunction )(const void *h, const rpmCallbackType what, const rpmuint64_t amount, const rpmuint64_t total, fnpyKey key, rpmCallbackData data)

Enumerations

enum  rpmRC_e {
  RPMRC_OK = 0, RPMRC_NOTFOUND = 1, RPMRC_FAIL = 2, RPMRC_NOTTRUSTED = 3,
  RPMRC_NOKEY = 4, RPMRC_NOSIG = 5
}
 RPM return codes. More...
enum  pgpVSFlags_e {
  RPMVSF_DEFAULT = 0, RPMVSF_NOHDRCHK = (1 << 0), RPMVSF_NEEDPAYLOAD = (1 << 1), RPMVSF_NOSHA1HEADER = (1 << 8),
  RPMVSF_NOMD5HEADER = (1 << 9), RPMVSF_NODSAHEADER = (1 << 10), RPMVSF_NORSAHEADER = (1 << 11), RPMVSF_NOSHA1 = (1 << 16),
  RPMVSF_NOMD5 = (1 << 17), RPMVSF_NODSA = (1 << 18), RPMVSF_NORSA = (1 << 19)
}
 Bit(s) to control digest and signature verification. More...
enum  rpmCallbackType_e {
  RPMCALLBACK_UNKNOWN = 0, RPMCALLBACK_INST_PROGRESS = (1 << 0), RPMCALLBACK_INST_START = (1 << 1), RPMCALLBACK_INST_OPEN_FILE = (1 << 2),
  RPMCALLBACK_INST_CLOSE_FILE = (1 << 3), RPMCALLBACK_TRANS_PROGRESS = (1 << 4), RPMCALLBACK_TRANS_START = (1 << 5), RPMCALLBACK_TRANS_STOP = (1 << 6),
  RPMCALLBACK_UNINST_PROGRESS = (1 << 7), RPMCALLBACK_UNINST_START = (1 << 8), RPMCALLBACK_UNINST_STOP = (1 << 9), RPMCALLBACK_REPACKAGE_PROGRESS = (1 << 10),
  RPMCALLBACK_REPACKAGE_START = (1 << 11), RPMCALLBACK_REPACKAGE_STOP = (1 << 12), RPMCALLBACK_UNPACK_ERROR = (1 << 13), RPMCALLBACK_CPIO_ERROR = (1 << 14),
  RPMCALLBACK_SCRIPT_ERROR = (1 << 15)
}
 Bit(s) to identify progress callbacks. More...
enum  pgpHashAlgo_e {
  PGPHASHALGO_ERROR = -1, PGPHASHALGO_NONE = 0, PGPHASHALGO_MD5 = 1, PGPHASHALGO_SHA1 = 2,
  PGPHASHALGO_RIPEMD160 = 3, PGPHASHALGO_MD2 = 5, PGPHASHALGO_TIGER192 = 6, PGPHASHALGO_HAVAL_5_160 = 7,
  PGPHASHALGO_SHA256 = 8, PGPHASHALGO_SHA384 = 9, PGPHASHALGO_SHA512 = 10, PGPHASHALGO_SHA224 = 11,
  PGPHASHALGO_MD4 = 104, PGPHASHALGO_RIPEMD128 = 105, PGPHASHALGO_CRC32 = 106, PGPHASHALGO_ADLER32 = 107,
  PGPHASHALGO_CRC64 = 108, PGPHASHALGO_JLU32 = 109, PGPHASHALGO_RIPEMD256 = 111, PGPHASHALGO_RIPEMD320 = 112,
  PGPHASHALGO_SALSA10 = 113, PGPHASHALGO_SALSA20 = 114, PGPHASHALGO_MD6_224 = 128+0, PGPHASHALGO_MD6_256 = 128+1,
  PGPHASHALGO_MD6_384 = 128+2, PGPHASHALGO_MD6_512 = 128+3, PGPHASHALGO_CUBEHASH_224 = 136+0, PGPHASHALGO_CUBEHASH_256 = 136+1,
  PGPHASHALGO_CUBEHASH_384 = 136+2, PGPHASHALGO_CUBEHASH_512 = 136+3, PGPHASHALGO_KECCAK_224 = 144+0, PGPHASHALGO_KECCAK_256 = 144+1,
  PGPHASHALGO_KECCAK_384 = 144+2, PGPHASHALGO_KECCAK_512 = 144+3, PGPHASHALGO_ECHO_224 = 148+0, PGPHASHALGO_ECHO_256 = 148+1,
  PGPHASHALGO_ECHO_384 = 148+2, PGPHASHALGO_ECHO_512 = 148+3, PGPHASHALGO_EDONR_224 = 152+0, PGPHASHALGO_EDONR_256 = 152+1,
  PGPHASHALGO_EDONR_384 = 152+2, PGPHASHALGO_EDONR_512 = 152+3, PGPHASHALGO_FUGUE_224 = 156+0, PGPHASHALGO_FUGUE_256 = 156+1,
  PGPHASHALGO_FUGUE_384 = 156+2, PGPHASHALGO_FUGUE_512 = 156+3, PGPHASHALGO_SKEIN_224 = 160+0, PGPHASHALGO_SKEIN_256 = 160+1,
  PGPHASHALGO_SKEIN_384 = 160+2, PGPHASHALGO_SKEIN_512 = 160+3, PGPHASHALGO_SKEIN_1024 = 160+4, PGPHASHALGO_BMW_224 = 168+0,
  PGPHASHALGO_BMW_256 = 168+1, PGPHASHALGO_BMW_384 = 168+2, PGPHASHALGO_BMW_512 = 168+3, PGPHASHALGO_SHABAL_224 = 176+0,
  PGPHASHALGO_SHABAL_256 = 176+1, PGPHASHALGO_SHABAL_384 = 176+2, PGPHASHALGO_SHABAL_512 = 176+3, PGPHASHALGO_SHAVITE3_224 = 180+0,
  PGPHASHALGO_SHAVITE3_256 = 180+1, PGPHASHALGO_SHAVITE3_384 = 180+2, PGPHASHALGO_SHAVITE3_512 = 180+3, PGPHASHALGO_BLAKE_224 = 184+0,
  PGPHASHALGO_BLAKE_256 = 184+1, PGPHASHALGO_BLAKE_384 = 184+2, PGPHASHALGO_BLAKE_512 = 184+3, PGPHASHALGO_TIB3_224 = 192+0,
  PGPHASHALGO_TIB3_256 = 192+1, PGPHASHALGO_TIB3_384 = 192+2, PGPHASHALGO_TIB3_512 = 192+3, PGPHASHALGO_SIMD_224 = 200+0,
  PGPHASHALGO_SIMD_256 = 200+1, PGPHASHALGO_SIMD_384 = 200+2, PGPHASHALGO_SIMD_512 = 200+3, PGPHASHALGO_ARIRANG_224 = 208+0,
  PGPHASHALGO_ARIRANG_256 = 208+1, PGPHASHALGO_ARIRANG_384 = 208+2, PGPHASHALGO_ARIRANG_512 = 208+3, PGPHASHALGO_LANE_224 = 212+0,
  PGPHASHALGO_LANE_256 = 212+1, PGPHASHALGO_LANE_384 = 212+2, PGPHASHALGO_LANE_512 = 212+3, PGPHASHALGO_LUFFA_224 = 216+0,
  PGPHASHALGO_LUFFA_256 = 216+1, PGPHASHALGO_LUFFA_384 = 216+2, PGPHASHALGO_LUFFA_512 = 216+3, PGPHASHALGO_CHI_224 = 224+0,
  PGPHASHALGO_CHI_256 = 224+1, PGPHASHALGO_CHI_384 = 224+2, PGPHASHALGO_CHI_512 = 224+3, PGPHASHALGO_JH_224 = 232+0,
  PGPHASHALGO_JH_256 = 232+1, PGPHASHALGO_JH_384 = 232+2, PGPHASHALGO_JH_512 = 232+3, PGPHASHALGO_GROESTL_224 = 240+0,
  PGPHASHALGO_GROESTL_256 = 240+1, PGPHASHALGO_GROESTL_384 = 240+2, PGPHASHALGO_GROESTL_512 = 240+3, PGPHASHALGO_HAMSI_224 = 248+0,
  PGPHASHALGO_HAMSI_256 = 248+1, PGPHASHALGO_HAMSI_384 = 248+2, PGPHASHALGO_HAMSI_512 = 248+3
}
 9.4. More...
enum  rpmDigestFlags_e { RPMDIGEST_NONE = 0 }
 Bit(s) to control digest operation. More...

Functions

pgpHashAlgo rpmDigestAlgo (DIGEST_CTX ctx)
 Return digest algorithm identifier.
rpmDigestFlags rpmDigestF (DIGEST_CTX ctx)
 Return digest flags.
const char * rpmDigestName (DIGEST_CTX ctx)
 Return digest name.
const char * rpmDigestASN1 (DIGEST_CTX ctx)
 Return digest ASN1 oid string.
DIGEST_CTX rpmDigestDup (DIGEST_CTX octx)
 Duplicate a digest context.
DIGEST_CTX rpmDigestInit (pgpHashAlgo hashalgo, rpmDigestFlags flags)
 Initialize digest.
int rpmDigestUpdate (DIGEST_CTX ctx, const void *data, size_t len)
 Update context with next plain text buffer.
int rpmDigestFinal (DIGEST_CTX ctx, void *datap, size_t *lenp, int asAscii)
 Return digest and destroy context.
int rpmHmacInit (DIGEST_CTX ctx, const void *key, size_t keylen)
 Compute key material and add to digest context.
static int xislower (int c)
static int xisupper (int c)
static int xisalpha (int c)
static int xisdigit (int c)
static int xisalnum (int c)
static int xisblank (int c)
static int xisspace (int c)
static int xiscntrl (int c)
static int xisascii (int c)
static int xisprint (int c)
static int xisgraph (int c)
static int xispunct (int c)
static int xtolower (int c)
static int xtoupper (int c)
int xstrcasecmp (const char *s1, const char *s2)
 Locale insensitive strcasecmp(3).
int xstrncasecmp (const char *s1, const char *s2, size_t n)
 Locale insensitive strncasecmp(3).
const char * xstrtolocale (const char *str)
 Force encoding of string.
rpmiob rpmiobUnlink (rpmiob iob)
 Unreference a I/O buffer instance.
rpmiob rpmiobLink (rpmiob iob)
 Reference a I/O buffer instance.
rpmiob rpmiobFree (rpmiob iob)
 Destroy a I/O buffer instance.
rpmiob rpmiobNew (size_t len)
 Create an I/O buffer.
rpmiob rpmiobEmpty (rpmiob iob)
 Empty an I/O buffer.
rpmiob rpmiobRTrim (rpmiob iob)
 Trim trailing white space.
rpmiob rpmiobAppend (rpmiob iob, const char *s, size_t nl)
 Append string to I/O buffer.
rpmuint8_trpmiobBuf (rpmiob iob)
 Return I/O buffer.
char * rpmiobStr (rpmiob iob)
 Return I/O buffer (as string).
size_t rpmiobLen (rpmiob iob)
 Return I/O buffer len.
rpmioP rpmioPFree (rpmioP P)
 Destroy a rpmioP object.
rpmRC rpmioParse (rpmioP *Pptr, const char *str)
 Parse next command out of a string incrementally.
static void * _free (const void *p)
 Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.

Variables

size_t _rpmiob_chunk

Detailed Description

Definition in file rpmiotypes.h.

Macro Definition Documentation

#define rpmiobFree (   _iob)    ((rpmiob)rpmioFreePoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))

Definition at line 519 of file rpmiotypes.h.

#define rpmiobLink (   _iob)    ((rpmiob)rpmioLinkPoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))

Definition at line 507 of file rpmiotypes.h.

#define rpmiobUnlink (   _iob)    ((rpmiob)rpmioUnlinkPoolItem((rpmioItem)(_iob), __FUNCTION__, __FILE__, __LINE__))

Definition at line 495 of file rpmiotypes.h.

Typedef Documentation

typedef const void* fnpyKey

Definition at line 118 of file rpmiotypes.h.

typedef void* rpmCallbackData

Definition at line 146 of file rpmiotypes.h.

Bit(s) to identify progress callbacks.

typedef struct rpmioItem_s* rpmioItem

Definition at line 38 of file rpmiotypes.h.

typedef struct rpmioPool_s* rpmioPool

Definition at line 53 of file rpmiotypes.h.

typedef unsigned short rpmuint16_t

Definition at line 24 of file rpmiotypes.h.

typedef unsigned int rpmuint32_t

Definition at line 25 of file rpmiotypes.h.

typedef unsigned long long rpmuint64_t

Definition at line 26 of file rpmiotypes.h.

Enumeration Type Documentation

Bit(s) to identify progress callbacks.

Enumerator:
RPMCALLBACK_UNKNOWN 
RPMCALLBACK_INST_PROGRESS 
RPMCALLBACK_INST_START 
RPMCALLBACK_INST_OPEN_FILE 
RPMCALLBACK_INST_CLOSE_FILE 
RPMCALLBACK_TRANS_PROGRESS 
RPMCALLBACK_TRANS_START 
RPMCALLBACK_TRANS_STOP 
RPMCALLBACK_UNINST_PROGRESS 
RPMCALLBACK_UNINST_START 
RPMCALLBACK_UNINST_STOP 
RPMCALLBACK_REPACKAGE_PROGRESS 
RPMCALLBACK_REPACKAGE_START 
RPMCALLBACK_REPACKAGE_STOP 
RPMCALLBACK_UNPACK_ERROR 
RPMCALLBACK_CPIO_ERROR 
RPMCALLBACK_SCRIPT_ERROR 

Definition at line 124 of file rpmiotypes.h.

Function Documentation

rpmiob rpmiobAppend ( rpmiob  iob,
const char *  s,
size_t  nl 
)
rpmuint8_t* rpmiobBuf ( rpmiob  iob)

Return I/O buffer.

Parameters
iobI/O buffer
Returns
I/O buffer (as octets)

Definition at line 103 of file rpmiob.c.

References _rpmiob_debug.

rpmiob rpmiobEmpty ( rpmiob  iob)

Empty an I/O buffer.

Parameters
iobI/O buffer
Returns
I/O buffer

Definition at line 57 of file rpmiob.c.

References _rpmiob_debug.

Referenced by rpmfcGenerateScriptletDeps().

rpmiob rpmiobFree ( rpmiob  iob)
size_t rpmiobLen ( rpmiob  iob)

Return I/O buffer len.

Parameters
iobI/O buffer
Returns
I/O buffer length

Definition at line 123 of file rpmiob.c.

References _rpmiob_debug.

Referenced by rpmfcExec().

rpmiob rpmiobLink ( rpmiob  iob)

Reference a I/O buffer instance.

Parameters
iobI/O buffer
Returns
new I/O buffer reference

Referenced by rpmiobNew().

rpmiob rpmiobNew ( size_t  len)
rpmiob rpmiobRTrim ( rpmiob  iob)

Trim trailing white space.

Parameters
iobI/O buffer
Returns
I/O buffer

Definition at line 67 of file rpmiob.c.

References _rpmiob_debug, and xisspace().

Referenced by parseDescription(), parseScript(), rpmfcGenerateScriptletDeps(), and rpmsqlRun().

char* rpmiobStr ( rpmiob  iob)
rpmiob rpmiobUnlink ( rpmiob  iob)

Unreference a I/O buffer instance.

Parameters
iobhash table
Returns
NULL if free'd
rpmRC rpmioParse ( rpmioP Pptr,
const char *  str 
)

Parse next command out of a string incrementally.

Parameters
*Pptrparser state
strstring to parse
Returns
RPMRC_OK on success

Definition at line 951 of file poptIO.c.

References _free(), rpmioP_s::ac, argvAdd(), argvFree(), rpmioP_s::av, matchchar(), rpmioP_s::next, RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, rpmioP_s::str, xcalloc(), and xstrdup().

rpmioP rpmioPFree ( rpmioP  P)

Destroy a rpmioP object.

Parameters
Pparser state
Returns
NULL

Definition at line 941 of file poptIO.c.

References _free(), argvFree(), rpmioP_s::av, and rpmioP_s::str.

static int xisalnum ( int  c)
inlinestatic
static int xisalpha ( int  c)
inlinestatic

Definition at line 431 of file rpmiotypes.h.

References xislower(), and xisupper().

Referenced by doDefine(), doUndefine(), dpkgEVRctype(), parseBits(), rdToken(), xisalnum(), and xisrpmalpha().

static int xisascii ( int  c)
inlinestatic

Definition at line 449 of file rpmiotypes.h.

Referenced by xisgraph(), and xisprint().

static int xisblank ( int  c)
inlinestatic

Definition at line 440 of file rpmiotypes.h.

Referenced by xisspace().

static int xiscntrl ( int  c)
inlinestatic

Definition at line 446 of file rpmiotypes.h.

static int xisdigit ( int  c)
inlinestatic
static int xisgraph ( int  c)
inlinestatic

Definition at line 455 of file rpmiotypes.h.

References xisascii().

Referenced by xispunct().

static int xislower ( int  c)
inlinestatic

Definition at line 425 of file rpmiotypes.h.

Referenced by xisalpha(), and xtoupper().

static int xisprint ( int  c)
inlinestatic

Definition at line 452 of file rpmiotypes.h.

References xisascii().

Referenced by fmtDBT().

static int xispunct ( int  c)
inlinestatic

Definition at line 458 of file rpmiotypes.h.

References xisalnum(), and xisgraph().

Referenced by xisrpmalpha().

static int xisspace ( int  c)
inlinestatic
static int xisupper ( int  c)
inlinestatic

Definition at line 428 of file rpmiotypes.h.

Referenced by xisalpha(), and xtolower().

static int xtolower ( int  c)
inlinestatic

Definition at line 462 of file rpmiotypes.h.

References xisupper().

Referenced by _tagCanonicalize(), myTagName(), rpmRebuildTargetVars(), xstrcasecmp(), and xstrncasecmp().

static int xtoupper ( int  c)
inlinestatic

Definition at line 465 of file rpmiotypes.h.

References xislower().

Referenced by _tagCanonicalize().