Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/netstat/main.c
Context not available. | |||||
int noutputs = 0; /* how much outputs before we exit */ | int noutputs = 0; /* how much outputs before we exit */ | ||||
int numeric_addr; /* show addresses numerically */ | int numeric_addr; /* show addresses numerically */ | ||||
int numeric_port; /* show ports numerically */ | int numeric_port; /* show ports numerically */ | ||||
int Pflag; /* show TCP log ID */ | |||||
static int pflag; /* show given protocol */ | static int pflag; /* show given protocol */ | ||||
static int Qflag; /* show netisr information */ | static int Qflag; /* show netisr information */ | ||||
int rflag; /* show routing tables (or routing stats) */ | int rflag; /* show routing tables (or routing stats) */ | ||||
Context not available. | |||||
if (argc < 0) | if (argc < 0) | ||||
exit(EXIT_FAILURE); | exit(EXIT_FAILURE); | ||||
while ((ch = getopt(argc, argv, "46AaBbdF:f:ghI:iLlM:mN:np:Qq:RrSTsuWw:xz")) | while ((ch = getopt(argc, argv, "46AaBbdF:f:ghI:iLlM:mN:nPp:Qq:RrSTsuWw:xz")) | ||||
!= -1) | != -1) | ||||
switch(ch) { | switch(ch) { | ||||
case '4': | case '4': | ||||
Context not available. | |||||
case 'n': | case 'n': | ||||
numeric_addr = numeric_port = 1; | numeric_addr = numeric_port = 1; | ||||
break; | break; | ||||
case 'P': | |||||
Pflag = 1; | |||||
break; | |||||
case 'p': | case 'p': | ||||
if ((tp = name2protox(optarg)) == NULL) { | if ((tp = name2protox(optarg)) == NULL) { | ||||
xo_errx(1, "%s: unknown or uninstrumented " | xo_errx(1, "%s: unknown or uninstrumented " | ||||
Context not available. |