Document revision date: 30 March 2001
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]


Previous Contents Index

1.14.1.2 Ethernet Packet Padding

This section describes the PAD parameter NMA$C_PCLI_PAD, which is used only in the Ethernet packet format.

All CSMA/CD frames must be at least 64 bytes in length. This includes the Ethernet header, the user data, and the CRC. If the user data, CRC, and Ethernet header together are less than 64 bytes, zero padding bytes are inserted between the user data and the CRC to make a 64-byte packet. This packet padding cannot be turned off.

The PAD parameter directs the LAN drivers to place a data-size field in the packet between the standard header and the user data. If padding is on (NMA$C_STATE_ON is specified) , a 2-byte length field is inserted after the Protocol Type field and before the user data.

If the PAD parameter is off (NMA$C_STATE_OFF is specified), Ethernet packets have the following characteristics:

If the PAD parameter is on (NMA$C_STATE_ON is specified), Ethernet packets have the following characteristics:

1.14.1.3 Protocol Type Sharing

Protocol types are usually nonshareable; however, an application may benefit from a shared protocol implementation. The protocol access parameter (NMA$C_PCLI_ACC) allows a protocol type to be opened in either of two shareable modes: shared-default (NMA$C_ACC_SHR) and shared-with-destination (NMA$C_ACC_LIM). The LAN drivers also provide the nonshareable exclusive mode (NMA$C_ACC_EXC). (See Table 1-16.) The rules and requirements for using each mode are as follows:

1.14.2 IEEE 802 Packet Format

The IEEE 802 packet formats accepted for a port depend on the service enabled on that port. All 802 packet formats have an 802.2 header. The service on the port determines the valid values for the 802.2 fields.

When a port is started, the NMA$C_PCLI_SRV parameter in the P2 buffer selects the service on that port. A value of NMA$C_LINSR_CLI specifies Class I service and a value of NMA$C_LINSR_USR specifies user-supplied service (the default).

1.14.2.1 Class I Service Packet Format

For Class I service, only three packet formats are transmitted and received: UI, XID, and TEST. Figure 1-16 shows the 802.2 header format for Class I service.

Figure 1-16 Class I Service 802.2 Header


The control field for an 802 packet is always an unnumbered control field. The unnumbered control field, which is always 1 byte in length, is passed by the P4 argument of the write QIO and can be one of the following binary values:

An 802 format port with Class I service is allowed to transmit UI, XID, and TEST commands. An 802 format port with Class I service is allowed to receive UI commands and XID and TEST responses.

Refer to the IEEE 802.2 Standard for more information on these control field values and response messages.

1.14.2.2 User-Supplied Service Header Format

Figure 1-17 shows the 802.2 header format for user-supplied service.

Figure 1-17 User-Supplied Service 802.2 Header


The user provides the control field values, which are documented in the IEEE 802.2 Standard. The user-supplied packet format is the generic packet format as specified in the IEEE 802.2 Standard. Class I packets (see Section 1.14.2.1) are a subset of this generic packet format. Therefore, if the control field value of the user-supplied packet is UI, XID, or TEST, the packet is the same as a Class I packet. Note that Class II packets, as defined in the IEEE 802.2 Standard, include the UI, XID, and TEST command/response formats.

1.14.2.3 Service Access Point (SAP) Use and Restrictions

The IEEE 802.2 Standard places restrictions on both user SAPs and source SAPs (SSAPs). All SAPs are 8 bits long. Figure 1-18 shows the format of desination SAPs (DSAPs) and SSAPs.

Figure 1-18 DSAP and SSAP Format


Definition of the least significant bit depends on whether the SAP is a source SAP (SSAP) or a destination SAP (DSAP). For a DSAP field, the least significant bit distinguishes group SAPs (bit 0 = 1) from individual SAPs (bit 0 = 0). For an SSAP field, the least significant bit distinguishes commands (bit 0 = 0) from responses (bit 0 = 1). Because these two bits are located at the same bit position within the SAP field, a group SAP cannot be used as an SSAP. If this were allowed, a group SAP would be interpreted as an individual SAP with the command/response bit set to 1, thus implying a response. The IEEE 802.2 Standard reserves for its own definition all SAP addresses with the second least significant bit set to 1. You should use these SAP values for their intended purposes, as defined in the IEEE 802.2 Standard.

Up to four group SAPs can be enabled on each 802 port. The group SAPs enabled on a controller do not have to be unique for each port; for example, two 802 format ports can have the same group SAP enabled. This allows a single packet coming into the controller to be duplicated and passed to each port on the controller that has the group SAP enabled---assuming the packet has a DSAP value that is a group SAP. If the received packet has an individual SAP for a DSAP, the packet goes to at most one port.

1.14.3 IEEE 802 Extended Packet Format

The 802E format uses the 802.2 and 802.1 headers, as shown in Figure 1-19.

Figure 1-19 802 Extended Header


For an 802E packet format, the DSAP and SSAP fields are always set to the SNAP SAP (AA hex). The SNAP SAP value is a special SAP value reserved for 802 extended format packets. The SNAP SAP value distinguishes an 802 packet from an 802 extended packet. The only valid control field value for 802 extended packets is UI (unnumbered information).

1.14.3.1 Protocol Type PID Sharing (Alpha Only)

On Alpha systems, the 802E format allows user's protocol identifier (PID) sharing. PIDs are usually nonshareable; however, an application may benefit from a shared protocol implementation. The protocol access parameter (NMA$C_PCLI_ACC) allows a PID to be opened in either of two shareable modes: shared-default (NMA$C_ACC_SHR) and shared-with-destination (NMA$C_ACC_LIM). The LAN drivers also provide the nonshareable exclusive mode (NMA$C_ACC_EXC). (See Table 1-16.) The rules and requirements for using each mode are as follows:

1.15 LAN Device Information

You can obtain information on controller characteristics by using the Get Device/Volume Information ($GETDVI) system service. (Refer to the OpenVMS System Services Reference Manual.)

$GETDVI returns controller characteristics when you specify the item code DVI$_DEVCHAR. Table 1-8 lists these characteristics, which are defined by the $DEVDEF macro and in the file SYS$LIBRARY:DEVDEF.H.

Table 1-8 Ethernet Controller Device Characteristics
Characteristic Meaning
Static Bits (Always Set)
DEV$M_AVL Device is available
DEV$M_IDV Input device
DEV$M_NET Network device
DEV$M_ODV Output device

DVI$_DEVTYPE and DVI$_DEVCLASS return the device type and device class names, which are defined by the $DCDEF macro and in the file SYS$LIBRARY:DCDEF.H. The device class name for the LAN Ethernet controllers listed in Section 1.2.1 and Section 1.2.2 is always DC$_SCOM.

DVI$_DEVBUFSIZ returns the maximum message size. The maximum send or receive message size depends on the packet format and whether padding (NMA$C_PCLI_PAD) is enabled (see Sections 1.16.1 and 1.16.2). DVI$_DEVDEPEND returns the unit and line status bits and the error summary bits in a longword field as shown in Figure 1-20.

Figure 1-20 DVI$_DEVDEPEND Returns


Table 1-9 lists the status values and their meanings. These values are defined by the $XMDEF macro. XM$M_STS_ACTIVE is set when the port is started. XM$M_STS_BUFFAIL and XM$M_STS_TIMO are dynamically set and cleared by the LAN driver.

Table 1-9 Ethernet Controller Unit and Line Status
Status Meaning
XM$M_STS_ACTIVE Port is active.
XM$M_STS_BUFFAIL Attempt to allocate a system receive buffer failed.
XM$M_STS_TIMO Timeout occurred.

The error summary bits are set when an error occurs. They are read-only bits. If an error is fatal, the Ethernet port is shut down. Table 1-10 lists the error summary bit values and their meanings.

Table 1-10 Error Summary Bits
Error Summary Bit Meaning
XM$M_ERR_FATAL Hardware or software error occurred on controller.

1.16 LAN Function Codes

The LAN drivers can perform logical, virtual, and physical I/O operations. The basic functions are read, write, set mode, set characteristics, sense mode, and sense characteristics. Table 1-11 lists these functions and their codes. The following sections describe these functions in greater detail.

Table 1-11 LAN I/O Functions
Function Code Arguments Type1 Function
Modifiers
Function
IO$_READLBLK 3 P1,P2,[P5] L IO$M_NOW Read logical block.
IO$_READVBLK 3 P1,P2,[P5] V IO$M_NOW Read virtual block.
IO$_READPBLK 3 P1,P2,[P5] P IO$M_NOW Read physical block.
IO$_WRITELBLK 4 P1,P2,[P4],P5 L IO$M_RESPONSE Write logical block.
IO$_WRITEVBLK 4 P1,P2,[P4],P5 V IO$M_RESPONSE Write virtual block.
IO$_WRITEPBLK 4 P1,P2,[P4],P5 P IO$M_RESPONSE Write physical block.
IO$_SETMODE P1,[P2],P3 2 L IO$M_CTRL
IO$M_STARTUP
IO$M_SHUTDOWN
IO$M_ATTNAST
IO$M_SET_MAC
IO$M_UPDATE_MAP
IO$M_ROUTE
Set controller characteristics and controller state for subsequent operations.
IO$_SETCHAR P1,[P2],P3 2 P IO$M_CTRL
IO$M_STARTUP
IO$M_SHUTDOWN
IO$M_ATTNAST
IO$M_SET_MAC
IO$M_UPDATE_MAP
IO$M_ROUTE
Set controller characteristics and controller state for subsequent operations.
IO$_SENSEMODE [P1],[P2] L IO$M_CTRL
IO$M_SENSE_MAC
IO$M_SHOW_MAP
IO$M_SHOW_ROUTE
Sense controller characteristics and return them in specified buffers.
IO$_SENSECHAR [P1],[P2] P IO$M_CTRL
IO$M_SENSE_MAC
IO$M_SHOW_MAP
IO$M_SHOW_ROUTE
Sense controller characteristics and return them in specified buffers.


1V = virtual, L = logical, P = physical (There is no functional difference in these operations.)
2The P1 and P3 arguments are only for attention AST QIOs.
3On OpenVMS Alpha, P1, and P5 support 64-bit addresses.
4On OpenVMS Alpha, P1, P4, and P5 support 64-bit addresses.

Although the LAN device drivers do not differentiate among logical, virtual, and physical I/O functions (all are treated identically), you must have the required privilege to issue the request. (Logical I/O functions do not require I/O privilege.)

1.16.1 Read

Read functions directly transfer data from a packet received from another port on the Ethernet into the virtual memory address space of the user process. The operating system provides the following function codes:

Received messages are buffered in system memory and then copied to the user's buffer when a read operation is performed.

The read functions take the following device- or function-dependent arguments:

Figure 1-21 Read Function P5 Buffer


The P1 and P2 arguments must always be specified; the P5 argument is optional. However, if P5 is not specified, you will be unable to determine the source of the received message.

If the size of the user data in a receive message is larger than the value of the NMA$C_PCLI_BUS parameter, the message is not given to the user, even if there is sufficient space in the user's receive buffer.

If the size of the user data in a receive message is larger than the size specified in P2 (and less than or equal to the value of the NMA$C_PCLI_BUS parameter), the P1 buffer is filled and SS$_DATAOVERUN is returned in the I/O status block.

Table 1-12 lists the maximum user data sizes that can be received for CSMA/CD, FDDI, and Token Ring protocols.

Table 1-12 Maximum User Data Sizes for CSMA/CD, FDDI, and Token Ring
Packet Format CSMA/CD FDDI ++Token Ring
Ethernet format without padding 1500 4470 ++4418
Ethernet format with padding 1498 4468 ++4416
802 format with 1-byte CTL field 1497 4475 ++4423
802 format with 2-byte CTL field 1496 4474 ++4422
802E format 1492 4470 ++4418


++Alpha specific.

On Alpha systems, Table 1-13 lists the maximum user data sizes that can be received for LAN emulation over ATM protocol.

Table 1-13 Maximum User Data Sizes for LAN Emulation over ATM (Alpha Only)
Packet Format ATM ELAN size: 1516 4544 9234
Ethernet format without padding   1500 4528 9218
Ethernet format with padding   1498 4526 9216
802 format with 1-byte CTL field   1497 4525 9215
802 format with 2-byte CTL field   1496 4524 9214
802E format   1492 4520 9210

For 802 format packets, the P5 buffer always contains the DSAP and SSAP in the bytes at offset 12 and 13. The next one or two bytes (offsets 14 and 15) following the SSAP contain the control field value. For Class I service, the control field value is always 1 byte in length and will always be placed in the byte at offset 14 of this buffer. For user-supplied service, you have to determine the length of the control field value according to the IEEE 802.2 Standard.

On Alpha systems with Token Ring, if received access control (RAC) is on, the first byte of the P5 buffer contains the frame control (FC) field.

For FDDI, if RAC is on, the first byte of the P5 buffer contains the FC field.

The read functions can take the following function modifier:

IO$M_NOW---Complete the read operation immediately with a received message (if no message is currently available, return a status of SS$_ENDOFFILE in the I/O status block).


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6136LAN_003.HTML