#include "system.h"
#include <netinet/in.h>
#include <rpmmacro.h>
#include <rpmmessages.h>
#include <rpmio_internal.h>
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | urlstring |
Defines | |
#define | IPPORT_FTP 21 |
#define | IPPORT_HTTP 80 |
#define | URL_IOBUF_SIZE 4096 |
#define | RPMURL_DEBUG_IO 0x40000000 |
#define | RPMURL_DEBUG_REFS 0x20000000 |
#define | URLDBG(_f, _m, _x) if ((_url_debug | (_f)) & (_m)) fprintf _x |
#define | URLDBGIO(_f, _x) URLDBG((_f), RPMURL_DEBUG_IO, _x) |
#define | URLDBGREFS(_f, _x) URLDBG((_f), RPMURL_DEBUG_REFS, _x) |
Functions | |
void * | _free (const void *p) |
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL. More... | |
urlinfo | XurlLink (urlinfo u, const char *msg, const char *file, unsigned line) |
urlinfo | XurlNew (const char *msg, const char *file, unsigned line) |
urlinfo | XurlFree (urlinfo u, const char *msg, const char *file, unsigned line) |
void | urlFreeCache (void) |
Free cached URL control structures. More... | |
int | urlStrcmp (const char *str1, const char *str2) |
void | urlFind (urlinfo *uret, int mustAsk) |
urltype | urlIsURL (const char *url) |
Return type of URL. More... | |
urltype | urlPath (const char *url, const char **pathp) |
Return path component of URL. More... | |
int | urlSplit (const char *url, urlinfo *uret) |
Parse URL string into a control structure. More... | |
int | urlGetFile (const char *url, const char *dest) |
Copy data from URL to local file. More... | |
Variables | |
int | url_iobuf_size = 4096 |
int | _url_debug = 0 |
urlinfo * | uCache = NULL |
int | uCount = 0 |
urlstring | urlstrings [] |
Definition in file url.c.
|
Definition at line 21 of file url.c. Referenced by urlSplit. |
|
Definition at line 24 of file url.c. Referenced by urlSplit. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
|
|
Definition at line 173 of file url.c. References _, _free, alloca, urlinfo::host, urlinfo::password, urlinfo::portstr, urlinfo::proxyh, urlinfo::proxyp, urlinfo::proxyu, rpmExpand, urlinfo::service, stpcpy, uCount, URL_IS_FTP, URL_IS_HTTP, urlFree, urlLink, URLSANE, urlStrcmp, urlinfo::urltype, urlinfo::user, xmalloc, xrealloc, and xstrdup. Referenced by urlSplit. |
|
Free cached URL control structures.
|
|
Copy data from URL to local file.
Definition at line 464 of file url.c. References _, Fclose, Ferror, Fopen, Fstrerror, FTPERR_UNKNOWN, ufdGetFile, Unlink, URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, and urlPath. Referenced by doUntar, and rpmInstall. |
|
Return type of URL.
Definition at line 320 of file url.c. References urlstring::leadin, urlstring::ret, URL_IS_UNKNOWN, urlstrings, and urltype. Referenced by main, rpmInstall, urlPath, and urlSplit. |
|
Return path component of URL.
Definition at line 336 of file url.c. References URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, urlIsURL, and urltype. Referenced by Access, addFile, buildForTarget, Chdir, db1close, db1open, db3close, db3open, doFoo, doPatch, doScript, doSetupMacro, doUntar, ftpNLST, genCpioListAndHeader, Glob, handlePreambleTag, Link, Lstat, makeTempFile, Mkdir, myGlobPatternP, Opendir, parseSpec, processBinaryFile, processSourceFiles, Readlink, Rename, Rmdir, rpmfileexists, rpmGenPath, rpmGlob, rpmInstall, Stat, Unlink, and urlGetFile. |
|
Parse URL string into a control structure.
Definition at line 373 of file url.c. References _, _free, urlinfo::host, IPPORT_FTP, IPPORT_HTTP, urlinfo::password, urlinfo::port, urlinfo::portstr, urlinfo::service, urlinfo::url, URL_IS_FTP, URL_IS_HTTP, urlFind, urlFree, urlIsURL, urlNew, urlinfo::urltype, urlinfo::user, and xstrdup. Referenced by doScript. |
|
Definition at line 161 of file url.c. Referenced by urlFind. |
|
Definition at line 82 of file url.c. References _, FDIO_s::_fdderef, FDIO_s::_fileno, _free, urlinfo::buf, FDIO_s::close, urlinfo::ctrl, urlinfo::data, Fclose, fdGetFp, fdio, fdPush, fpio, urlinfo::host, urlinfo::nrefs, urlinfo::password, urlinfo::portstr, urlinfo::proxyh, urlinfo::proxyu, urlinfo::service, urlinfo::url, URLDBGREFS, URLSANE, and urlinfo::user. |
|
Definition at line 54 of file url.c. References urlinfo::nrefs, URLDBGREFS, and URLSANE. Referenced by XurlNew. |
|
Definition at line 62 of file url.c. References urlinfo::buf, urlinfo::bufAlloced, urlinfo::ctrl, urlinfo::data, urlinfo::httpHasRange, urlinfo::httpVersion, urlinfo::magic, urlinfo::nrefs, urlinfo::port, urlinfo::proxyp, URL_IS_UNKNOWN, URLMAGIC, urlinfo::urltype, xmalloc, and XurlLink. |
|
|
|
|
|
Definition at line 40 of file url.c. Referenced by urlFind, and urlFreeCache. |
|
|
|
Referenced by urlIsURL. |