3.6.5.2 Receiving an Emit Frame

A responder in the Quiescent state MUST ignore the Emit frame.

If the responder is in the Command or Emit state, the Active Time of the current mapping session MUST be updated to the current time. The Active Time of the session is updated irrespective of further processing rules which result in error conditions or the Emit frame being discarded.

If the topology state is in the Emit state, no more processing is done with the Emit frame. Otherwise, the Emit frame is processed as follows.

If the Sequence Number field in the Base header of the received Emit frame is nonzero, the responder MUST check this sequence number and function number (Function Number field in Demultiplex header) against the Last-Sent Response. If there is a match, the frame that is saved MUST be resent, and no further processing is done on the Emit frame.

Otherwise, if there is match with the Last-Sent Response, the Emit frame MUST then be checked for validity by testing whether all of the following are true:

  • The Emit frame was not sent to the broadcast address.

  • Train and Probe Source Address field values equal the responder's MAC address or are within the range of the OUI that is allocated for this protocol (see section 1.9).

  •  Trains and Probe Destination Address field values are not an Ethernet broadcast or multicast address.

  • The cumulative Pause value from all quadruples in the Emit frame MUST NOT exceed 1 second.

If any of the previous statements are not true, the responder MUST perform no further processing on the Emit frame.

If sequence number in the frame is nonzero, the responder MUST validate this sequence number against Next Sequence Number.  If the sequence number of the frame is zero, no validation is required.

Validation against the Next Sequence Number succeeds if the Next Sequence Number is zero or if the Next Sequence Number is nonzero and matches the sequence number of the Emit frame. Otherwise, validation fails and the responder MUST perform no further processing on the Emit frame.

After validation succeeds, the responder MUST increase the CTC by incrementing the Frame Charge (FC) by 1, and the Byte Charge (BC) by the combined size, in bytes, of the Destination MAC, Source MAC, EtherType, and Payload fields of the Ethernet frame encapsulating the Emit frame, as described in section 1.3.5.3. The CTC counters MUST be capped at a maximum value to prevent a rogue mapper from accumulating a large amount of charge at multiple responders and releasing this charge at the same time against a target. The limits SHOULD be 65,536 BC and 64 FC.

To avoid amplification attacks, the responder MUST require enough CTC (in both frames and bytes) to send a Train frame or Probe frame for each entry in the EmiteeDescs field in the Emit frame.  If the Emit frame is acknowledged (has a nonzero sequence number), enough CTC must also exist to send an Ack frame or Flat frame.

The CTC required for each frame to be sent by the responder is as follows:

Frame

Size

Reference

Flat

1 FC; 37 BC

section 2.2.4.12

Probe

1 FC; 32 BC

section 2.2.4.6

Train

1 FC; 32 BC

section 2.2.4.5

Ack

1 FC; 32 BC

section 2.2.4.7

If not enough CTC exists, and the Emit frame is unacknowledged (that is, the sequence number is zero), the responder MUST perform no further processing on the Emit frame and the CTC counters MUST be reverted to the previous values.

If not enough CTC exists, and the Emit frame is acknowledged (that is, a nonzero sequence number is present), a Flat frame MUST be returned to the mapper. An Emit frame always contains enough inherent charge to send a Flat frame.

The fields in the Flat frame MUST be as follows:

  • Real_Source_Address: Set to the Real_Destination_Address field of the Emit frame.

  • Real_Destination_Address: Set to the Real_Source_Address field of the Emit frame.

  • Sequence_Number_or_XID: MUST be set to the Sequence_Number_or_XID field of the Emit frame.

  • Current_Transmit_Credit_In_Bytes: BC value at the time the Emit frame was received (that is, before the BC is updated with the byte count of the Emit frame).

  • CTC_in_packets: FC value at the time the Emit frame was received (that is, before the FC is incremented to account for the Emit frame).

When the responder sends the Flat frame, it MUST record this information in the Last-Sent Response and update the Next Sequence Number with the sequence number of the Emit frame incremented by one using ones-complement arithmetic (that is, it MUST advance from 0xFFFF to 0x0001 and skip 0x0000). If the real source address (Real Source Address field in the Base header) of the Emit frame is not equal to the source address in the Ethernet header of the encapsulating Ethernet frame, then the Flat frame MUST be broadcasted. Otherwise the destination address of the Flat frame SHOULD be set to the real source address.

If enough CTC exists, the Last-Sent Response and the CTC counters MUST then be zeroed, whether or not the Emit frame is acknowledged (has a nonzero sequence number). The topology discovery state engine MUST then transition into the Emit state (by setting the topology state to Emit) while the Emit frame is being processed. The responder MUST attempt to copy the entire EmiteeDescs field in the Emit header into the emit list. The sequence number of the Emit frame is copied into Emit Sequence Value (even if it is zero). The Emit timer MUST be started, with the expiration time delta set to the Pause value in the first quadruple in the Emit header. If the responder fails to copy the EmiteeDescs field, it MUST silently ignore the Emit frame and the CTC counters MUST be zeroed.