Annotation of 42BSD/sys/netinet/if_ether.h, revision 1.1

1.1     ! root        1: /*     if_ether.h      6.2     83/09/26        */
        !             2: 
        !             3: /*
        !             4:  * Structure of a 10Mb/s Ethernet header.
        !             5:  */
        !             6: struct ether_header {
        !             7:        u_char  ether_dhost[6];
        !             8:        u_char  ether_shost[6];
        !             9:        u_short ether_type;
        !            10: };
        !            11: 
        !            12: #define        ETHERPUP_PUPTYPE        0x0200          /* PUP protocol */
        !            13: #define        ETHERPUP_IPTYPE         0x0800          /* IP protocol */
        !            14: #define ETHERPUP_ARPTYPE       0x0806          /* Addr. resolution protocol */
        !            15: 
        !            16: /*
        !            17:  * The ETHERPUP_NTRAILER packet types starting at ETHERPUP_TRAIL have
        !            18:  * (type-ETHERPUP_TRAIL)*512 bytes of data followed
        !            19:  * by a PUP type (as given above) and then the (variable-length) header.
        !            20:  */
        !            21: #define        ETHERPUP_TRAIL          0x1000          /* Trailer PUP */
        !            22: #define        ETHERPUP_NTRAILER       16
        !            23: 
        !            24: #define        ETHERMTU        1500
        !            25: #define        ETHERMIN        (60-14)
        !            26: 
        !            27: /*
        !            28:  * Ethernet Address Resolution Protocol.
        !            29:  *
        !            30:  * See RFC 826 for protocol description.  Structure below is adapted
        !            31:  * to resolving internet addresses.  Field names used correspond to 
        !            32:  * RFC 826.
        !            33:  */
        !            34: struct ether_arp {
        !            35:        u_short arp_hrd;        /* format of hardware address */
        !            36: #define ARPHRD_ETHER   1       /* ethernet hardware address */
        !            37:        u_short arp_pro;        /* format of proto. address (ETHERPUP_IPTYPE) */
        !            38:        u_char  arp_hln;        /* length of hardware address (6) */
        !            39:        u_char  arp_pln;        /* length of protocol address (4) */
        !            40:        u_short arp_op;
        !            41: #define        ARPOP_REQUEST   1       /* request to resolve address */
        !            42: #define        ARPOP_REPLY     2       /* response to previous request */
        !            43:        u_char  arp_sha[6];     /* sender hardware address */
        !            44:        u_char  arp_spa[4];     /* sender protocol address */
        !            45:        u_char  arp_tha[6];     /* target hardware address */
        !            46:        u_char  arp_tpa[4];     /* target protocol address */
        !            47: };
        !            48: 
        !            49: /*
        !            50:  * Structure shared between the ethernet driver modules and
        !            51:  * the address resolution code.  For example, each ec_softc or il_softc
        !            52:  * begins with this structure.
        !            53:  */
        !            54: struct arpcom {
        !            55:        struct  ifnet ac_if;    /* network-visible interface */
        !            56:        u_char  ac_enaddr[6];   /* ethernet hardware address */
        !            57:        struct  arpcom *ac_ac;  /* link to next ether driver */
        !            58: };
        !            59: 
        !            60: #ifdef KERNEL
        !            61: u_char etherbroadcastaddr[6];                  /* 6 bytes of 0xFF */
        !            62: struct in_addr arpmyaddr();
        !            63: struct arptab *arptnew();
        !            64: #endif

unix.superglobalmegacorp.com

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