peapod
0.1.0
EAPOL Proxy Daemon
|
Parse command-line arguments, set up the global program arguments data structure. More...
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <getopt.h>
#include <libgen.h>
#include <string.h>
#include <unistd.h>
#include "args.h"
#include "defaults.h"
#include "log.h"
Functions | |
static void | print_args (void) |
Log the global program arguments data structure. More... | |
char * | args_canonpath (const char *path, uint8_t create) |
Validate and canonicalize a path. More... | |
int | args_get (int argc, char *argv[]) |
Parse command-line arguments and set up the global program arguments data structure. More... | |
Variables | |
static char * | opts = ":hdp:c:tl::svCo" |
An optstring for getopt(3) More... | |
static struct option | long_opts [] |
An array of struct option structures for getopt_long(3) More... | |
struct args_t | args |
Program arguments data structure. More... | |
Parse command-line arguments, set up the global program arguments data structure.
|
static |
Log the global program arguments data structure.
char* args_canonpath | ( | const char * | path, |
uint8_t | create | ||
) |
Validate and canonicalize a path.
path | Path to validate |
create | Flag: Test creating nonexistent path , mode 0644? |
NULL
if unsuccessful free(3)
ing the result defaults.h
int args_get | ( | int | argc, |
char * | argv[] | ||
) |
Parse command-line arguments and set up the global program arguments data structure.
argc | The number of command-line arguments |
argv | A vector of command-line arguments |
|
static |
An optstring for getopt(3)
|
static |
An array of struct option
structures for getopt_long(3)
struct args_t args |
Program arguments data structure.