mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 10:27:12 +08:00
NETSTAT(1): Initialize global variables
Use BSD program lock.
This commit is contained in:
@@ -36,6 +36,12 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef __rtems__
|
||||
#define rt_tables netstat_rt_tables
|
||||
#define routename rtems_shell_netstats_routername
|
||||
#define netname rtems_shell_netstats_netname
|
||||
#define sotoxsocket rtems_shell_netstats_sotoxsocket
|
||||
#endif /* __rtems__ */
|
||||
extern int Aflag; /* show addresses of protocol control block */
|
||||
extern int aflag; /* show all sockets (including servers) */
|
||||
extern int bflag; /* show i/f total bytes in/out */
|
||||
@@ -62,6 +68,11 @@ extern int unit; /* unit number for above */
|
||||
|
||||
extern int af; /* address family */
|
||||
extern int live; /* true if we are examining a live system */
|
||||
#ifdef __rtems__
|
||||
extern int protopr_initialized;
|
||||
extern int do_rtent;
|
||||
extern struct radix_node_head **rt_tables;
|
||||
#endif /* __rtems__ */
|
||||
|
||||
int kread(u_long addr, void *buf, size_t size);
|
||||
const char *plural(uintmax_t);
|
||||
@@ -126,13 +137,6 @@ char *ipx_phost(struct sockaddr *);
|
||||
char *ns_phost(struct sockaddr *);
|
||||
void upHex(char *);
|
||||
|
||||
#ifdef __rtems__
|
||||
#define rt_tables netstat_rt_tables
|
||||
#define routename rtems_shell_netstats_routername
|
||||
#define netname rtems_shell_netstats_netname
|
||||
#define sotoxsocket rtems_shell_netstats_sotoxsocket
|
||||
#endif
|
||||
|
||||
char *routename(in_addr_t);
|
||||
char *netname(in_addr_t, u_long);
|
||||
char *atalk_print(struct sockaddr *, int);
|
||||
|
Reference in New Issue
Block a user