PAM Programming Manual

Link-Level Interfaces
PAM Programming Manual142482
3-6
Formatting Library for Ethernet
Formatting Library for Ethernet
The Formatting Library provides the header files to include in your application and the
object files to which you will link or bind.
This subsection describes the use of primitives (function calls or procedures) in the L2S
Formatting Library for Ethernet. The following topics are covered:
Primitives for Ethernet
Formatting an Aggregate SDU Header (Ethernet)
Formatting an Aggregate SDU and an SDU Header (Ethernet)
Formatting an SDU Header (Ethernet)
Getting an SDU (Ethernet)
Primitives for Ethernet
The L2S Formatting Library currently contains four primitives. They are always passed
to an aggregate SDU buffer: The primitives are
ZL2S^Frmt^Aggr^SDU^Hdr^
Initializes an aggregate SDU buffer and formats an aggregate SDU header for an
outgoing aggregate SDU message. (See Formatting an Aggregate SDU Header
(Ethernet) for a detailed description of this primitive.)
ZL2S^Frmt^Aggr^SDU^n^SDU^Hdr^
In one operation, initializes an aggregate SDU buffer, formats an aggregate SDU
header, and formats an initial individual SDU header for an outgoing aggregate SDU
message. The type of individual SDU header is dependent on the Port^Type in use
(LLC1 or Ethernet) and the SDU^Type (UI, XID, or Test) being built. (See
Formatting an Aggregate SDU and an SDU Header (Ethernet)
for a detailed
description of this primitive.)
ZL2S^Frmt^SDU^Hdr^
Formats a header for an individual SDU in an aggregate SDU buffer. The type of
individual SDU header is dependent on the Port^Type in use (LLC1 or Ethernet),
and the SDU^Type (UI, XID, or Test) being built. See Formatting an SDU Header
(Ethernet) for a detailed description of this primitive.
ZL2S^Get^SDU^
Finds the first or next SDU in an inbound aggregate SDU buffer, interprets the SDU
header, points the application to the beginning of the user data portion of the SDU,
and give the user data length. (See Getting an SDU (Ethernet)
for a detailed
description of this primitive.)
The ZL2S^Frmt^Aggr^SDU^Hdr^ primitive initializes an aggregate SDU buffer and
formats the aggregate SDU header. The ZL2S^Frmt^Aggr^SDU^n^SDU^Hdr^