Annotation of xinu/sys/adump.c, revision 1.1.1.1

1.1       root        1: /* adump.c - adump */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <proc.h>
                      6: #include <network.h>
                      7: 
                      8: static char    *st[4] = {"free","???","gateway","direct"};
                      9: 
                     10: /*------------------------------------------------------------------------
                     11:  *  adump  -  dump the current contents of the arp cache
                     12:  *------------------------------------------------------------------------
                     13:  */
                     14: adump()
                     15: {
                     16:        int     arindex;
                     17:        struct  arpent  *atabptr;
                     18: 
                     19:        kprintf("Routing cache: size=%d, next=%d\n",
                     20:                Arp.atabsiz,Arp.atabnxt);
                     21:        for (arindex=0; arindex<Arp.atabsiz; arindex++) {
                     22:                atabptr = &Arp.arptab[arindex];
                     23:                if (atabptr->arp_state != AR_FREE) {
                     24:                        kprintf(" %2d. Route=%7s, Dev=%2d", arindex,
                     25:                                st[atabptr->arp_state], atabptr->arp_dev);
                     26:                        kprintf(" IPaddr=%03d.%03d.%03d.%03d, ",
                     27:                                atabptr->arp_Iad[0] & 0377,
                     28:                                atabptr->arp_Iad[1] & 0377,
                     29:                                atabptr->arp_Iad[2] & 0377,
                     30:                                atabptr->arp_Iad[3] & 0377);
                     31:                        kprintf("Ether addr=%02x%02x.%02x%02x.%02x%02x",
                     32:                                atabptr->arp_Ead[0]&0377,
                     33:                                atabptr->arp_Ead[1]&0377,
                     34:                                atabptr->arp_Ead[2]&0377,
                     35:                                atabptr->arp_Ead[3]&0377,
                     36:                                atabptr->arp_Ead[4]&0377,
                     37:                                atabptr->arp_Ead[5]&0377 );
                     38:                }
                     39:        }
                     40: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.