peapod  0.1.0
EAPOL Proxy Daemon
Data Structures | Functions
args.h File Reference

Function prototypes for args.c, global program arguments data structure. More...

#include <stdint.h>
Include dependency graph for args.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  args_t
 The program arguments data structure. More...
 

Functions

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...
 

Detailed Description

Function prototypes for args.c, global program arguments data structure.

Function Documentation

char* args_canonpath ( const char *  path,
uint8_t  create 
)

Validate and canonicalize a path.

Parameters
pathPath to validate
createFlag: Test creating nonexistent path, mode 0644?
Returns
A newly allocated C string containing the canonicalized path if successful, or NULL if unsuccessful
Note
If successful, caller is responsible for free(3)ing the result
See also
defaults.h
int args_get ( int  argc,
char *  argv[] 
)

Parse command-line arguments and set up the global program arguments data structure.

Parameters
argcThe number of command-line arguments
argvA vector of command-line arguments
Returns
0 if successful, or -1 if unsuccessful