Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Port-sun/daemon.cpp File Reference
#include <iostream>
#include <string>
#include <fstream>
#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "Portable.h"
#include "Logger.h"
+ Include dependency graph for Port-sun/daemon.cpp:


void daemon_die ()
void daemon_init ()
void die (const char *pidfile)
pid_t getClientPID ()
pid_t getPID (const char *file)
pid_t getRelayPID ()
pid_t getServerPID ()
int init (const char *pidfile, const char *workdir)
int install ()
void logEnd ()
void logStart (const char *note, const char *logname, const char *logfile)
int run ()
int start (const char *pidfile, const char *workdir)
int status ()
int stop (const char *pidfile)
int uninstall ()

Function Documentation

void daemon_die ( )
void daemon_init ( )
void die ( const char *  pidfile)
pid_t getClientPID ( )
pid_t getPID ( const char *  file)

checks if pid file exists, and returns its content (or -2 if unable to read)

pid value, or negative if error was detected
pid_t getRelayPID ( )
pid_t getServerPID ( )
int init ( const char *  pidfile,
const char *  workdir 
: This is linux-specific. It will not work on Solaris
int install ( )
void logEnd ( )

things to do just before end

void logStart ( const char *  note,
const char *  logname,
const char *  logfile 

things to do just after started

int run ( )
int start ( const char *  pidfile,
const char *  workdir 
int status ( )
int stop ( const char *  pidfile)
int uninstall ( )