summaryrefslogtreecommitdiffstats
path: root/usr.sbin/IPXrouted/trace.c
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>1996-04-13 15:13:30 +0000
committerjhay <jhay@FreeBSD.org>1996-04-13 15:13:30 +0000
commit31a4067a68fd28790af3344406d3014a7f10e002 (patch)
tree6d37fe3ef7cebcdc07aae384d9b3b3357c505bfc /usr.sbin/IPXrouted/trace.c
parenta8973daccf644ddc42220e04b6136d12fff16060 (diff)
downloadFreeBSD-src-31a4067a68fd28790af3344406d3014a7f10e002.zip
FreeBSD-src-31a4067a68fd28790af3344406d3014a7f10e002.tar.gz
Accept and use the content of packets received that is bigger than the
Novell spec, but still only transmit according to the spec. Add a feature to dump the RIP and SAP tables when a SIGINFO signal is received.
Diffstat (limited to 'usr.sbin/IPXrouted/trace.c')
-rw-r--r--usr.sbin/IPXrouted/trace.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/usr.sbin/IPXrouted/trace.c b/usr.sbin/IPXrouted/trace.c
index bf51116..e703d21 100644
--- a/usr.sbin/IPXrouted/trace.c
+++ b/usr.sbin/IPXrouted/trace.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: trace.c,v 1.6 1995/10/11 18:57:33 jhay Exp $
+ * $Id: trace.c,v 1.1 1995/10/26 21:28:29 julian Exp $
*/
#ifndef lint
@@ -381,6 +381,34 @@ dumpsaptable(fd, sh)
fprintf(fd, "\n");
}
+void
+dumpriptable(fd)
+ FILE *fd;
+{
+ register struct rt_entry *rip;
+ struct rthash *hash;
+ int x;
+ struct rthash *rh = nethash;
+
+ fprintf(fd, "------- RIP table dump. -------\n");
+ x = 0;
+ fprintf(fd, "Network table.\n");
+
+ for (hash = rh; hash < &rh[ROUTEHASHSIZ]; hash++, x++) {
+ fprintf(fd, "HASH %d\n", x);
+ rip = hash->rt_forw;
+ for (; rip != (struct rt_entry *)hash; rip = rip->rt_forw) {
+ fprintf(fd, " dest %s\t",
+ ipxdp_ntoa(&satoipx_addr(rip->rt_dst)));
+ fprintf(fd, "%s metric %d, ticks %d\n",
+ ipxdp_ntoa(&satoipx_addr(rip->rt_router)),
+ rip->rt_metric,
+ rip->rt_ticks);
+ }
+ }
+ fprintf(fd, "\n");
+}
+
union ipx_net_u net;
char *
OpenPOWER on IntegriCloud