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

1.1       root        1: /* ether.h */
                      2: 
                      3: /* Ethernet definitions and constants */
                      4: 
                      5: #define        EMINPAK 64              /* minimum packet length                */
                      6: #define        EMAXPAK 1536            /* maximum packet length                */
                      7: #define        EHLEN   14              /* size of Ethernet packet header       */
                      8: #define        EDLEN   EMAXPAK-EHLEN   /* length of data field in ether packet */
                      9: #define        EPADLEN 6               /* number of octets in physical address */
                     10: typedef        char    Eaddr[EPADLEN]; /* length of physical address (48 bits) */
                     11: #define        EXRETRY 3               /* number of times to retry xmit errors */
                     12: #define        EBCAST  "\377\377\377\377\377\377"/* Ethernet broadcast address */
                     13: 
                     14: struct eheader {               /* format of header in Ethernet packet  */
                     15:        Eaddr   e_dest;         /* destination host address             */
                     16:        Eaddr   e_src;          /* source host address                  */
                     17:        short   e_ptype;        /* Ethernet packet type (see below)     */
                     18: };
                     19: 
                     20: #define        EP_LOOP 0x0060          /* packet type: Loopback                */
                     21: #define        EP_ECHO 0x0200          /* packet type: Echo                    */
                     22: #define        EP_PUP  0x0400          /* packet type: Xerox PUP protocol      */
                     23: #define        EP_IP   0x0800          /* packet type: DARPA Internet protocol */
                     24: #define        EP_ARP  0x0806          /* packet type: Address resolution  "   */
                     25: #define        EP_RARP 0x8035          /* packet type: reverse  "  "       "   */
                     26: 
                     27: struct epacket {               /* complete structure of Ethernet packet*/
                     28:        struct  eheader ep_hdr; /* packet header                        */
                     29:        char    ep_data[EDLEN]; /* data in the packet                   */
                     30: };
                     31: 
                     32: /* Ethernet control block descriptions */
                     33: 
                     34: struct etblk   {
                     35:        struct  dqregs *eioaddr;/* address of device csr                */
                     36:        struct  devsw   *etdev; /* Address of device switch table entry */
                     37:        Eaddr   etpaddr;        /* Ethernet physical device address     */
                     38:        int     etrpid;         /* id of process reading from ethernet  */
                     39:        int     etrsem;         /* mutex for reading from the ethernet  */
                     40:        int     etwsem;         /* mutex for writing to the ethernet    */
                     41:        int     etsetup;        /* DC_NORM or DC_SETUP for normal/setup */
                     42:        int     etlen;          /* length of packet being written or 0  */
                     43:        int     etwtry;         /* num. of times to retry xmit errors   */
                     44:        struct  dcmd ercmd[2];  /* deqna read command descriptor plus   */
                     45:                                /*  end-of-list                         */
                     46:        struct  dcmd ewcmd[2];  /* deqna write command descriptor plus  */
                     47:                                /*  end-of-list                         */
                     48: };
                     49: 
                     50: extern struct  etblk   eth[];

unix.superglobalmegacorp.com

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