{Begin SubSec Level One Ether Packet Format} {Title Level One Ether Packet Format} {Text {index *PRIMARY* ETHERPACKET (data type)} The data type {lisp ETHERPACKET} is the vehicle for all kinds of packets transmitted on an Ethernet or Experimental Ethernet. An {lisp ETHERPACKET} contains several fields for use by the Ethernet drivers and a large, contiguous data area making up the data of the level zero packet. The first several words of the area are reserved for the level one to zero encapsulation, and the remainder (starting at field {lisp EPBODY}) make up the level one packet. Typically, each level one protocol defines a {lisp BLOCKRECORD} ({PageRef (Record Type) BLOCKRECORD}) that overlays the {lisp ETHERPACKET} starting at the {lisp EPBODY} field, describing the format of a packet for that particular protocol. For example, the records {lisp PUP} and {lisp XIP} define the format of level one packets in the PUP and NS protocols. The extra fields in the beginning of an {lisp ETHERPACKET} have mostly a fixed interpretation over all protocols. Among the interesting ones are: {Begin Labeledlist} {Label {lisp EPLINK}} {Text A pointer used to link packets, used by the {lisp SYSQUEUE} mechanism ({PageRef fn \ENQUEUE}). Since this field is used by the system for maintaining the free packet queue and ether transmission queues, do not use this field unless you understand it.} {Label {lisp EPFLAGS}} {Text A byte field that can be used for any purpose by the user.} {Label {lisp EPUSERFIELD}} {Text A pointer field that can be used for any purpose by the user. It is set to {lisp NIL} when a packet is released.} {Label {lisp EPTRANSMITTING}} {Text A flag that is true while the packet is "being transmitted", i.e., from the time that the user instructs the system to transmit the packet until the packet is gathered up from the transmitter's finished queue. While this flag is true, the user must {it not} modify the packet.} {Label {lisp EPREQUEUE}} {Text A pointer field that specifies the desired disposition of the packet after transmission. The possible values are: {lisp NIL} means no special treatment; {lisp FREE} means the packet is to be released after transmission; an instance of a {lisp SYSQUEUE} means the packet is to be enqueued on the specified queue ({PageRef fn \ENQUEUE}).} {End Labeledlist} The normal life of an outgoing Ether packet is that a program obtains a blank packet, fills it in according to protocol, then sends the packet over the Ethernet. If the packet needs to be retained for possible retransmission, the {lisp EPREQUEUE} field is used to specify a queue to place the packet on after its transmission, or the caller hangs on to the packet explicitly. There are redefinitions, or "overlays" of the {lisp ETHERPACKET} record specifically for use with the PUP and NS protocols. The following sections describe those records and the handling of the PUP and NS level one protocols, how to add new level one protocols, and the queueing mechanism associated with the {lisp EPREQUEUE} field. }{End SubSec Level One Ether Packet Format}