CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dns.cc File Reference
#include "dns.h"
#include <arpa/inet.h>
#include <arpa/nameser.h>
#include <errno.h>
#include <netdb.h>
#include <poll.h>
#include <unistd.h>
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "logging.h"
#include "sanitizer.h"
#include "smalloc.h"
#include "util/exception.h"
#include "util/string.h"
Include dependency graph for dns.cc:

Go to the source code of this file.

Classes

struct  dns::anonymous_namespace{dns.cc}::QueryInfo
 

Namespaces

 dns
 
 dns::anonymous_namespace{dns.cc}
 

Enumerations

enum  dns::anonymous_namespace{dns.cc}::ResourceRecord { dns::anonymous_namespace{dns.cc}::kRrA = 0, dns::anonymous_namespace{dns.cc}::kRrAaaa }
 

Functions

static void dns::PinpointHostSubstr (const std::string &url, unsigned *pos_begin, unsigned *pos_end)
 
std::string dns::ExtractHost (const std::string &url)
 
std::string dns::ExtractPort (const std::string &url)
 
string dns::RewriteUrl (const string &url, const string &ip)
 
string dns::StripIp (const string &decorated_ip)
 
std::string dns::AddDefaultScheme (const std::string &proxy)
 
static Failures dns::CaresExtractIpv4 (const unsigned char *abuf, int alen, vector< string > *addresses, unsigned *ttl, string *fqdn)
 
static Failures dns::CaresExtractIpv6 (const unsigned char *abuf, int alen, vector< string > *addresses, unsigned *ttl, string *fqdn)
 
static void dns::CallbackCares (void *arg, int status, int timeouts_ms, unsigned char *abuf, int alen)
 
static bool dns::SortNameLength (const string &a, const string &b)