mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-20 02:10:52 +08:00
route command: Clean up kernal symbol accesses
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifdef __rtems__
|
||||
#define __BSD_VISIBLE 1
|
||||
#include <freebsd/sys/types.h>
|
||||
#endif
|
||||
|
||||
extern int Aflag; /* show addresses of protocol control block */
|
||||
extern int aflag; /* show all sockets (including servers) */
|
||||
@@ -63,7 +67,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__
|
||||
#define kread(_x, _y, _z) (0)
|
||||
#else
|
||||
int kread(u_long addr, void *buf, size_t size);
|
||||
#endif
|
||||
const char *plural(uintmax_t);
|
||||
const char *plurales(uintmax_t);
|
||||
const char *pluralies(uintmax_t);
|
||||
@@ -126,6 +134,12 @@ char *ipx_phost(struct sockaddr *);
|
||||
char *ns_phost(struct sockaddr *);
|
||||
void upHex(char *);
|
||||
|
||||
#ifdef __rtems__
|
||||
#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