libpcap  1.10.1
About: libpcap is a packet filter library used by tools like tcpdump.
  Fossies Dox: libpcap-1.10.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

getopt.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "getopt.h"
Include dependency graph for getopt.c:

Go to the source code of this file.

Macros

#define BADCH   (int)'?'
 
#define BADARG   (int)':'
 
#define EMSG   ""
 

Functions

int getopt (int nargc, char *const *nargv, const char *ostr)
 

Variables

int opterr = 1
 
int optind = 1
 
int optopt
 
int optreset
 
char * optarg
 

Macro Definition Documentation

◆ BADARG

#define BADARG   (int)':'

Definition at line 51 of file getopt.c.

◆ BADCH

#define BADCH   (int)'?'

Definition at line 50 of file getopt.c.

◆ EMSG

#define EMSG   ""

Definition at line 52 of file getopt.c.

Function Documentation

◆ getopt()

int getopt ( int  nargc,
char *const *  nargv,
const char *  ostr 
)

Definition at line 59 of file getopt.c.

References BADARG, BADCH, EMSG, optarg, opterr, optind, optopt, and optreset.

Referenced by main().

Variable Documentation

◆ optarg

char* optarg

Definition at line 48 of file getopt.c.

Referenced by getopt(), and main().

◆ opterr

int opterr = 1

Definition at line 44 of file getopt.c.

Referenced by getopt(), and main().

◆ optind

int optind = 1

Definition at line 45 of file getopt.c.

Referenced by getopt(), and main().

◆ optopt

int optopt

Definition at line 46 of file getopt.c.

Referenced by getopt().

◆ optreset

int optreset

Definition at line 47 of file getopt.c.

Referenced by getopt().