3.6.1 Abstract Data Model
This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model as long as their external behaviors are consistent with those described in this document.
The data elements required in any responder implementation are:
Topology State: This data element stores the current state of the topology discovery state engine, as shown in the following figure.
Figure 4: Responder's Topology Discovery state engine
Generation Number: Knowing the correct generation number for a mapping iteration is necessary because of the way switches are forced to learn addresses. By the end of quick discovery, at most one mapper is active, and the mapper knows the correct generation number and all responders that are associated to it.
Next Sequence Number: This data element is a 16-bit unsigned value. This data element MUST be initially set to zero, which indicates an invalid sequence number value. The first request that the mapper sends (via one of the Charge, Emit, Query, or QueryLargeTLV frames) that has a nonzero Sequence Number field in the Base header is incremented and stored in this data element.
Sees-List: This list MUST hold all of the information that is required to construct one or more RecveeDesc structures that are returned in the QueryResp packet (as specified in section 184.108.40.206). Entries in the list MUST be stored in such a way that the oldest entry can be returned first. A responder SHOULD support up to 10,000 entries in the Sees-List.
Last-Sent Response: The Last-Sent Response MUST be identified by the Function Number field in the Demultiplex header of the Request frame and the Sequence Number field in the Base header of the original request frame. Each time the responder sends out an Ack, Flat, QueryResp, or QueryLargeTlvResp frame, it updates this value as well as a copy of the response frame that it sent.
Charge/CTC Counters: A responder MUST maintain its current charge (see section 220.127.116.11) or Current Transmit Credit (CTC). The CTC holds two counters: an 8-bit unsigned integer Frame Count (FC), and a 16-bit unsigned integer Byte Count (BC). See sections 18.104.22.168 and 22.214.171.124 for an overview of how charge is accumulated and consumed.
Emit List: This data element is a list that stores the remaining EmiteeDescs fields in the Emit header that need to be processed when the topology state is set to Emit.
Emit Sequence Value: This 16-bit unsigned value stores the sequence number of the Emit frame that is being processed when the topology state is set to Emit.
Error Flag: This is a global flag. It MUST be set to FALSE initially. It MUST be set to TRUE when a Probe frame arrives, and the responder is not able to accommodate it in the Sees-List.
Large Data Property List: This data element is a set of large data properties, as specified in section 2.2.2, for the responder itself.
Current Mapper: This data element contains the MAC address of the mapper the responder is associated with for the duration of topology discovery. The mapper associated with the responder is the sole enumerator whose entry has a state field set to Complete in the Session Table described in section 3.5.1, and is of the Topology discovery service type. The MAC address associated with that entry is the current mapper MAC address. If the Session Table has no entry with a state field set to Complete state, there is no current mapper. When the Session Table is updated, the current mapper MUST be updated accordingly.
Note The previous conceptual data can be implemented by using a variety of techniques. An implementer can implement such data in any way.