EAPOL Proxy Daemon.
More...
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <paths.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include "args.h"
#include "daemonize.h"
#include "defaults.h"
#include "log.h"
#include "parser.h"
#include "proxy.h"
| static void help_exit |
( |
int |
status | ) |
|
|
static |
Print usage information to stderr and exit.
- Parameters
-
| status | The exit status to pass to the exit(2) system call |
| static void signal_handler |
( |
int |
sig | ) |
|
|
static |
Signal handler.
Increment signal counters upon receiving a signal. If more than one SIGINT or SIGTERM has been received without being acted upon, abort the program.
- Parameters
-
| sig | The signal that was received |
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Main function.
- Parameters
-
| argc | The number of command-line arguments |
| argv | An array of command-line arguments (i.e. C strings) |
- Returns
- 0 by default
| int peapod_close_fds |
( |
void |
| ) |
|
Close all open file descriptors except stdin, stdout, and stderr.
- Returns
- 0 if successful, or -1 if unsuccessful
| int peapod_redir_stdfds |
( |
void |
| ) |
|
Redirect stdin, stdout, and stderr to /dev/null.
- Returns
- 0 if successful, or -1 if unsuccessful
| volatile sig_atomic_t sig_hup = 0 |
| volatile sig_atomic_t sig_int = 0 |
| volatile sig_atomic_t sig_usr1 = 0 |
| volatile sig_atomic_t sig_term = 0 |
| char* clean_environ[] = { "PATH=" _PATH_STDPATH, NULL } |
|
static |
An environment containing only PATH.
Environment variables.
- Note
- Global, provided by compiler
Program arguments data structure.
- Note
- Global
Interface list.
- Note
- Global