Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Install "show arptab" (db_show_arptab) in the ddb comman...
details: https://anonhg.NetBSD.org/src/rev/59c5b33d4f9f
branches: trunk
changeset: 486357:59c5b33d4f9f
user: jhawk <jhawk%NetBSD.org@localhost>
date: Sat May 20 03:08:41 2000 +0000
description:
Install "show arptab" (db_show_arptab) in the ddb command tree.
Move prototype from netinet/if_inarp.h to ddb/db_interface.h.
Change function to have standard ddb parameters (though they're
ignored).
diffstat:
sys/ddb/db_command.c | 6 +++++-
sys/ddb/db_interface.h | 15 +++++++++------
sys/netinet/if_arp.c | 16 ++++++++++------
sys/netinet/if_inarp.h | 3 +--
4 files changed, 25 insertions(+), 15 deletions(-)
diffs (121 lines):
diff -r 6a67d6553779 -r 59c5b33d4f9f sys/ddb/db_command.c
--- a/sys/ddb/db_command.c Sat May 20 02:28:33 2000 +0000
+++ b/sys/ddb/db_command.c Sat May 20 03:08:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_command.c,v 1.39 2000/05/15 19:56:43 jhawk Exp $ */
+/* $NetBSD: db_command.c,v 1.40 2000/05/20 03:08:41 jhawk Exp $ */
/*
* Mach Operating System
@@ -27,6 +27,7 @@
*/
#include "opt_ddb.h"
+#include "opt_inet.h"
/*
* Command dispatcher.
@@ -441,6 +442,9 @@
struct db_command db_show_cmds[] = {
{ "all", NULL, 0, db_show_all_cmds },
+#ifdef INET
+ { "arptab", db_show_arptab, 0, NULL },
+#endif
{ "breaks", db_listbreak_cmd, 0, NULL },
{ "map", db_map_print_cmd, 0, NULL },
{ "object", db_object_print_cmd, 0, NULL },
diff -r 6a67d6553779 -r 59c5b33d4f9f sys/ddb/db_interface.h
--- a/sys/ddb/db_interface.h Sat May 20 02:28:33 2000 +0000
+++ b/sys/ddb/db_interface.h Sat May 20 03:08:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.h,v 1.3 1998/09/05 14:42:43 christos Exp $ */
+/* $NetBSD: db_interface.h,v 1.4 2000/05/20 03:08:41 jhawk Exp $ */
/*-
* Copyright (c) 1995 The NetBSD Foundation, Inc.
@@ -39,12 +39,15 @@
#ifndef _DDB_DB_INTERFACE_H_
#define _DDB_DB_INTERFACE_H_
+/* arch/<arch>/<arch>/db_disasm.c */
+db_addr_t db_disasm __P((db_addr_t, boolean_t));
+
+/* arch/<arch>/<arch>/db_interface.c */
+void db_machine_init __P((void));
+
/* arch/<arch>/<arch>/db_trace.c */
void db_stack_trace_cmd __P((db_expr_t, int, db_expr_t, char *));
-/* arch/<arch>/<arch>/db_disasm.c */
-db_addr_t db_disasm __P((db_addr_t, boolean_t));
-
/* kern/kern_proc.c */
void db_kill_proc __P((db_expr_t, int, db_expr_t, char *));
void db_show_all_procs __P((db_expr_t, int, db_expr_t, char *));
@@ -52,7 +55,7 @@
/* kern/kern_clock.c */
void db_show_callout __P((db_expr_t, int, db_expr_t, char *));
-/* arch/<arch>/<arch>/db_interface.c */
-void db_machine_init __P((void));
+/* netinet/if_arp.c */
+void db_show_arptab __P((db_expr_t, int, db_expr_t, char *));
#endif /* _DDB_DB_INTERFACE_H_ */
diff -r 6a67d6553779 -r 59c5b33d4f9f sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c Sat May 20 02:28:33 2000 +0000
+++ b/sys/netinet/if_arp.c Sat May 20 03:08:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_arp.c,v 1.68 2000/03/30 13:24:52 augustss Exp $ */
+/* $NetBSD: if_arp.c,v 1.69 2000/05/20 03:08:42 jhawk Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1241,20 +1241,24 @@
}
/*
* Function to print all the route trees.
- * Use this from ddb: "call db_show_arptab"
+ * Use this from ddb: "show arptab"
*/
-int
-db_show_arptab()
+void
+db_show_arptab(addr, have_addr, count, modif)
+ db_expr_t addr;
+ int have_addr;
+ db_expr_t count;
+ char * modif;
{
struct radix_node_head *rnh;
rnh = rt_tables[AF_INET];
db_printf("Route tree for AF_INET\n");
if (rnh == NULL) {
db_printf(" (not initialized)\n");
- return (0);
+ return;
}
rn_walktree(rnh, db_show_radix_node, NULL);
- return (0);
+ return;
}
#endif
#endif /* INET */
diff -r 6a67d6553779 -r 59c5b33d4f9f sys/netinet/if_inarp.h
--- a/sys/netinet/if_inarp.h Sat May 20 02:28:33 2000 +0000
+++ b/sys/netinet/if_inarp.h Sat May 20 03:08:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_inarp.h,v 1.30 2000/03/30 02:32:57 simonb Exp $ */
+/* $NetBSD: if_inarp.h,v 1.31 2000/05/20 03:08:43 jhawk Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -79,7 +79,6 @@
void in_revarpinput __P((struct mbuf *));
void revarprequest __P((struct ifnet *));
int revarpwhoarewe __P((struct ifnet *, struct in_addr *, struct in_addr *));
-int db_show_arptab __P((void));
#endif
#endif /* _NETINET_IF_INARP_H_ */
Home |
Main Index |
Thread Index |
Old Index