CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
download Namespace Reference

Classes

struct  Counters
 
struct  JobInfo
 
class  HeaderLists
 
class  CredentialsAttachment
 
class  DownloadManager
 

Enumerations

enum  Failures {
  kFailOk = 0, kFailLocalIO, kFailBadUrl, kFailProxyResolve,
  kFailHostResolve, kFailHostAfterProxy, kFailProxyConnection, kFailHostConnection,
  kFailProxyHttp, kFailHostHttp, kFailBadData, kFailTooBig,
  kFailOther, kFailUnsupportedProtocol, kFailProxyTooSlow, kFailHostTooSlow,
  kFailProxyShortTransfer, kFailHostShortTransfer, kFailNumEntries
}
 
enum  Destination {
  kDestinationMem = 1, kDestinationFile, kDestinationPath, kDestinationSink,
  kDestinationNone
}
 

Functions

static bool EscapeUrlChar (char input, char output[3])
 
static string EscapeUrl (const string &url)
 
static unsigned EscapeHeader (const string &header, char *escaped_buf, size_t buf_size)
 
static Failures PrepareDownloadDestination (JobInfo *info)
 
static size_t CallbackCurlHeader (void *ptr, size_t size, size_t nmemb, void *info_link)
 
static size_t CallbackCurlData (void *ptr, size_t size, size_t nmemb, void *info_link)
 
bool IsHostTransferError (const Failures error)
 
bool IsProxyTransferError (const Failures error)
 
const char * Code2Ascii (const Failures error)
 
static int PrintPacError (const char *fmt, va_list argp)
 
static string PacProxy2Cvmfs (const string &pac_proxy, const bool report_errors)
 
static bool ParsePac (const char *pac_data, const size_t size, DownloadManager *download_manager, string *proxies)
 
string AutoProxy (DownloadManager *download_manager)
 
string ResolveProxyDescription (const string &cvmfs_proxies, const std::string &path_fallback_cache, DownloadManager *download_manager)
 
static void AltCvmfsLogger (const LogSource source, const int mask, const char *msg)
 
int MainResolveProxyDescription (int argc, char **argv)
 
std::string ResolveProxyDescription (const std::string &cvmfs_proxies, const std::string &path_fallback_cache, DownloadManager *download_manager)
 

Variables

const char * kAutoPacLocation = "http://wpad/wpad.dat"
 

Detailed Description

This file is part of the CernVM File System.

This file is part of the CernVM File System.

The SimpleCatalogManager is a simplistic concrete implementation of the AbstractCatalogManager and allows for easy-to-use access to the catalog structure of a given repository. This class is tailored for simplicity, not for performance. Have a look into ClientCatalogManager if you are working on the CVMFS client.

Enumeration Type Documentation

Where to store downloaded data.

Enumerator
kDestinationMem 
kDestinationFile 
kDestinationPath 
kDestinationSink 
kDestinationNone 

Definition at line 113 of file download.h.

Possible return values. Adjust ObjectFetcher error handling if new network error conditions are added.

Enumerator
kFailOk 
kFailLocalIO 
kFailBadUrl 
kFailProxyResolve 
kFailHostResolve 
kFailHostAfterProxy 
kFailProxyConnection 
kFailHostConnection 
kFailProxyHttp 
kFailHostHttp 
kFailBadData 
kFailTooBig 
kFailOther 
kFailUnsupportedProtocol 
kFailProxyTooSlow 
kFailHostTooSlow 
kFailProxyShortTransfer 
kFailHostShortTransfer 
kFailNumEntries 

Definition at line 36 of file download.h.

Function Documentation

static void download::AltCvmfsLogger ( const LogSource  source,
const int  mask,
const char *  msg 
)
static

Definition at line 258 of file wpad.cc.

Referenced by MainResolveProxyDescription().

Here is the caller graph for this function:

std::string download::AutoProxy ( DownloadManager *  download_manager)

Tries to discover list of proxy description string. See: https://twiki.cern.ch/twiki/bin/view/LCG/HttpProxyDiscoveryProposal

Definition at line 153 of file wpad.cc.

Referenced by ResolveProxyDescription().

Here is the call graph for this function:

Here is the caller graph for this function:

static size_t download::CallbackCurlData ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  info_link 
)
static

Called by curl for every received data chunk.

Definition at line 268 of file download.cc.

Referenced by s3fanout::S3FanoutManager::AcquireCurlHandle(), and download::DownloadManager::AcquireCurlHandle().

Here is the call graph for this function:

Here is the caller graph for this function:

static size_t download::CallbackCurlHeader ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  info_link 
)
static

Called by curl for every HTTP header. Not called for file:// transfers.

Definition at line 174 of file download.cc.

Referenced by s3fanout::S3FanoutManager::AcquireCurlHandle(), and download::DownloadManager::AcquireCurlHandle().

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned download::EscapeHeader ( const string &  header,
char *  escaped_buf,
size_t  buf_size 
)
static

escaped array needs to be sufficiently large. It's size is calculated by passing NULL to EscapeHeader.

Definition at line 115 of file download.cc.

Referenced by download::DownloadManager::Fetch().

Here is the call graph for this function:

Here is the caller graph for this function:

static string download::EscapeUrl ( const string &  url)
static

Escape special chars from the URL, except for ':' and '/', which should keep their meaning.

Definition at line 93 of file download.cc.

Referenced by download::DownloadManager::SetUrlOptions().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool download::EscapeUrlChar ( char  input,
char  output[3] 
)
inlinestatic

Definition at line 68 of file download.cc.

Referenced by EscapeHeader(), and EscapeUrl().

Here is the caller graph for this function:

bool download::IsHostTransferError ( const Failures  error)
inline
bool download::IsProxyTransferError ( const Failures  error)
inline
int download::MainResolveProxyDescription ( int  argc,
char **  argv 
)

Definition at line 271 of file wpad.cc.

Referenced by AltProcessFlavor().

Here is the call graph for this function:

Here is the caller graph for this function:

static string download::PacProxy2Cvmfs ( const string &  pac_proxy,
const bool  report_errors 
)
static

Definition at line 42 of file wpad.cc.

Referenced by ParsePac().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool download::ParsePac ( const char *  pac_data,
const size_t  size,
DownloadManager *  download_manager,
string *  proxies 
)
static

Definition at line 88 of file wpad.cc.

Referenced by AutoProxy().

Here is the call graph for this function:

Here is the caller graph for this function:

static Failures download::PrepareDownloadDestination ( JobInfo *  info)
static

Definition at line 145 of file download.cc.

Referenced by download::DownloadManager::Fetch().

Here is the call graph for this function:

Here is the caller graph for this function:

static int download::PrintPacError ( const char *  fmt,
va_list  argp 
)
static

Definition at line 30 of file wpad.cc.

Referenced by ParsePac().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string download::ResolveProxyDescription ( const std::string &  cvmfs_proxies,
const std::string &  path_fallback_cache,
DownloadManager *  download_manager 
)

Uses AutoProxy to replace any "auto" proxy by the proxies from the PAC file

string download::ResolveProxyDescription ( const string &  cvmfs_proxies,
const std::string &  path_fallback_cache,
DownloadManager *  download_manager 
)

Definition at line 206 of file wpad.cc.

Referenced by MountPoint::CreateDownloadManagers(), MainResolveProxyDescription(), TalkManager::MainResponder(), and MountPoint::SetupExternalDownloadMgr().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const char* download::kAutoPacLocation = "http://wpad/wpad.dat"

Definition at line 28 of file wpad.cc.

Referenced by AutoProxy().