Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

bsd-getopt-long.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  pure_option

Defines

#define no_argument   0
#define required_argument   1
#define optional_argument   2
#define option   pure_option
#define getopt_long(A, B, C, D, E)   pure_getopt_long(A, B, C, D, E)
#define getopt_long_only(A, B, C, D, E)   pure_getopt_long_only(A, B, C, D, E)
#define getopt(A, B, C)   pure_getopt(A, B, C)
#define optarg   pure_optarg
#define opterr   pure_opterr
#define optind   pure_optind
#define optopt   pure_optopt
#define optreset   pure_optreset

Functions

int pure_getopt_long (int nargc, char *const *nargv, const char *options, const struct pure_option *long_options, int *idx)
int pure_getopt_long_only (int nargc, char *const *nargv, const char *options, const struct pure_option *long_options, int *idx)
int pure_getopt (int nargc, char *const *nargv, const char *options)


Define Documentation

#define getopt A,
B,
 )     pure_getopt(A, B, C)
 

Definition at line 117 of file bsd-getopt-long.h.

Referenced by main().

#define getopt_long A,
B,
C,
D,
 )     pure_getopt_long(A, B, C, D, E)
 

Definition at line 113 of file bsd-getopt-long.h.

Referenced by main().

#define getopt_long_only A,
B,
C,
D,
 )     pure_getopt_long_only(A, B, C, D, E)
 

Definition at line 115 of file bsd-getopt-long.h.

#define no_argument   0
 

Definition at line 66 of file bsd-getopt-long.h.

Referenced by main(), and pure_parse_long_options().

#define optarg   pure_optarg
 

Definition at line 119 of file bsd-getopt-long.h.

Referenced by main().

#define opterr   pure_opterr
 

Definition at line 121 of file bsd-getopt-long.h.

Referenced by main().

#define optind   pure_optind
 

Definition at line 123 of file bsd-getopt-long.h.

Referenced by main().

#define option   pure_option
 

Definition at line 111 of file bsd-getopt-long.h.

Referenced by bpf_dump(), choose_global_symbols_regex(), main(), parse_function_name(), parse_tcp_options(), and TCP_Rewriter::RewriteTCPOption().

#define optional_argument   2
 

Definition at line 72 of file bsd-getopt-long.h.

Referenced by pure_parse_long_options().

#define optopt   pure_optopt
 

Definition at line 125 of file bsd-getopt-long.h.

#define optreset   pure_optreset
 

Definition at line 127 of file bsd-getopt-long.h.

#define required_argument   1
 

Definition at line 69 of file bsd-getopt-long.h.

Referenced by main(), and pure_parse_long_options().


Function Documentation

int pure_getopt int  nargc,
char *const *  nargv,
const char *  options
 

Definition at line 488 of file bsd-getopt-long.c.

References pure_getopt_internal().

00489 {
00490     
00491     /*
00492      * We dont' pass FLAG_PERMUTE to pure_getopt_internal() since
00493      * the BSD getopt(3) (unlike GNU) has never done this.
00494      *
00495      * Furthermore, since many privileged programs call getopt()
00496      * before dropping privileges it makes sense to keep things
00497      * as simple (and bug-free) as possible.
00498      */
00499     return pure_getopt_internal(nargc, nargv, options, NULL, NULL, 0);
00500 }

int pure_getopt_long int  nargc,
char *const *  nargv,
const char *  options,
const struct pure_option long_options,
int *  idx
 

Definition at line 506 of file bsd-getopt-long.c.

References FLAG_PERMUTE, and pure_getopt_internal().

00508 {
00509     return pure_getopt_internal(nargc, nargv, options, long_options, idx,
00510                                 FLAG_PERMUTE);
00511 }

int pure_getopt_long_only int  nargc,
char *const *  nargv,
const char *  options,
const struct pure_option long_options,
int *  idx
 

Definition at line 517 of file bsd-getopt-long.c.

References FLAG_LONGONLY, FLAG_PERMUTE, and pure_getopt_internal().

00521 {
00522     return pure_getopt_internal(nargc, nargv, options, long_options, idx,
00523                                 FLAG_PERMUTE|FLAG_LONGONLY);
00524 }


Generated on Wed Sep 14 02:57:33 2005 for bro_docs by doxygen 1.3.5