pdns  4.2.0-rc1
About: PowerDNS daemon - a high performance authoritative nameserver. Release candidate.
  Fossies Dox: pdns-4.2.0-rc1.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

common_startup.cc File Reference
#include "common_startup.hh"
#include "ws-auth.hh"
#include "secpoll-auth.hh"
#include <sys/time.h>
#include <sys/resource.h>
#include "dynhandler.hh"
#include "dnsseckeeper.hh"
#include "threadname.hh"
Include dependency graph for common_startup.cc:

Go to the source code of this file.

Typedefs

typedef Distributor< DNSPacket, DNSPacket, PacketHandlerDNSDistributor
 

Functions

ArgvMaparg ()
 
void declareArguments ()
 
static uint64_t uptimeOfProcess (const std::string &str)
 
static uint64_t getSysUserTimeMsec (const std::string &str)
 
static uint64_t getQCount (const std::string &str)
 
static uint64_t getLatency (const std::string &str)
 
void declareStats (void)
 
int isGuarded (char **argv)
 
void sendout (DNSPacket *a)
 
void * qthread (void *number)
 The qthread receives questions over the internet via the Nameserver class, and hands them to the Distributor for further processing. More...
 
static void * dummyThread (void *)
 
static void triggerLoadOfLibraries ()
 
void mainthread ()
 

Variables

bool g_anyToTcp
 
bool g_8bitDNS
 
ArgvMap theArg
 
StatBag S
 Statistics are gathered across PDNS via the StatBag class S. More...
 
AuthPacketCache PC
 This is the main PacketCache, shared across all threads. More...
 
AuthQueryCache QC
 
DNSProxyDP
 
DynListenerdl
 
CommunicatorClass Communicator
 
shared_ptr< UDPNameserverN
 
int avg_latency
 
TCPNameserverTN
 
static vector< DNSDistributor * > g_distributors
 
vector< std::shared_ptr< UDPNameserver > > g_udpReceivers
 
static time_t s_start =time(0)
 

Typedef Documentation

◆ DNSDistributor

Function Documentation

◆ arg()

ArgvMap& arg ( void  )

Definition at line 59 of file common_startup.cc.

References theArg.

Referenced by declareArguments(), mainthread(), and qthread().

◆ declareArguments()

void declareArguments ( )

Definition at line 64 of file common_startup.cc.

References arg(), ArgvMap::set(), ArgvMap::setCmd(), and ArgvMap::setSwitch().

Referenced by main().

◆ declareStats()

◆ dummyThread()

static void* dummyThread ( void *  )
static

Definition at line 484 of file common_startup.cc.

Referenced by triggerLoadOfLibraries().

◆ getLatency()

static uint64_t getLatency ( const std::string &  str)
static

Definition at line 270 of file common_startup.cc.

References avg_latency.

Referenced by declareStats().

◆ getQCount()

static uint64_t getQCount ( const std::string &  str)
static

Definition at line 248 of file common_startup.cc.

References g_distributors.

Referenced by declareStats().

◆ getSysUserTimeMsec()

static uint64_t getSysUserTimeMsec ( const std::string &  str)
static

Definition at line 235 of file common_startup.cc.

Referenced by declareStats().

◆ isGuarded()

int isGuarded ( char **  argv)

Definition at line 350 of file common_startup.cc.

Referenced by guardian(), and main().

◆ mainthread()

◆ qthread()

◆ sendout()

void sendout ( DNSPacket a)

Definition at line 357 of file common_startup.cc.

References avg_latency, DNSPacket::d_dt, N, and DTime::udiff().

Referenced by qthread().

◆ triggerLoadOfLibraries()

static void triggerLoadOfLibraries ( )
static

Definition at line 490 of file common_startup.cc.

References dummyThread().

Referenced by mainthread().

◆ uptimeOfProcess()

static uint64_t uptimeOfProcess ( const std::string &  str)
static

Definition at line 230 of file common_startup.cc.

References s_start.

Referenced by declareStats().

Variable Documentation

◆ avg_latency

int avg_latency

Definition at line 54 of file common_startup.cc.

Referenced by getLatency(), qthread(), and sendout().

◆ Communicator

◆ dl

Definition at line 51 of file common_startup.cc.

Referenced by Bind2Backend::Bind2Backend(), main(), and mainthread().

◆ DP

DNSProxy* DP

Definition at line 50 of file common_startup.cc.

Referenced by PacketHandler::doQuestion(), and mainthread().

◆ g_8bitDNS

bool g_8bitDNS

Definition at line 39 of file common_startup.cc.

Referenced by mainthread(), and validDNSName().

◆ g_anyToTcp

bool g_anyToTcp

Definition at line 38 of file common_startup.cc.

Referenced by PacketHandler::doQuestion(), and mainthread().

◆ g_distributors

vector<DNSDistributor*> g_distributors
static

Definition at line 56 of file common_startup.cc.

Referenced by getQCount(), mainthread(), and qthread().

◆ g_udpReceivers

vector<std::shared_ptr<UDPNameserver> > g_udpReceivers

Definition at line 57 of file common_startup.cc.

Referenced by main(), and qthread().

◆ N

shared_ptr<UDPNameserver> N

Definition at line 53 of file common_startup.cc.

Referenced by main(), qthread(), and sendout().

◆ PC

This is the main PacketCache, shared across all threads.

Definition at line 48 of file common_startup.cc.

Referenced by mainthread(), and qthread().

◆ QC

Definition at line 49 of file common_startup.cc.

Referenced by mainthread().

◆ S

Statistics are gathered across PDNS via the StatBag class S.

Definition at line 47 of file common_startup.cc.

Referenced by declareStats(), and qthread().

◆ s_start

time_t s_start =time(0)
static

Definition at line 229 of file common_startup.cc.

Referenced by uptimeOfProcess().

◆ theArg

ArgvMap theArg

Definition at line 46 of file common_startup.cc.

Referenced by arg().

◆ TN

Definition at line 55 of file common_startup.cc.

Referenced by main(), and mainthread().