diff options
Diffstat (limited to 'usr.sbin/IPXrouted/trace.c')
-rw-r--r-- | usr.sbin/IPXrouted/trace.c | 30 |
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 * |