diff options
-rw-r--r-- | usr.bin/indent/indent.c | 126 | ||||
-rw-r--r-- | usr.bin/indent/indent_globs.h | 132 | ||||
-rw-r--r-- | usr.bin/mail/glob.h | 82 | ||||
-rw-r--r-- | usr.bin/mail/main.c | 54 | ||||
-rw-r--r-- | usr.bin/netstat/main.c | 31 | ||||
-rw-r--r-- | usr.bin/netstat/netstat.h | 56 |
6 files changed, 343 insertions, 138 deletions
diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c index abbce67b5fd..adb77a3dbcb 100644 --- a/usr.bin/indent/indent.c +++ b/usr.bin/indent/indent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: indent.c,v 1.31 2019/06/28 13:35:01 deraadt Exp $ */ +/* $OpenBSD: indent.c,v 1.32 2021/01/26 18:21:25 deraadt Exp $ */ /* * Copyright (c) 1980, 1993 @@ -50,6 +50,130 @@ char *out_name = "Standard Output"; /* will always point to name * of output file */ char bakfile[PATH_MAX] = ""; +FILE *input; /* the fid for the input file */ +FILE *output; /* the output file */ + +char *labbuf; /* buffer for label */ +char *s_lab; /* start ... */ +char *e_lab; /* .. and end of stored label */ +char *l_lab; /* limit of label buffer */ + +char *codebuf; /* buffer for code section */ +char *s_code; /* start ... */ +char *e_code; /* .. and end of stored code */ +char *l_code; /* limit of code section */ + +char *combuf; /* buffer for comments */ +char *s_com; /* start ... */ +char *e_com; /* ... and end of stored comments */ +char *l_com; /* limit of comment buffer */ + +char *tokenbuf; /* the last token scanned */ +char *s_token; +char *e_token; +char *l_token; + +char *in_buffer; /* input buffer */ +char *in_buffer_limit; /* the end of the input buffer */ +char *buf_ptr; /* ptr to next character to be taken from + * in_buffer */ +char *buf_end; /* ptr to first after last char in in_buffer */ + +char save_com[sc_size]; /* input text is saved here when looking for + * the brace after an if, while, etc */ +char *sc_end; /* pointer into save_com buffer */ + +char *bp_save; /* saved value of buf_ptr when taking input + * from save_com */ +char *be_save; /* similarly saved value of buf_end */ + +int pointer_as_binop; +int blanklines_after_declarations; +int blanklines_before_blockcomments; +int blanklines_after_procs; +int blanklines_around_conditional_compilation; +int swallow_optional_blanklines; +int n_real_blanklines; +int prefix_blankline_requested; +int postfix_blankline_requested; +int break_comma; /* when true and not in parens, break after a + * comma */ +int btype_2; /* when true, brace should be on same line as + * if, while, etc */ +float case_ind; /* indentation level to be used for a "case + * n:" */ +int code_lines; /* count of lines with code */ +int had_eof; /* set to true when input is exhausted */ +int line_no; /* the current line number. */ +int max_col; /* the maximum allowable line length */ +int verbose; /* when true, non-essential error messages are + * printed */ +int cuddle_else; /* true if else should cuddle up to '}' */ +int star_comment_cont; /* true iff comment continuation lines should + * have stars at the beginning of each line. */ +int comment_delimiter_on_blankline; +int troff; /* true iff were generating troff input */ +int procnames_start_line; /* if true, the names of procedures + * being defined get placed in column + * 1 (ie. a newline is placed between + * the type of the procedure and its + * name) */ +int proc_calls_space; /* If true, procedure calls look like: + * foo(bar) rather than foo (bar) */ +int format_col1_comments; /* If comments which start in column 1 + * are to be magically reformatted + * (just like comments that begin in + * later columns) */ +int inhibit_formatting; /* true if INDENT OFF is in effect */ +int suppress_blanklines;/* set iff following blanklines should be + * suppressed */ +int continuation_indent;/* set to the indentation between the edge of + * code and continuation lines */ +int lineup_to_parens; /* if true, continued code within parens will + * be lined up to the open paren */ +int Bill_Shannon; /* true iff a blank should always be inserted + * after sizeof */ +int blanklines_after_declarations_at_proctop; /* This is vaguely + * similar to + * blanklines_after_decla + * rations except that + * it only applies to + * the first set of + * declarations in a + * procedure (just after + * the first '{') and it + * causes a blank line + * to be generated even + * if there are no + * declarations */ +int block_comment_max_col; +int extra_expression_indent; /* True if continuation lines from the + * expression part of "if(e)", + * "while(e)", "for(e;e;e)" should be + * indented an extra tab stop so that + * they don't conflict with the code + * that follows */ +int use_tabs; /* set true to use tabs for spacing, + * false uses all spaces */ + +/* -troff font state information */ + +struct fstate + keywordf, /* keyword font */ + stringf, /* string font */ + boxcomf, /* Box comment font */ + blkcomf, /* Block comment font */ + scomf, /* Same line comment font */ + bodyf; /* major body font */ + +struct parser_state ps; + +int ifdef_level; +int rparen_count; +struct parser_state state_stack[5]; +struct parser_state match_state[5]; + + void bakcopy(void); int diff --git a/usr.bin/indent/indent_globs.h b/usr.bin/indent/indent_globs.h index 8c5da7f3070..3ed911f43be 100644 --- a/usr.bin/indent/indent_globs.h +++ b/usr.bin/indent/indent_globs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: indent_globs.h,v 1.14 2015/09/27 17:00:46 guenther Exp $ */ +/* $OpenBSD: indent_globs.h,v 1.15 2021/01/26 18:21:25 deraadt Exp $ */ /* * Copyright (c) 1985 Sun Microsystems, Inc. * Copyright (c) 1980, 1993 @@ -48,8 +48,8 @@ #define true 1 -FILE *input; /* the fid for the input file */ -FILE *output; /* the output file */ +extern FILE *input; /* the fid for the input file */ +extern FILE *output; /* the output file */ #define CHECK_SIZE_CODE \ if (e_code >= l_code) { \ @@ -96,89 +96,89 @@ FILE *output; /* the output file */ s_token = tokenbuf + 1; \ } -char *labbuf; /* buffer for label */ -char *s_lab; /* start ... */ -char *e_lab; /* .. and end of stored label */ -char *l_lab; /* limit of label buffer */ +extern char *labbuf; /* buffer for label */ +extern char *s_lab; /* start ... */ +extern char *e_lab; /* .. and end of stored label */ +extern char *l_lab; /* limit of label buffer */ -char *codebuf; /* buffer for code section */ -char *s_code; /* start ... */ -char *e_code; /* .. and end of stored code */ -char *l_code; /* limit of code section */ +extern char *codebuf; /* buffer for code section */ +extern char *s_code; /* start ... */ +extern char *e_code; /* .. and end of stored code */ +extern char *l_code; /* limit of code section */ -char *combuf; /* buffer for comments */ -char *s_com; /* start ... */ -char *e_com; /* ... and end of stored comments */ -char *l_com; /* limit of comment buffer */ +extern char *combuf; /* buffer for comments */ +extern char *s_com; /* start ... */ +extern char *e_com; /* ... and end of stored comments */ +extern char *l_com; /* limit of comment buffer */ #define token s_token -char *tokenbuf; /* the last token scanned */ -char *s_token; -char *e_token; -char *l_token; +extern char *tokenbuf; /* the last token scanned */ +extern char *s_token; +extern char *e_token; +extern char *l_token; -char *in_buffer; /* input buffer */ -char *in_buffer_limit; /* the end of the input buffer */ -char *buf_ptr; /* ptr to next character to be taken from +extern char *in_buffer; /* input buffer */ +extern char *in_buffer_limit; /* the end of the input buffer */ +extern char *buf_ptr; /* ptr to next character to be taken from * in_buffer */ -char *buf_end; /* ptr to first after last char in in_buffer */ +extern char *buf_end; /* ptr to first after last char in in_buffer */ -char save_com[sc_size]; /* input text is saved here when looking for +extern char save_com[sc_size]; /* input text is saved here when looking for * the brace after an if, while, etc */ -char *sc_end; /* pointer into save_com buffer */ +extern char *sc_end; /* pointer into save_com buffer */ -char *bp_save; /* saved value of buf_ptr when taking input +extern char *bp_save; /* saved value of buf_ptr when taking input * from save_com */ -char *be_save; /* similarly saved value of buf_end */ +extern char *be_save; /* similarly saved value of buf_end */ -int pointer_as_binop; -int blanklines_after_declarations; -int blanklines_before_blockcomments; -int blanklines_after_procs; -int blanklines_around_conditional_compilation; -int swallow_optional_blanklines; -int n_real_blanklines; -int prefix_blankline_requested; -int postfix_blankline_requested; -int break_comma; /* when true and not in parens, break after a +extern int pointer_as_binop; +extern int blanklines_after_declarations; +extern int blanklines_before_blockcomments; +extern int blanklines_after_procs; +extern int blanklines_around_conditional_compilation; +extern int swallow_optional_blanklines; +extern int n_real_blanklines; +extern int prefix_blankline_requested; +extern int postfix_blankline_requested; +extern int break_comma; /* when true and not in parens, break after a * comma */ -int btype_2; /* when true, brace should be on same line as +extern int btype_2; /* when true, brace should be on same line as * if, while, etc */ -float case_ind; /* indentation level to be used for a "case +extern float case_ind; /* indentation level to be used for a "case * n:" */ -int code_lines; /* count of lines with code */ -int had_eof; /* set to true when input is exhausted */ -int line_no; /* the current line number. */ -int max_col; /* the maximum allowable line length */ -int verbose; /* when true, non-essential error messages are +extern int code_lines; /* count of lines with code */ +extern int had_eof; /* set to true when input is exhausted */ +extern int line_no; /* the current line number. */ +extern int max_col; /* the maximum allowable line length */ +extern int verbose; /* when true, non-essential error messages are * printed */ -int cuddle_else; /* true if else should cuddle up to '}' */ -int star_comment_cont; /* true iff comment continuation lines should +extern int cuddle_else; /* true if else should cuddle up to '}' */ +extern int star_comment_cont; /* true iff comment continuation lines should * have stars at the beginning of each line. */ -int comment_delimiter_on_blankline; -int troff; /* true iff were generating troff input */ -int procnames_start_line; /* if true, the names of procedures +extern int comment_delimiter_on_blankline; +extern int troff; /* true iff were generating troff input */ +extern int procnames_start_line; /* if true, the names of procedures * being defined get placed in column * 1 (ie. a newline is placed between * the type of the procedure and its * name) */ -int proc_calls_space; /* If true, procedure calls look like: +extern int proc_calls_space; /* If true, procedure calls look like: * foo(bar) rather than foo (bar) */ -int format_col1_comments; /* If comments which start in column 1 +extern int format_col1_comments; /* If comments which start in column 1 * are to be magically reformatted * (just like comments that begin in * later columns) */ -int inhibit_formatting; /* true if INDENT OFF is in effect */ -int suppress_blanklines;/* set iff following blanklines should be +extern int inhibit_formatting; /* true if INDENT OFF is in effect */ +extern int suppress_blanklines;/* set iff following blanklines should be * suppressed */ -int continuation_indent;/* set to the indentation between the edge of +extern int continuation_indent;/* set to the indentation between the edge of * code and continuation lines */ -int lineup_to_parens; /* if true, continued code within parens will +extern int lineup_to_parens; /* if true, continued code within parens will * be lined up to the open paren */ -int Bill_Shannon; /* true iff a blank should always be inserted +extern int Bill_Shannon; /* true iff a blank should always be inserted * after sizeof */ -int blanklines_after_declarations_at_proctop; /* This is vaguely +extern int blanklines_after_declarations_at_proctop; /* This is vaguely * similar to * blanklines_after_decla * rations except that @@ -191,14 +191,14 @@ int blanklines_after_declarations_at_proctop; /* This is vaguely * to be generated even * if there are no * declarations */ -int block_comment_max_col; -int extra_expression_indent; /* True if continuation lines from the +extern int block_comment_max_col; +extern int extra_expression_indent; /* True if continuation lines from the * expression part of "if(e)", * "while(e)", "for(e;e;e)" should be * indented an extra tab stop so that * they don't conflict with the code * that follows */ -int use_tabs; /* set true to use tabs for spacing, +extern int use_tabs; /* set true to use tabs for spacing, * false uses all spaces */ /* -troff font state information */ @@ -209,7 +209,7 @@ struct fstate { int allcaps:1; }; -struct fstate +extern struct fstate keywordf, /* keyword font */ stringf, /* string font */ boxcomf, /* Box comment font */ @@ -220,7 +220,7 @@ struct fstate #define STACKSIZE 150 -struct parser_state { +extern struct parser_state { int last_token; struct fstate cfont; /* Current font */ int p_stack[STACKSIZE]; /* this is the parsers stack */ @@ -315,10 +315,10 @@ struct parser_state { int just_saw_decl; } ps; -int ifdef_level; -int rparen_count; -struct parser_state state_stack[5]; -struct parser_state match_state[5]; +extern int ifdef_level; +extern int rparen_count; +extern struct parser_state state_stack[5]; +extern struct parser_state match_state[5]; int compute_code_target(void); int compute_label_target(void); diff --git a/usr.bin/mail/glob.h b/usr.bin/mail/glob.h index 92da4302493..e8e3e00f0ee 100644 --- a/usr.bin/mail/glob.h +++ b/usr.bin/mail/glob.h @@ -1,4 +1,4 @@ -/* $OpenBSD: glob.h,v 1.9 2018/09/16 02:38:57 millert Exp $ */ +/* $OpenBSD: glob.h,v 1.10 2021/01/26 18:21:47 deraadt Exp $ */ /* $NetBSD: glob.h,v 1.4 1996/06/08 19:48:25 christos Exp $ */ /* @@ -37,49 +37,49 @@ * A bunch of global variable declarations lie herein. * def.h must be included first. */ -int msgCount; /* Count of messages read in */ -int rcvmode; /* True if receiving mail */ -int sawcom; /* Set after first command */ -int senderr; /* An error while checking */ -int edit; /* Indicates editing a file */ -int readonly; /* Will be unable to rewrite file */ -int noreset; /* String resets suspended */ -int sourcing; /* Currently reading variant file */ -int loading; /* Loading user definitions */ -int cond; /* Current state of conditional exc. */ -FILE *itf; /* Input temp file buffer */ -FILE *otf; /* Output temp file buffer */ -int image; /* File descriptor for image of msg */ -FILE *input; /* Current command input file */ -char mailname[PATHSIZE]; /* Name of current file */ -char prevfile[PATHSIZE]; /* Name of previous file */ -char *homedir; /* Path name of home directory */ -const char +extern int msgCount; /* Count of messages read in */ +extern int rcvmode; /* True if receiving mail */ +extern int sawcom; /* Set after first command */ +extern int senderr; /* An error while checking */ +extern int edit; /* Indicates editing a file */ +extern int readonly; /* Will be unable to rewrite file */ +extern int noreset; /* String resets suspended */ +extern int sourcing; /* Currently reading variant file */ +extern int loading; /* Loading user definitions */ +extern int cond; /* Current state of conditional exc. */ +extern FILE *itf; /* Input temp file buffer */ +extern FILE *otf; /* Output temp file buffer */ +extern int image; /* File descriptor for image of msg */ +extern FILE *input; /* Current command input file */ +extern char mailname[PATHSIZE]; /* Name of current file */ +extern char prevfile[PATHSIZE]; /* Name of previous file */ +extern char *homedir; /* Path name of home directory */ +extern const char *myname; /* My login name */ -off_t mailsize; /* Size of system mailbox */ -int lexnumber; /* Number of TNUMBER from scan() */ -char lexstring[STRINGLEN]; /* String from TSTRING, scan() */ -int regretp; /* Pointer to TOS of regret tokens */ -int regretstack[REGDEP]; /* Stack of regretted tokens */ -char *string_stack[REGDEP]; /* Stack of regretted strings */ -int numberstack[REGDEP]; /* Stack of regretted numbers */ -struct message *dot; /* Pointer to current message */ -struct message *message; /* The actual message structure */ -struct var *variables[HSHSIZE]; /* Pointer to active var list */ -struct grouphead *groups[HSHSIZE];/* Pointer to active groups */ -struct ignoretab ignore[2]; /* ignored and retained fields +extern off_t mailsize; /* Size of system mailbox */ +extern int lexnumber; /* Number of TNUMBER from scan() */ +extern char lexstring[STRINGLEN]; /* String from TSTRING, scan() */ +extern int regretp; /* Pointer to TOS of regret tokens */ +extern int regretstack[REGDEP]; /* Stack of regretted tokens */ +extern char *string_stack[REGDEP]; /* Stack of regretted strings */ +extern int numberstack[REGDEP]; /* Stack of regretted numbers */ +extern struct message *dot; /* Pointer to current message */ +extern struct message *message; /* The actual message structure */ +extern struct var *variables[HSHSIZE]; /* Pointer to active var list */ +extern struct grouphead *groups[HSHSIZE];/* Pointer to active groups */ +extern struct ignoretab ignore[2]; /* ignored and retained fields 0 is ignore, 1 is retain */ -struct ignoretab saveignore[2]; /* ignored and retained fields +extern struct ignoretab saveignore[2]; /* ignored and retained fields on save to folder */ -struct ignoretab ignoreall[2]; /* special, ignore all headers */ -char **altnames; /* List of alternate names for user */ -int debug; /* Debug flag set */ -int screenwidth; /* Screen width, or best guess */ -int screenheight; /* Screen height, or best guess, +extern struct ignoretab ignoreall[2]; /* special, ignore all headers */ +extern char **altnames; /* List of alternate names for user */ +extern int debug; /* Debug flag set */ +extern int screenwidth; /* Screen width, or best guess */ +extern int screenheight; /* Screen height, or best guess, for "header" command */ -int realscreenheight; /* the real screen height */ -int uflag; /* Are we in -u mode? */ -sigset_t intset; /* Signal set that is just SIGINT */ +extern int realscreenheight; /* the real screen height */ +extern int uflag; /* Are we in -u mode? */ +extern sigset_t intset; /* Signal set that is just SIGINT */ /* * The pointers for the string allocation routines, @@ -88,7 +88,7 @@ sigset_t intset; /* Signal set that is just SIGINT */ * twice as much, and so on. */ #define NSPACE 25 /* Total number of string spaces */ -struct strings { +extern struct strings { char *s_topFree; /* Beginning of this area */ char *s_nextFree; /* Next alloctable place here */ unsigned s_nleft; /* Number of bytes left here */ diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c index 72de2558d3f..f802c07f9f0 100644 --- a/usr.bin/mail/main.c +++ b/usr.bin/mail/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.34 2019/06/28 13:35:02 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.35 2021/01/26 18:21:47 deraadt Exp $ */ /* $NetBSD: main.c,v 1.7 1997/05/13 06:15:57 mikel Exp $ */ /* @@ -35,6 +35,58 @@ #include <sys/ioctl.h> #include "extern.h" +int msgCount; /* Count of messages read in */ +int rcvmode; /* True if receiving mail */ +int sawcom; /* Set after first command */ +int senderr; /* An error while checking */ +int edit; /* Indicates editing a file */ +int readonly; /* Will be unable to rewrite file */ +int noreset; /* String resets suspended */ +int sourcing; /* Currently reading variant file */ +int loading; /* Loading user definitions */ +int cond; /* Current state of conditional exc. */ +FILE *itf; /* Input temp file buffer */ +FILE *otf; /* Output temp file buffer */ +int image; /* File descriptor for image of msg */ +FILE *input; /* Current command input file */ +char mailname[PATHSIZE]; /* Name of current file */ +char prevfile[PATHSIZE]; /* Name of previous file */ +char *homedir; /* Path name of home directory */ +const char + *myname; /* My login name */ +off_t mailsize; /* Size of system mailbox */ +int lexnumber; /* Number of TNUMBER from scan() */ +char lexstring[STRINGLEN]; /* String from TSTRING, scan() */ +int regretp; /* Pointer to TOS of regret tokens */ +int regretstack[REGDEP]; /* Stack of regretted tokens */ +char *string_stack[REGDEP]; /* Stack of regretted strings */ +int numberstack[REGDEP]; /* Stack of regretted numbers */ +struct message *dot; /* Pointer to current message */ +struct message *message; /* The actual message structure */ +struct var *variables[HSHSIZE]; /* Pointer to active var list */ +struct grouphead *groups[HSHSIZE];/* Pointer to active groups */ +struct ignoretab ignore[2]; /* ignored and retained fields + 0 is ignore, 1 is retain */ +struct ignoretab saveignore[2]; /* ignored and retained fields + on save to folder */ +struct ignoretab ignoreall[2]; /* special, ignore all headers */ +char **altnames; /* List of alternate names for user */ +int debug; /* Debug flag set */ +int screenwidth; /* Screen width, or best guess */ +int screenheight; /* Screen height, or best guess, + for "header" command */ +int realscreenheight; /* the real screen height */ +int uflag; /* Are we in -u mode? */ +sigset_t intset; /* Signal set that is just SIGINT */ + +/* + * The pointers for the string allocation routines, + * there are NSPACE independent areas. + * The first holds STRINGSIZE bytes, the next + * twice as much, and so on. + */ +struct strings stringdope[NSPACE]; + __dead void usage(void); int main(int, char **); diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index cc1193eb28c..f9c9ef5fb09 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.120 2020/06/16 14:03:42 jmc Exp $ */ +/* $OpenBSD: main.c,v 1.121 2021/01/26 18:22:45 deraadt Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -106,6 +106,35 @@ void gettable(u_int); kvm_t *kvmd; +int Aflag; /* show addresses of protocol control block */ +int aflag; /* show all sockets (including servers) */ +int Bflag; /* show TCP send and receive buffer sizes */ +int bflag; /* show bytes instead of packets */ +int dflag; /* show i/f dropped packets */ +int Fflag; /* show routes whose gateways are in specified AF */ +int gflag; /* show group (multicast) routing or stats */ +int hflag; /* print human numbers */ +int iflag; /* show interfaces */ +int lflag; /* show only listening sockets (only servers), */ + /* with -g, show routing table with use and ref */ +int mflag; /* show memory stats */ +int nflag; /* show addresses numerically */ +int pflag; /* show given protocol */ +int Pflag; /* show given PCB */ +int qflag; /* only display non-zero values for output */ +int rflag; /* show routing tables (or routing stats) */ +int Rflag; /* show rdomain and rtable summary */ +int sflag; /* show protocol statistics */ +int tflag; /* show i/f watchdog timers */ +int vflag; /* be verbose */ +int Wflag; /* show net80211 protocol statistics */ + +int interval; /* repeat interval for i/f stats */ + +char *interface; /* desired i/f for stats, or NULL for all i/fs */ + +int af; /* address family */ + int main(int argc, char *argv[]) { diff --git a/usr.bin/netstat/netstat.h b/usr.bin/netstat/netstat.h index c5c8681fcd3..055223261a9 100644 --- a/usr.bin/netstat/netstat.h +++ b/usr.bin/netstat/netstat.h @@ -1,4 +1,4 @@ -/* $OpenBSD: netstat.h,v 1.75 2020/06/12 06:22:32 remi Exp $ */ +/* $OpenBSD: netstat.h,v 1.76 2021/01/26 18:22:45 deraadt Exp $ */ /* $NetBSD: netstat.h,v 1.6 1996/05/07 02:55:05 thorpej Exp $ */ /* @@ -40,34 +40,34 @@ /* a bit of magic to print addresses as they should */ #define FAKE_PTR(p) (PLEN - ((p) ? 0 : 2)), p, ((p) ? "" : "x0") -int Aflag; /* show addresses of protocol control block */ -int aflag; /* show all sockets (including servers) */ -int Bflag; /* show TCP send and receive buffer sizes */ -int bflag; /* show bytes instead of packets */ -int dflag; /* show i/f dropped packets */ -int Fflag; /* show routes whose gateways are in specified AF */ -int gflag; /* show group (multicast) routing or stats */ -int hflag; /* print human numbers */ -int iflag; /* show interfaces */ -int lflag; /* show only listening sockets (only servers), */ +extern int Aflag; /* show addresses of protocol control block */ +extern int aflag; /* show all sockets (including servers) */ +extern int Bflag; /* show TCP send and receive buffer sizes */ +extern int bflag; /* show bytes instead of packets */ +extern int dflag; /* show i/f dropped packets */ +extern int Fflag; /* show routes whose gateways are in specified AF */ +extern int gflag; /* show group (multicast) routing or stats */ +extern int hflag; /* print human numbers */ +extern int iflag; /* show interfaces */ +extern int lflag; /* show only listening sockets (only servers), */ /* with -g, show routing table with use and ref */ -int mflag; /* show memory stats */ -int nflag; /* show addresses numerically */ -int pflag; /* show given protocol */ -int Pflag; /* show given PCB */ -int qflag; /* only display non-zero values for output */ -int rflag; /* show routing tables (or routing stats) */ -int Rflag; /* show rdomain and rtable summary */ -int sflag; /* show protocol statistics */ -int tflag; /* show i/f watchdog timers */ -int vflag; /* be verbose */ -int Wflag; /* show net80211 protocol statistics */ - -int interval; /* repeat interval for i/f stats */ - -char *interface; /* desired i/f for stats, or NULL for all i/fs */ - -int af; /* address family */ +extern int mflag; /* show memory stats */ +extern int nflag; /* show addresses numerically */ +extern int pflag; /* show given protocol */ +extern int Pflag; /* show given PCB */ +extern int qflag; /* only display non-zero values for output */ +extern int rflag; /* show routing tables (or routing stats) */ +extern int Rflag; /* show rdomain and rtable summary */ +extern int sflag; /* show protocol statistics */ +extern int tflag; /* show i/f watchdog timers */ +extern int vflag; /* be verbose */ +extern int Wflag; /* show net80211 protocol statistics */ + +extern int interval; /* repeat interval for i/f stats */ + +extern char *interface; /* desired i/f for stats, or NULL for all i/fs */ + +extern int af; /* address family */ extern char *__progname; /* program name, from crt0.o */ |