Annotation of researchv10dc/man/man4/ethernet.4, revision 1.1

1.1     ! root        1: .TH ETHERNET 4
        !             2: .CT 2 comm_mach
        !             3: .SH NAME
        !             4: ethernet \(mi Ethernet interface
        !             5: .SH SYNOPSIS
        !             6: .B #include <sys/enio.h>
        !             7: .br
        !             8: .B #include <sys/ethernet.h>
        !             9: .SH DESCRIPTION
        !            10: There are drivers for several hardware interfaces to Ethernet.
        !            11: All have the same programming interface.
        !            12: .PP
        !            13: There are eight software channels for each hardware device.
        !            14: A channel sends and receives packets
        !            15: for a single Ethernet interface;
        !            16: hence eight protocols
        !            17: may be used independently on the same device.
        !            18: If a channel is open,
        !            19: it may not be opened again.
        !            20: .PP
        !            21: .I Read
        !            22: and
        !            23: .I write
        !            24: deal in Ethernet packets,
        !            25: consisting of a header
        !            26: followed by no less than 46
        !            27: but no more than 1500 bytes of data.
        !            28: The header,
        !            29: defined in
        !            30: .BR <sys/ethernet.h> ,
        !            31: is as follows:
        !            32: .LP
        !            33: .EX
        !            34: #define        ETHERALEN       6       /* bytes in an ethernet address */
        !            35: 
        !            36: struct etherpup {
        !            37:        unsigned char dhost[ETHERALEN]; /* destination address */
        !            38:        unsigned char shost[ETHERALEN]; /* source address */
        !            39:        unsigned short type;    /* protocol type */
        !            40: };
        !            41: .EE
        !            42: .LP
        !            43: The protocol type is in the network's byte order,
        !            44: most significant byte first.
        !            45: .PP
        !            46: .I Read
        !            47: on a channel returns at most one complete packet.
        !            48: If only part of a packet fits in the
        !            49: .I read
        !            50: buffer,
        !            51: successive reads return the remainder.
        !            52: .I Write
        !            53: should be given a single complete packet;
        !            54: .B dhost
        !            55: and
        !            56: .B type
        !            57: must be filled in.
        !            58: The system supplies
        !            59: .BR shost .
        !            60: .PP
        !            61: There are a few
        !            62: .I ioctl
        !            63: calls,
        !            64: defined in
        !            65: .BR <sys/enio.h> :
        !            66: .TP "\w'ENIOTYPE 'u"
        !            67: .B ENIOTYPE
        !            68: The third argument
        !            69: points to a short integer;
        !            70: use that as the protocol type for this channel.
        !            71: .TP
        !            72: .B ENIOADDR
        !            73: The third argument
        !            74: points to a six-character buffer;
        !            75: copy the hardware address of this interface there.
        !            76: .PP
        !            77: Minor device numbers
        !            78: 0-7
        !            79: are the eight channels of the first hardware device
        !            80: of a given type;
        !            81: 8-15 are the second device,
        !            82: and so on.
        !            83: File names usually end in two digits,
        !            84: like
        !            85: .B /dev/il13
        !            86: for the fourth channel of the second Interlan device.
        !            87: .SH FILES
        !            88: .TF /dev/bna??
        !            89: .TP
        !            90: .F /dev/il??
        !            91: Interlan NI1010A devices
        !            92: .TP
        !            93: .F /dev/qe??
        !            94: DEQNA devices
        !            95: .TP
        !            96: .F /dev/bna??
        !            97: DEBNA devices
        !            98: .SH SEE ALSO
        !            99: .IR internet (3),
        !           100: .IR ipconfig (8)
        !           101: .SH BUGS
        !           102: The DEQNA driver
        !           103: fills in the protocol type field
        !           104: in transmitted packets;
        !           105: other drivers don't.

unix.superglobalmegacorp.com

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