|
Defines |
#define | IPPORT_FTP 21 |
#define | IPPORT_HTTP 80 |
#define | FDNREFS(fd) (fd ? ((FD_t)fd)->nrefs : -9) |
#define | FDTO(fd) (fd ? ((FD_t)fd)->rd_timeoutsecs : -99) |
#define | FDCPIOPOS(fd) (fd ? ((FD_t)fd)->fd_cpioPos : -99) |
#define | FDONLY(fd) assert(fdGetIo(fd) == fdio) |
#define | GZDONLY(fd) assert(fdGetIo(fd) == gzdio) |
#define | BZDONLY(fd) assert(fdGetIo(fd) == bzdio) |
#define | UFDONLY(fd) |
#define | fdGetFILE(_fd) ((FILE *)fdGetFp(_fd)) |
#define | TIMEOUT_SECS 60 |
#define | IAC 255 |
#define | IP 244 |
#define | DM 242 |
#define | SHUT_RDWR 1+1 |
#define | FDIOVEC(_fd, _vec) ((fdGetIo(_fd) && fdGetIo(_fd)->_vec) ? fdGetIo(_fd)->_vec : NULL) |
Functions |
static int | inet_aton (const char *cp, struct in_addr *inp) |
static void * | _free (const void *p) |
| Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
|
static const char * | fdbg (FD_t fd) |
off_t | fdSize (FD_t fd) |
FD_t | fdDup (int fdno) |
static int | fdSeekNot (void *cookie, _libio_pos_t pos, int whence) |
static FD_t | XfdLink (void *cookie, const char *msg, const char *file, unsigned line) |
static FD_t | XfdFree (FD_t fd, const char *msg, const char *file, unsigned line) |
static FD_t | XfdNew (const char *msg, const char *file, unsigned line) |
ssize_t | fdRead (void *cookie, char *buf, size_t count) |
ssize_t | fdWrite (void *cookie, const char *buf, size_t count) |
static int | fdSeek (void *cookie, _libio_pos_t pos, int whence) |
int | fdClose (void *cookie) |
FD_t | fdOpen (const char *path, int flags, mode_t mode) |
int | fdWritable (FD_t fd, int secs) |
int | fdReadable (FD_t fd, int secs) |
int | fdFgets (FD_t fd, char *buf, size_t len) |
const char *const | ftpStrerror (int errorNumber) |
const char * | urlStrerror (const char *url) |
static int | mygethostbyname (const char *host, struct in_addr *address) |
static int | getHostAddress (const char *host, struct in_addr *address) |
static int | tcpConnect (FD_t ctrl, const char *host, int port) |
static int | checkResponse (void *uu, FD_t ctrl, int *ecp, char **str) |
static int | ftpCheckResponse (urlinfo u, char **str) |
static int | ftpCommand (urlinfo u, char **str,...) |
static int | ftpLogin (urlinfo u) |
int | ftpReq (FD_t data, const char *ftpCmd, const char *ftpArg) |
void | urlSetCallback (rpmCallbackFunction notify, void *notifyData, int notifyCount) |
int | ufdCopy (FD_t sfd, FD_t tfd) |
static int | urlConnect (const char *url, urlinfo *uret) |
int | ufdGetFile (FD_t sfd, FD_t tfd) |
int | ftpCmd (const char *cmd, const char *url, const char *arg2) |
static int | ftpAbort (urlinfo u, FD_t data) |
static int | ftpFileDone (urlinfo u, FD_t data) |
static int | httpResp (urlinfo u, FD_t ctrl, char **str) |
static int | httpReq (FD_t ctrl, const char *httpCmd, const char *httpArg) |
void * | ufdGetUrlinfo (FD_t fd) |
static ssize_t | ufdRead (void *cookie, char *buf, size_t count) |
static ssize_t | ufdWrite (void *cookie, const char *buf, size_t count) |
static int | ufdSeek (void *cookie, _libio_pos_t pos, int whence) |
int | ufdClose (void *cookie) |
FD_t | ftpOpen (const char *url, int flags, mode_t mode, urlinfo *uret) |
static FD_t | httpOpen (const char *url, int flags, mode_t mode, urlinfo *uret) |
static FD_t | ufdOpen (const char *url, int flags, mode_t mode) |
static const char * | getFdErrstr (FD_t fd) |
const char * | Fstrerror (FD_t fd) |
| strerror(3) clone.
|
size_t | Fread (void *buf, size_t size, size_t nmemb, FD_t fd) |
| fread(3) clone.
|
size_t | Fwrite (const void *buf, size_t size, size_t nmemb, FD_t fd) |
| fwrite(3) clone.
|
int | Fseek (FD_t fd, _libio_off_t offset, int whence) |
| fseek(3) clone.
|
int | Fclose (FD_t fd) |
| fclose(3) clone.
|
static void | cvtfmode (const char *m, char *stdio, size_t nstdio, char *other, size_t nother, const char **end, int *f) |
| Convert stdio fmode to open(2) mode, filtering out zlib/bzlib flags.
|
FD_t | Fdopen (FD_t ofd, const char *fmode) |
FD_t | Fopen (const char *path, const char *fmode) |
| fopen(3) clone.
|
int | Fflush (FD_t fd) |
| fflush(3) clone.
|
int | Ferror (FD_t fd) |
| ferror(3) clone.
|
int | Fileno (FD_t fd) |
| fileno(3) clone.
|
int | Fcntl (FD_t fd, int op, void *lip) |
| fcntl(2) clone.
|
int | rpmioSlurp (const char *fn, const byte **bp, ssize_t *blenp) |
Variables |
int | noLibio = 1 |
static int | ftpTimeoutSecs = 60 |
static int | httpTimeoutSecs = 60 |
int | _ftp_debug = 0 |
int | _rpmio_debug = 0 |
static struct FDIO_s | fdio_s |
FDIO_t | fdio = &fdio_s |
FDIO_t | fadio |
static rpmCallbackFunction | urlNotify = NULL |
static void * | urlNotifyData = NULL |
static int | urlNotifyCount = -1 |
static struct FDIO_s | ufdio_s |
FDIO_t | ufdio = &ufdio_s |
static struct FDIO_s | fpio_s |
FDIO_t | fpio = &fpio_s |