Annotation of xinu/h/arp.h, revision 1.1.1.1

1.1       root        1: /* arp.h */
                      2: 
                      3: /* DARPA Internet Address Resolution Protocol  (see RFCs 826, 920) */
                      4: 
                      5: #define        AR_HRD  1               /* Ethernet hardware type code          */
                      6: #define        AR_PROT 0x0800          /* IP protocol address code             */
                      7: #define        AR_HLEN 6               /* Ethernet physical address length     */
                      8: #define        AR_PLEN 4               /* IP Protocol address length           */
                      9: #define        AR_TAB  20              /* size of IP-to-Ether addr. cache (>1) */
                     10: #define        AR_TIME 60              /* time to wait for reply in 1/10 secs  */
                     11: #define        AR_RTRY 2               /* num. of times to try an arp request  */
                     12: 
                     13: /* Definitions of codes used in operation field of ARP packet */
                     14:        
                     15: #define        AR_REQ  1               /* arp request to resolve address       */
                     16: #define        AR_RPLY 2               /* reply to a resolve request           */
                     17: #define        AR_RREQ 3               /* reverse ARP request (RARP packets)   */
                     18: #define        AR_RRLY 4               /* reply to a reverse request (RARP ")  */
                     19: 
                     20: struct arppak  {               /* format of DARPA ARP packet           */
                     21:        short   ar_hrd;         /* type of hardware (Ethernet = 1)      */
                     22:        short   ar_prot;        /* format of proto. address (IP=0x0800) */
                     23:        char    ar_hlen;        /* hardware address length (6 for Ether)*/
                     24:        char    ar_plen;        /* protocol address length (4 for IP)   */
                     25:        short   ar_op;          /* arp operation (see list above)       */
                     26:        Eaddr   ar_sha;         /* sender's physical hardware address   */
                     27:        IPaddr  ar_spa;         /* sender's protocol address (IP addr.) */
                     28:        Eaddr   ar_tha;         /* target's physical hardware address   */
                     29:        IPaddr  ar_tpa;         /* target's protocol address (IP)       */
                     30: };
                     31: 
                     32: /* Format of the IP-to-Ethernet address resolution cache */
                     33: 
                     34: struct arpent  {               /* format of entry in ARP cache         */
                     35:        char    arp_state;      /* state of this entry (see below)      */
                     36:        Eaddr   arp_Ead;        /* Ethernet address of this host        */
                     37:        IPaddr  arp_Iad;        /* IP address of this host              */
                     38:        int     arp_dev;        /* Xinu device for this host route      */
                     39: };
                     40: 
                     41: /* Definitions of table entry states */
                     42: 
                     43: #define        AR_FREE         '\0'    /* Entry is unused (initial value)      */
                     44: #define        AR_ALLOC        '\1'    /* Entry is used but route still unknown*/
                     45: #define        AR_RGATE        '\2'    /* Entry is reachable only by gateway   */
                     46: #define        AR_RSLVD        '\3'    /* Entry has been resolved to Eth. addr.*/
                     47: 
                     48: struct arpblk  {               /* all information about ARP cache      */
                     49:        struct arpent arptab[AR_TAB]; /* IP-to-Ethernet address cache   */
                     50:        int     atabsiz;        /* current entries in arptab            */
                     51:        int     atabnxt;        /* next position in arptab to use       */
                     52:        int     arpsem;         /* semaphore for access to ARP service  */
                     53:        int     arppid;         /* id of process waiting for ARP reply  */
                     54:        IPaddr  arpwant;        /* IP addr. process waiting to resolve  */
                     55:        int     rarppid;        /* id of process waiting for RARP reply */
                     56:        int     rarpsem;        /* semaphore for access to RARP service */
                     57: };
                     58: 
                     59: extern struct  arpblk  Arp;

unix.superglobalmegacorp.com

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