rpm  5.4.10
rpmio_internal.h
Go to the documentation of this file.
1 #ifndef H_RPMIO_INTERNAL
2 #define H_RPMIO_INTERNAL
3 
8 #include <rpmiotypes.h>
9 #include <rpmlog.h>
10 #include <rpmio.h>
11 #include <rpmurl.h>
12 
13 #define _RPMPGP_INTERNAL
14 #include <rpmpgp.h>
15 
16 #include <rpmxar.h>
17 
18 /*@access pgpDig @*/ /* XXX FIXME: (by refactoring to foo.c) */
19 /*@access rpmxar @*/ /* XXX FIXME: (by refactoring to foo.c) */
20 
23 typedef struct _FDSTACK_s {
24 /*@exposed@*/
26 /*@dependent@*/
27  void * fp;
28  int fdno;
29 } FDSTACK_t;
30 
34 typedef enum fdOpX_e {
41 } fdOpX;
42 
46 typedef /*@abstract@*/ struct {
48 } * FDSTAT_t;
49 
52 typedef struct _FDDIGEST_s {
54 } * FDDIGEST_t;
55 
59 struct _FD_s {
60  struct rpmioItem_s _item;
61  int flags;
62 #define RPMIO_DEBUG_IO 0x40000000
63 #define RPMIO_DEBUG_REFS 0x20000000
64  int magic;
65 #define FDMAGIC 0x04463138
66  int nfps;
67  FDSTACK_t fps[8];
68 
69 /*@dependent@*/ /*@relnull@*/
70  void * u; /* ufdio: URL info */
71 /*@relnull@*/
72  void * req; /* ufdio: HTTP request */
73 
74  int rd_timeoutsecs; /* ufdRead: per FD_t timer */
75  ssize_t bytesRemain; /* ufdio: */
76  ssize_t contentLength; /* ufdio: */
77  int persist; /* ufdio: */
78  int wr_chunked; /* ufdio: */
79 
80  int syserrno; /* last system errno encountered */
81 /*@observer@*/
82  const void *errcookie; /* gzdio/bzdio/ufdio: */
83 
84 /*null@*/
85  const char *opath; /* open(2) args. */
86  int oflags;
87  mode_t omode;
88 
89 /*@refcounted@*/ /*@relnull@*/
90  rpmxar xar; /* xar archive wrapper */
91 /*@refcounted@*/ /*@relnull@*/
92  pgpDig dig; /* signature parameters */
93 
94  FDSTAT_t stats; /* I/O statistics */
95 
96  size_t ndigests;
98 
99 /*null@*/
100  const char *contentType; /* ufdio: (HTTP) */
101 /*null@*/
102  const char *contentDisposition; /* ufdio: (HTTP) */
103  time_t lastModified; /* ufdio: (HTTP) */
104  int ftpFileDoneNeeded; /* ufdio: (FTP) */
105  unsigned long long fd_cpioPos; /* cpio: */
106 #if defined(__LCLINT__)
107 /*@refs@*/
108  int nrefs;
109 #endif
110 };
111 /*@access FD_t@*/
112 
113 #define FDSANE(fd) assert(fd != NULL && fd->magic == FDMAGIC)
114 
115 #define DBG(_f, _m, _x) \
116  /*@-modfilesys@*/ \
117  if ((_rpmio_debug | ((_f) ? ((FD_t)(_f))->flags : 0)) & (_m)) fprintf _x \
118  /*@=modfilesys@*/
119 
120 #if defined(__LCLINT__XXX)
121 #define DBGIO(_f, _x)
122 #define DBGREFS(_f, _x)
123 #else
124 #define DBGIO(_f, _x) DBG((_f), RPMIO_DEBUG_IO, _x)
125 #define DBGREFS(_f, _x) DBG((_f), RPMIO_DEBUG_REFS, _x)
126 #endif
127 
128 #ifdef __cplusplus
129 extern "C" {
130 #endif
131 
134 /*@observer@*/ const char * fdbg(/*@null@*/ FD_t fd)
135  /*@*/;
136 
139 int fdFgets(FD_t fd, char * buf, size_t len)
140  /*@globals errno, fileSystem @*/
141  /*@modifies *buf, fd, errno, fileSystem @*/;
142 
145 /*@null@*/ FD_t ftpOpen(const char *url, /*@unused@*/ int flags,
146  /*@unused@*/ mode_t mode, /*@out@*/ urlinfo *uret)
147  /*@globals h_errno, fileSystem, internalState @*/
148  /*@modifies *uret, fileSystem, internalState @*/;
149 
152 int ftpReq(FD_t data, const char * ftpCmd, const char * ftpArg)
153  /*@globals fileSystem, internalState @*/
154  /*@modifies data, fileSystem, internalState @*/;
155 
158 int ftpCmd(const char * cmd, const char * url, const char * arg2)
159  /*@globals h_errno, fileSystem, internalState @*/
160  /*@modifies fileSystem, internalState @*/;
161 
164 int ufdClose( /*@only@*/ void * cookie)
165  /*@globals fileSystem, internalState @*/
166  /*@modifies cookie, fileSystem, internalState @*/;
167 
170 /*@unused@*/ static inline
171 void fdSetOpen(FD_t fd, const char * path, int flags, mode_t mode)
172  /*@modifies fd @*/
173 {
174  FDSANE(fd);
175  if (fd->opath != NULL) {
176  free((void *)fd->opath);
177  fd->opath = NULL;
178  }
179  fd->opath = xstrdup(path);
180  fd->oflags = flags;
181  fd->omode = mode;
182 }
183 
186 /*@unused@*/ static inline
187 /*@null@*/ /*@observer@*/ const char * fdGetOPath(FD_t fd)
188  /*@*/
189 {
190  FDSANE(fd);
191  return fd->opath;
192 }
193 
196 /*@unused@*/ static inline
198  /*@*/
199 {
200  FDSANE(fd);
201  return fd->oflags;
202 }
203 
206 /*@unused@*/ static inline
207 mode_t fdGetOMode(FD_t fd)
208  /*@*/
209 {
210  FDSANE(fd);
211  return fd->omode;
212 }
213 
216 /*@unused@*/ static inline
217 void fdSetDig(FD_t fd, pgpDig dig)
218  /*@globals fileSystem @*/
219  /*@modifies fd, dig, fileSystem @*/
220 {
221  FDSANE(fd);
222 /*@-assignexpose -castexpose @*/
223  fd->dig = pgpDigFree(fd->dig);
224  fd->dig = pgpDigLink(dig);
225 /*@=assignexpose =castexpose @*/
226 }
227 
230 /*@unused@*/ static inline
231 /*@null@*/ pgpDig fdGetDig(FD_t fd)
232  /*@*/
233 {
234  FDSANE(fd);
235  /*@-compdef -retexpose -refcounttrans -usereleased @*/
236  return fd->dig;
237  /*@=compdef =retexpose =refcounttrans =usereleased @*/
238 }
239 
242 /*@unused@*/ static inline
243 void fdSetXAR(FD_t fd, rpmxar xar)
244  /*@globals fileSystem @*/
245  /*@modifies fd, xar, fileSystem @*/
246 {
247  FDSANE(fd);
248 /*@-assignexpose -castexpose @*/
249  fd->xar = rpmxarLink(xar, "fdSetXAR");
250 /*@=assignexpose =castexpose @*/
251 }
252 
255 /*@unused@*/ static inline
256 /*@null@*/ rpmxar fdGetXAR(FD_t fd)
257  /*@*/
258 {
259  FDSANE(fd);
260  /*@-compdef -refcounttrans -retexpose -usereleased @*/
261  return fd->xar;
262  /*@=compdef =refcounttrans =retexpose =usereleased @*/
263 }
264 
267 /*@unused@*/ static inline
268 /*@null@*/ FDIO_t fdGetIo(FD_t fd)
269  /*@*/
270 {
271  FDSANE(fd);
272  return fd->fps[fd->nfps].io;
273 }
274 
277 /*@-nullstate@*/ /* FIX: io may be NULL */
278 /*@unused@*/ static inline
279 void fdSetIo(FD_t fd, /*@kept@*/ /*@null@*/ FDIO_t io)
280  /*@modifies fd @*/
281 {
282  FDSANE(fd);
283  /*@-assignexpose@*/
284  fd->fps[fd->nfps].io = io;
285  /*@=assignexpose@*/
286 }
287 /*@=nullstate@*/
288 
291 /*@unused@*/ static inline
292 /*@exposed@*/ /*@dependent@*/ /*@null@*/ FILE * fdGetFILE(FD_t fd)
293  /*@*/
294 {
295  FDSANE(fd);
296  /*@+voidabstract@*/
297  return ((FILE *)fd->fps[fd->nfps].fp);
298  /*@=voidabstract@*/
299 }
300 
303 /*@unused@*/ static inline
304 /*@exposed@*/ /*@dependent@*/ /*@null@*/ void * fdGetFp(FD_t fd)
305  /*@*/
306 {
307  FDSANE(fd);
308  return fd->fps[fd->nfps].fp;
309 }
310 
313 /*@-nullstate@*/ /* FIX: fp may be NULL */
314 /*@unused@*/ static inline
315 void fdSetFp(FD_t fd, /*@kept@*/ /*@null@*/ void * fp)
316  /*@modifies fd @*/
317 {
318  FDSANE(fd);
319  /*@-assignexpose@*/
320  fd->fps[fd->nfps].fp = fp;
321  /*@=assignexpose@*/
322 }
323 /*@=nullstate@*/
324 
327 /*@unused@*/ static inline
329  /*@*/
330 {
331  FDSANE(fd);
332  return fd->fps[fd->nfps].fdno;
333 }
334 
337 /*@unused@*/ static inline
338 void fdSetFdno(FD_t fd, int fdno)
339  /*@modifies fd @*/
340 {
341  FDSANE(fd);
342  fd->fps[fd->nfps].fdno = fdno;
343 }
344 
347 /*@unused@*/ static inline
348 void fdSetContentLength(FD_t fd, ssize_t contentLength)
349  /*@modifies fd @*/
350 {
351  FDSANE(fd);
352  fd->contentLength = fd->bytesRemain = contentLength;
353 }
354 
357 /*@unused@*/ static inline
358 void fdPush(FD_t fd, FDIO_t io, void * fp, int fdno)
359  /*@modifies fd @*/
360 {
361  FDSANE(fd);
362  if (fd->nfps >= (int)(sizeof(fd->fps)/sizeof(fd->fps[0]) - 1))
363  return;
364  fd->nfps++;
365  fdSetIo(fd, io);
366  fdSetFp(fd, fp);
367  fdSetFdno(fd, fdno);
368 }
369 
372 /*@unused@*/ static inline
373 void fdPop(FD_t fd)
374  /*@modifies fd @*/
375 {
376  FDSANE(fd);
377  if (fd->nfps < 0) return;
378  fdSetIo(fd, NULL);
379  fdSetFp(fd, NULL);
380  fdSetFdno(fd, -1);
381  fd->nfps--;
382 }
383 
386 /*@unused@*/ static inline /*@null@*/
387 rpmop fdstat_op(/*@null@*/ FD_t fd, fdOpX opx)
388  /*@*/
389 {
390  rpmop op = NULL;
391 
392  if (fd != NULL && fd->stats != NULL && (int)opx >= 0 && opx < FDSTAT_MAX)
393  op = fd->stats->ops + opx;
394  return op;
395 }
396 
399 /*@unused@*/ static inline
400 void fdstat_enter(/*@null@*/ FD_t fd, int opx)
401  /*@globals internalState @*/
402  /*@modifies internalState @*/
403 {
404  if (fd == NULL) return;
405  if (fd->stats != NULL)
406  (void) rpmswEnter(fdstat_op(fd, (fdOpX) opx), 0);
407 }
408 
411 /*@unused@*/ static inline
412 void fdstat_exit(/*@null@*/ FD_t fd, int opx, ssize_t rc)
413  /*@globals internalState @*/
414  /*@modifies fd, internalState @*/
415 {
416  if (fd == NULL) return;
417  if (rc == -1)
418  fd->syserrno = errno;
419  else if (rc > 0 && fd->bytesRemain > 0)
420  switch (opx) {
421  case FDSTAT_READ:
422  case FDSTAT_WRITE:
423  fd->bytesRemain -= rc;
424  break;
425  default:
426  break;
427  }
428  if (fd->stats != NULL)
429  (void) rpmswExit(fdstat_op(fd, (fdOpX) opx), rc);
430 }
431 
434 /*@unused@*/ static inline
435 void fdstat_print(/*@null@*/ FD_t fd, const char * msg, FILE * fp)
436  /*@globals fileSystem @*/
437  /*@modifies *fp, fileSystem @*/
438 {
439  static int usec_scale = (1000*1000);
440  int opx;
441 
442  if (fd == NULL || fd->stats == NULL) return;
443  for (opx = 0; opx < 4; opx++) {
444  rpmop op = &fd->stats->ops[opx];
445  if (op->count <= 0) continue;
446  switch (opx) {
447  case FDSTAT_READ:
448  if (msg != NULL) fprintf(fp, "%s:", msg);
449  fprintf(fp, "%8d reads, %8lu total bytes in %d.%06d secs\n",
450  op->count, (unsigned long)op->bytes,
451  (int)(op->usecs/usec_scale), (int)(op->usecs%usec_scale));
452  /*@switchbreak@*/ break;
453  case FDSTAT_WRITE:
454  if (msg != NULL) fprintf(fp, "%s:", msg);
455  fprintf(fp, "%8d writes, %8lu total bytes in %d.%06d secs\n",
456  op->count, (unsigned long)op->bytes,
457  (int)(op->usecs/usec_scale), (int)(op->usecs%usec_scale));
458  /*@switchbreak@*/ break;
459  case FDSTAT_SEEK:
460  /*@switchbreak@*/ break;
461  case FDSTAT_CLOSE:
462  /*@switchbreak@*/ break;
463  }
464  }
465 }
466 
469 /*@unused@*/ static inline
470 void fdSetSyserrno(FD_t fd, int syserrno, /*@kept@*/ const void * errcookie)
471  /*@modifies fd @*/
472 {
473  FDSANE(fd);
474  fd->syserrno = syserrno;
475  /*@-assignexpose@*/
476  fd->errcookie = errcookie;
477  /*@=assignexpose@*/
478 }
479 
482 /*@unused@*/ static inline
484  /*@*/
485 {
486  FDSANE(fd);
487  return fd->rd_timeoutsecs;
488 }
489 
492 /*@unused@*/ static inline
493 unsigned long long fdGetCpioPos(FD_t fd)
494  /*@*/
495 {
496  FDSANE(fd);
497  return fd->fd_cpioPos;
498 }
499 
502 /*@unused@*/ static inline
503 void fdSetCpioPos(FD_t fd, long int cpioPos)
504  /*@modifies fd @*/
505 {
506  FDSANE(fd);
507  fd->fd_cpioPos = cpioPos;
508 }
509 
512 /*@mayexit@*/ /*@unused@*/ static inline
513 FD_t c2f(/*@null@*/ void * cookie)
514  /*@*/
515 {
516  /*@-castexpose@*/
517  FD_t fd = (FD_t) cookie;
518  /*@=castexpose@*/
519  FDSANE(fd);
520  /*@-refcounttrans -retalias@*/ return fd; /*@=refcounttrans =retalias@*/
521 }
522 
526 /*@unused@*/ static inline
527 void fdInitDigest(FD_t fd, pgpHashAlgo hashalgo, int _flags)
528  /*@globals internalState @*/
529  /*@modifies fd, internalState @*/
530 {
531  rpmDigestFlags flags = (rpmDigestFlags) _flags;
532 /*@+voidabstract@*/
533  fd->digests = (DIGEST_CTX *) xrealloc(fd->digests,
534  (fd->ndigests + 1) * sizeof(*fd->digests));
535 /*@=voidabstract@*/
537  fd->digests[fd->ndigests++] = rpmDigestInit(hashalgo, flags);
538  fdstat_exit(fd, FDSTAT_DIGEST, 0);
539 }
540 
544 /*@unused@*/ static inline
545 void fdInitHmac(FD_t fd, const void * key, size_t keylen)
546  /*@globals internalState @*/
547  /*@modifies internalState @*/
548 {
549  if (fd->digests != NULL && fd->ndigests > 0 && key != NULL)
550  (void) rpmHmacInit(fd->digests[fd->ndigests-1], key, keylen);
551 }
552 
556 /*@unused@*/ static inline
557 void fdUpdateDigests(FD_t fd, const unsigned char * buf, ssize_t buflen)
558  /*@globals internalState @*/
559  /*@modifies fd, internalState @*/
560 {
561  int i;
562 
563  if (fd->ndigests > 0 && buf != NULL && buflen > 0) {
565 #if defined(_OPENMP)
566 #pragma omp parallel for if (fd->ndigests > 1)
567 #endif
568  for (i = fd->ndigests - 1; i >= 0; i--) {
569  DIGEST_CTX ctx = fd->digests[i];
570  if (ctx == NULL)
571  continue;
572  (void) rpmDigestUpdate(ctx, buf, buflen);
573  }
574  fdstat_exit(fd, FDSTAT_DIGEST, buflen);
575  }
576 }
577 
580 /*@unused@*/ static inline
581 void fdFiniDigest(FD_t fd, pgpHashAlgo hashalgo,
582  /*@null@*/ /*@out@*/ void * datap,
583  /*@null@*/ /*@out@*/ size_t * lenp,
584  int asAscii)
585  /*@globals internalState @*/
586  /*@modifies fd, *datap, *lenp, internalState @*/
587 {
588  int i = -1;
589 
590  if (fd->ndigests > 0) {
592  for (i = fd->ndigests - 1; i >= 0; i--) {
593  DIGEST_CTX ctx = fd->digests[i];
594  if (ctx == NULL)
595  continue;
596  if (rpmDigestAlgo(ctx) != hashalgo)
597  continue;
598  fd->digests[i] = NULL;
599  (void) rpmDigestFinal(ctx, datap, lenp, asAscii);
600  break;
601  }
602  fdstat_exit(fd, FDSTAT_DIGEST, 0);
603  }
604  if (i < 0) {
605  if (datap != NULL) *(void **)datap = NULL;
606  if (lenp != NULL) *lenp = 0;
607  }
608 }
609 
612 /*@-mustmod@*/
613 /*@unused@*/ static inline
614 void fdStealDigest(FD_t fd, pgpDig dig)
615  /*@modifies fd, dig @*/
616 {
617  int i;
618 /*@-type@*/ /* FIX: getters for pgpDig internals */
619  if (fd->ndigests > 0)
620  for (i = fd->ndigests - 1; i >= 0; i--) {
621  DIGEST_CTX ctx = fd->digests[i];
622  if (ctx != NULL)
623  switch (rpmDigestAlgo(ctx)) {
624  case PGPHASHALGO_MD5:
625 assert(dig->md5ctx == NULL);
626 /*@-assignexpose -onlytrans@*/
627  dig->md5ctx = ctx;
628 /*@=assignexpose =onlytrans@*/
629  fd->digests[i] = NULL;
630  /*@switchbreak@*/ break;
631  case PGPHASHALGO_SHA1:
633  case PGPHASHALGO_SHA256:
634  case PGPHASHALGO_SHA384:
635  case PGPHASHALGO_SHA512:
636 assert(dig->sha1ctx == NULL);
637 /*@-assignexpose -onlytrans@*/
638  dig->sha1ctx = ctx;
639 /*@=assignexpose =onlytrans@*/
640  fd->digests[i] = NULL;
641  /*@switchbreak@*/ break;
642  default:
643  /*@switchbreak@*/ break;
644  }
645  }
646 /*@=type@*/
647 }
648 /*@=mustmod@*/
649 
650 /*@-shadow@*/
653 /*@unused@*/ static inline
654 int fdFileno(/*@null@*/ void * cookie)
655  /*@*/
656 {
657  FD_t fd;
658  if (cookie == NULL) return -2;
659  fd = c2f(cookie);
660  return fd->fps[0].fdno;
661 }
662 /*@=shadow@*/
663 
664 #ifdef __cplusplus
665 }
666 #endif
667 
668 #endif /* H_RPMIO_INTERNAL */
Structure(s)and methods for a XAR archive wrapper format.
FDSTAT_t stats
struct rpmxar_s * rpmxar
Definition: rpmxar.h:14
rpmtime_t rpmswExit(rpmop op, ssize_t rc)
Exit timed operation.
Definition: rpmsw.c:264
pgpDig pgpDigFree(pgpDig dig)
Destroy a container for parsed OpenPGP packates.
static void fdstat_enter(FD_t fd, int opx)
static int fdGetFdno(FD_t fd)
static void * fdGetFp(FD_t fd)
static void fdSetFdno(FD_t fd, int fdno)
rpmtime_t usecs
Definition: rpmsw.h:37
OpenPGP constants and structures from RFC-2440.
ssize_t bytesRemain
int fdFgets(FD_t fd, char *buf, size_t len)
Definition: rpmio.c:685
time_t lastModified
char * xstrdup(const char *str)
Definition: rpmmalloc.c:322
URL control structure.
Definition: rpmurl.h:52
int magic
DIGEST_CTX rpmDigestInit(pgpHashAlgo hashalgo, rpmDigestFlags flags)
Initialize digest.
Definition: digest.c:244
static const char * fdGetOPath(FD_t fd)
struct @6 * FDSTAT_t
Cumulative statistics for a descriptor.
enum pgpHashAlgo_e pgpHashAlgo
9.4.
static pgpDig fdGetDig(FD_t fd)
DIGEST_CTX hashctx
static mode_t fdGetOMode(FD_t fd)
#define FDSANE(fd)
const void * errcookie
pgpDig dig
const char * contentType
int errno
static void fdPush(FD_t fd, FDIO_t io, void *fp, int fdno)
static void fdInitHmac(FD_t fd, const void *key, size_t keylen)
Attach digest to fd.
pgpDig pgpDigLink(pgpDig dig)
Reference a signature parameters instance.
int rd_timeoutsecs
Definition: rpmio.h:107
enum rpmDigestFlags_e rpmDigestFlags
Bit(s) to control digest operation.
fdOpX_e
Identify per-desciptor I/O operation statistics.
int persist
static FDIO_t fdGetIo(FD_t fd)
static void fdInitDigest(FD_t fd, pgpHashAlgo hashalgo, int _flags)
Attach digest to fd.
int nfps
DIGEST_CTX * digests
static void fdSetSyserrno(FD_t fd, int syserrno, const void *errcookie)
static rpmop fdstat_op(FD_t fd, fdOpX opx)
int rpmHmacInit(DIGEST_CTX ctx, const void *key, size_t keylen)
Compute key material and add to digest context.
Definition: digest.c:983
static void fdUpdateDigests(FD_t fd, const unsigned char *buf, ssize_t buflen)
Update digest(s) attached to fd.
int flags
Yet Another syslog(3) API clone.
struct rpmop_s ops[FDSTAT_MAX]
int rpmDigestUpdate(DIGEST_CTX ctx, const void *data, size_t len)
Update context with next plain text buffer.
Definition: digest.c:907
int count
Definition: rpmsw.h:35
struct _FD_s * FD_t
Definition: rpmio.h:43
static void fdSetDig(FD_t fd, pgpDig dig)
static void fdstat_print(FD_t fd, const char *msg, FILE *fp)
int ftpCmd(const char *cmd, const char *url, const char *arg2)
Definition: rpmio.c:1671
int wr_chunked
static void fdPop(FD_t fd)
pgpHashAlgo rpmDigestAlgo(DIGEST_CTX ctx)
Return digest algorithm identifier.
Definition: digest.c:188
static void fdSetOpen(FD_t fd, const char *path, int flags, mode_t mode)
static void fdSetXAR(FD_t fd, rpmxar xar)
int ftpReq(FD_t data, const char *ftpCmd, const char *ftpArg)
Definition: rpmio.c:1274
Digest private data.
Definition: digest.c:127
static int fdGetOFlags(FD_t fd)
struct _FDSTACK_s FDSTACK_t
The FD_t File Handle data structure.
static void fdFiniDigest(FD_t fd, pgpHashAlgo hashalgo, void *datap, size_t *lenp, int asAscii)
struct pgpDig_s * pgpDig
Definition: rpmiotypes.h:83
ssize_t contentLength
enum fdOpX_e fdOpX
Identify per-desciptor I/O operation statistics.
static unsigned long long fdGetCpioPos(FD_t fd)
int rpmswEnter(rpmop op, ssize_t rc)
Enter timed operation.
Definition: rpmsw.c:248
static int fdFileno(void *cookie)
Cumulative statistics for an operation.
Definition: rpmsw.h:33
int syserrno
void * u
rpmxar xar
static void fdSetCpioPos(FD_t fd, long int cpioPos)
size_t ndigests
const char * fdbg(FD_t fd)
Definition: rpmio.c:197
static void fdSetIo(FD_t fd, FDIO_t io)
unsigned long long fd_cpioPos
FD_t ftpOpen(const char *url, int flags, mode_t mode, urlinfo *uret)
Definition: rpmio.c:2209
struct _FDDIGEST_s * FDDIGEST_t
int ufdClose(void *cookie)
Definition: rpmio.c:2090
const char * contentDisposition
static rpmxar fdGetXAR(FD_t fd)
static void fdSetContentLength(FD_t fd, ssize_t contentLength)
const char * opath
static FD_t c2f(void *cookie)
unsigned long long bytes
Definition: rpmsw.h:36
int rpmDigestFinal(DIGEST_CTX ctx, void *datap, size_t *lenp, int asAscii)
Return digest and destroy context.
Definition: digest.c:921
void * req
static FILE * fdGetFILE(FD_t fd)
int oflags
FDSTACK_t fps[8]
static void fdStealDigest(FD_t fd, pgpDig dig)
int ftpFileDoneNeeded
static void fdSetFp(FD_t fd, void *fp)
static void fdstat_exit(FD_t fd, int opx, ssize_t rc)
#define xrealloc
Definition: system.h:36
rpmxar rpmxarLink(rpmxar xar, const char *msg)
Reference a xar archive instance.
static int fdGetRdTimeoutSecs(FD_t fd)
mode_t omode