pdns  4.5.1
About: PowerDNS daemon - a high performance authoritative nameserver.
  Fossies Dox: pdns-4.5.1.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

receiver.cc File Reference

The main loop of powerdns. More...

#include "packetcache.hh"
#include <cstdio>
#include <signal.h>
#include <cstring>
#include <cstdlib>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <iostream>
#include <string>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <errno.h>
#include <pthread.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <fstream>
#include <boost/algorithm/string.hpp>
#include "opensslsigners.hh"
#include "dns.hh"
#include "dnsbackend.hh"
#include "ueberbackend.hh"
#include "dnspacket.hh"
#include "nameserver.hh"
#include "distributor.hh"
#include "logger.hh"
#include "arguments.hh"
#include "packethandler.hh"
#include "statbag.hh"
#include "tcpreceiver.hh"
#include "misc.hh"
#include "dynlistener.hh"
#include "dynhandler.hh"
#include "communicator.hh"
#include "dnsproxy.hh"
#include "utility.hh"
#include "common_startup.hh"
#include "dnsrecords.hh"
#include "version.hh"
Include dependency graph for receiver.cc:

Go to the source code of this file.

Functions

static void daemonize ()
  More...
 
static void takedown (int i)
  More...
 
static void writePid ()
  More...
 
static string DLCycleHandler (const vector< string > &parts, pid_t ppid)
  More...
 
static string DLRestHandler (const vector< string > &parts, pid_t ppid)
  More...
 
static int guardian (int argc, char **argv)
  More...
 
int main (int argc, char **argv)
 The main function of pdns, the pdns process. More...
 

Variables

time_t s_starttime
  More...
 
string s_programname ="pdns"
  More...
 
const char * funnytext
  More...
 
static int cpid
  More...
 
int g_fd1 [2]
  More...
 
int g_fd2 [2]
  More...
 
FILE * g_fp
  More...
 
std::mutex g_guardian_lock
  More...
 

Detailed Description

The main loop of powerdns.

This file is where it all happens - main is here, as are the two pivotal threads qthread() and athread()

Definition in file receiver.cc.

Variable Documentation

◆ cpid

int cpid
static

Definition at line 122 of file receiver.cc.

Referenced by DLCycleHandler(), guardian(), and takedown().

◆ funnytext

const char* funnytext
Initial value:
=
"*****************************************************************************\n"
"Ok, you just ran pdns_server through 'strings' hoping to find funny messages.\n"
"Well, you found one. \n"
"Two ions are flying through their particle accelerator, says the one to the\n"
"other 'I think I've lost an electron!' \n"
"So the other one says, 'Are you sure?'. 'YEAH! I'M POSITIVE!'\n"
" the pdns crew - pdns@powerdns.com\n"
"*****************************************************************************\n"

Definition at line 83 of file receiver.cc.

◆ g_fd1

int g_fd1[2]

Definition at line 155 of file receiver.cc.

Referenced by DLRestHandler(), and guardian().

◆ g_fd2

int g_fd2[2]

Definition at line 155 of file receiver.cc.

Referenced by guardian().

◆ g_fp

FILE* g_fp

Definition at line 156 of file receiver.cc.

Referenced by DLRestHandler(), and guardian().

◆ g_guardian_lock

std::mutex g_guardian_lock

Definition at line 157 of file receiver.cc.

Referenced by DLRestHandler(), and guardian().

◆ s_programname

string s_programname ="pdns"

Definition at line 81 of file receiver.cc.

Referenced by guardian(), main(), and writePid().

◆ s_starttime

time_t s_starttime