HDLC Link Startup Analysis: Nodes 100 ↔ 102¶
Overview¶
Analysis of HDLC link establishment and routing table initialization between SINTRAN nodes 100 and 102, based on system trace data showing link state tables, frame tables, and HAC (HDLC Access Control) status codes.
Trace Data Summary¶
Node 100 Status Report¶
Link table status: 4 entries. 1 in use. Max 1 used.
No Addr. State Sysid Rcv Xmit Lun Timeout Soft-stat-hard TXData/Retry/RXBad
1 152173 Run 100 40RR 40RR 1360 10/Off 0 0 0/0/4
Transmit Frame table: 25 entries. 0 in use. Max 1 used.
Receive Frame table: 20 entries. 5 in use. Max 5 used.
Free data transmit blocks: 10
Addr. Link HAC Status To From Refno Nettype Cnt1 Buff1 Cnt2 Buff2
163205 0 410I 0 100 102 65535 INACK 0 0 0 0
164450 152173 0 0 0 0 0 --- 4 1634001 0 1634001
164503 152173 0 0 0 0 0 --- 4 1634472 0 1634472
164536 152173 0 72 0 0 0 --- 0 1635163 0 1635163
164571 152173 0 0 0 0 0 --- 4 1635654 0 1635654
164624 152173 0 0 0 0 0 --- 4 1636345 0 1636345
Node 102 Status Report (Initial)¶
Transmit Frame table: 25 entries. 0 in use. Max 2 used.
Receive Frame table: 20 entries. 5 in use. Max 5 used.
Free data transmit blocks: 10
Addr. Link HAC Status To From Refno Nettype Cnt1 Buff1 Cnt2 Buff2
163205 0 0 0 102 100 65535 INIT 0 0 0 0
163240 0 400I 0 102 100 1 * <-> 14 1600000 8 1652001
164450 152173 0 0 0 0 0 --- 4 1634001 0 1634001
164503 152173 0 0 0 0 0 --- 4 1634472 0 1634472
164536 152173 0 0 0 0 0 --- 4 1635163 0 1635163
164571 152173 0 0 0 0 0 --- 4 1635654 0 1635654
164624 152173 0 72 0 0 0 --- 0 1636345 0 1636345
Node 102 Status Report (After Additional Routing Commands)¶
Transmit Frame table: 25 entries. 0 in use. Max 1 used.
Receive Frame table: 20 entries. 5 in use. Max 5 used.
Free data transmit blocks: 10
Addr. Link HAC Status To From Refno Nettype Cnt1 Buff1 Cnt2 Buff2
163205 0 411I 0 100 102 3 * <-> 14 1600000 8 1652001
164450 152173 0 0 0 0 0 --- 16 1634001 0 1634001
164503 152173 410I 0 102 100 0 NAK 16 1634472 0 1634472
164536 152173 410I 0 102 100 2 NAK 16 1635163 0 1635163
164571 152173 421I 0 102 100 3 NAK 0 1635654 0 1635654
164624 152173 421I 0 102 100 1 NAK 4 1636345 0 1636345
Node 101 Status Report¶
Transmit Frame table: 25 entries. 0 in use. Max 2 used.
Receive Frame table: 20 entries. 5 in use. Max 5 used.
Free data transmit blocks: 10
Addr. Link HAC Status To From Refno Nettype Cnt1 Buff1 Cnt2 Buff2
163205 0 0 0 102 100 65535 INIT 0 0 0 0
163240 0 421I 0 102 100 3 NAK 0 1600000 0 1652001
164450 152173 411I 0 100 102 1 * <-> 16 1634001 0 1634001
164503 152173 400I 0 100 102 2 * <-> 4 1634472 0 1634472
164536 152173 0 0 0 0 0 --- 16 1635163 0 1635163
164571 152173 400I 0 100 102 0 * <-> 4 1635654 0 1635654
164624 152173 411I 0 100 102 3 * <-> 4 1636345 0 1636345
Deep Analysis¶
1. Link Table Analysis (Node 100)¶
Active Link Entry: - Address: 152173₈ (54395₁₀) - Physical link structure address - State: "Run" - Link is operational and established - Sysid: 100 - Local system identifier - Rcv/Xmit: 40RR/40RR - Receiver Ready state in both directions - Lun: 1360₈ (752₁₀) - Logical Unit Number for this link - Timeout: 10/Off - 10-second timeout, currently disabled - Statistics: 0/0/4 - 0 TX data, 0 retries, 4 RX bad frames
Link Establishment Indicators: - 40RR/40RR: Both transmit and receive in Ready state (HDLC I-frame ready) - State "Run": Link has completed startup handshake successfully - 4 RX bad frames: Indicates some frame errors during startup phase
2. Frame Table Analysis¶
Node 100 Frame Entries:¶
Frame 163205 (Routing/Control): - HAC Status: 410I - Incoming routing frame with status 410 - Route: 100 → 102 (outbound routing advertisement) - Refno: 65535₁₀ (177777₈) - Maximum reference number (broadcast/special) - Nettype: INACK - Incoming acknowledgment frame - Data: Empty (Cnt1=0, Cnt2=0) - Pure control frame
Frames 164450-164624 (Data Buffers): - Link: 152173 - Associated with established link - HAC Status: 0 or 72₈ - Normal data frame status - Buffer Management: 4-byte control blocks at various memory locations - Frame Types: Standard data frames ("---" nettype)
Node 102 Frame Entries:¶
Frame 163205 (Initialization): - HAC Status: 0 - Neutral/initialization state - Route: 102 → 100 (return path) - Refno: 65535₁₀ - Special initialization reference - Nettype: INIT - Link initialization frame
Frame 163240 (Bidirectional Data): - HAC Status: 400I - Incoming data frame with status 400 - Route: 102 → 100 (response direction) - Refno: 1 - First regular data frame - Nettype: * <-> - Bidirectional data frame - Data: 14 bytes at 1600000₈ + 8 bytes at 1652001₈ - Actual routing data
3. HAC Status Code Analysis¶
Observed HAC Status Codes Across All Nodes:
From the routing traces, these HAC codes appear:
- 400I: Present on all nodes with bidirectional data ( <->)
- 410I: Present on all nodes with both NAK and * <-> frames
- 411I: Present on nodes 101 and 102 with * <-> frames
- 421I*: Present on nodes 101 and 102 with NAK frames
Pattern Analysis:
HAC Code Structure (Hypothesis):¶
[4][X][Y]I where:
4 = Consistent first digit (possibly frame category)
X = Variable middle digit (0,1,2)
Y = Variable last digit (0,1)
I = Incoming frame indicator
Distribution by NETTYPE:¶
NAK Frames:
- Node 102: 410I, 421I
- Node 101: 421I
Bidirectional Data (* <->) Frames:
- Node 100: 410I (initial)
- Node 102: 400I (initial), 411I (later)
- Node 101: 411I, 400I
Reference Number Correlation:¶
- Refno 0: HAC 410I, 400I (initial sequence numbers)
- Refno 1: HAC 421I, 411I
- Refno 2: HAC 410I, 400I
- Refno 3: HAC 421I, 411I, 400I
Key Observations: 1. No clear 4xx = routing pattern: All codes start with 4, but include both data and NAK frames 2. State progression: Codes change over time on same frame addresses 3. Node-specific patterns: Different nodes show different code distributions 4. NETTYPE correlation: NAK and * <-> frames can have same HAC codes
4. Link Startup Sequence Reconstruction¶
Phase 1: Initial Contact
Node 102 → Node 100: INIT frame (Nettype: INIT, Refno: 65535)
Frame 163205 with HAC status 0
Phase 2: Routing Advertisement
Node 100 → Node 102: Routing advertisement (HAC: 410I, INACK)
Frame 163205, Refno: 65535
Phase 3: Data Exchange Establishment
Node 102 → Node 100: Bidirectional data frame (HAC: 400I, * <->)
Frame 163240, Refno: 1, 22 bytes total data
Phase 4: Link Operational
Both nodes: State = "Run", RcvXmit = "40RR/40RR"
Link address 152173₈ established and active
5. Routing Table Exchange¶
Data Content Analysis (Node 102 Frame 163240): - Primary Buffer: 14 bytes at 1600000₈ - Likely routing table header - Secondary Buffer: 8 bytes at 1652001₈ - Route entries or checksums - Total: 22 bytes of routing information exchanged
Network Topology Information: - Node 100: Acting as routing hub, advertising routes (INACK frames) - Node 102: Responding with local routes and acknowledging (bidirectional data) - Reference Numbers: 65535 for broadcasts, 1+ for sequenced data
6. Error Recovery Evidence¶
Node 100 Statistics: - RXBad = 4: Four bad frames received during startup - Retry = 0: No retransmissions required - TXData = 0: No regular data transmitted yet (still in routing phase)
Error Recovery Process: 1. Node 100 detected 4 corrupted frames during link establishment 2. HDLC automatic repeat request (ARQ) handled frame recovery 3. Link successfully established despite initial frame errors 4. Both nodes achieved 40RR/40RR (Ready/Ready) state
HDLC Protocol Flow Diagram¶
Node 100 Node 102
-------- --------
| |
| 1. Link Detection |
|<--------------------------------|
| |
| 2. INIT Frame (Refno: 65535) |
|<--------------------------------| HAC: 0, NETTYPE: INIT
| |
| 3. Route Advertisement |
|-------------------------------->| HAC: 410I, NETTYPE: INACK
| | (Frame queued for processing)
| |
| 4. Route Response + Data |
|<--------------------------------| HAC: 400I, NETTYPE: * <->
| | (22 bytes routing data)
| |
| 5. Link Established |
|<=====RUN STATE 40RR/40RR=====>|
| |
| Link Address: 152173₈ |
| Timeout: 10 seconds |
| Status: Operational |
Critical Observations¶
1. Frame Processing States¶
- HAC 4xx codes: Reserved for routing and control frames
- "I" suffix: Indicates incoming frame requiring local processing
- Status progression: 410I (queued) → 400I (processed)
2. Memory Management¶
- Consistent buffer addresses: Same buffer pool used across both nodes
- Frame table efficiency: 20 receive slots, 25 transmit slots per node
- Buffer recycling: Multiple frames sharing buffer address space
3. Network Layer Integration¶
- Reference number progression: 65535 (broadcast) → 1 (sequenced data)
- Bidirectional establishment: Single handshake establishes both directions
- Route advertisement: Node 100 acts as route advertiser (INACK frames)
4. Error Handling Effectiveness¶
- 4 bad frames tolerated: Link establishment succeeded despite errors
- No retransmission overhead: ARQ handled at HDLC level transparently
- Timeout management: 10-second timeout with disable capability
Detailed Frame Analysis from xmsg-log.txt¶
XMSG API Function Calls¶
Observed XMSG iFunc Calls:
- XFDCT (000001): Function code 1 - Frame disconnect/control
- XFGET (000002): Function code 2 - Frame get/retrieve
- XFREL (000003): Function code 3 - Frame release/free
- XFSCM (000010): Function code 10₈ (8₁₀) - Frame status command
- XFABR (000022): Function code 22₈ (18₁₀) - Frame abort/terminate
Complete HDLC Frame Sequences¶
Frame Exchange Pattern: Node 64₁₀ (100₈) ↔ Node 102₁₀ (66₁₆)¶
Frame 1: Initial Routing Advertisement (TX from Node 64)
TX: [09 20 21 13 00 07 00 66 00 64 00 01 FF D8 DE 41]
09 = Frame header/type
20 = Control byte (response frame)
21 13 = Protocol/frame type identifier
00 07 = Length field (7 bytes payload)
00 66 = Destination node 102₁₀ (0x66)
00 64 = Source node 100₁₀ (0x64)
00 01 = Sequence number 1
FF D8 DE 41 = Routing data/checksum
Frame 2: Node Status Response (RX to Node 64)
RX: [09 00 21 13 00 0E 00 64 00 66 00 01 01 00 DD 13]
09 = Frame header/type
00 = Control byte (command frame)
21 13 = Protocol/frame type identifier
00 0E = Length field (14 bytes payload)
00 64 = Destination node 100₁₀ (0x64)
00 66 = Source node 102₁₀ (0x66)
00 01 = Sequence number 1
01 00 DD 13 = Status response data
Frame 3: Short Status Frame (TX from Node 64)
TX: [09 29 00 64]
09 = Frame header/type
29 = Control byte (poll/status request)
00 64 = Target node 100₁₀ (0x64)
Frame 4: Acknowledgment Response (RX to Node 64)
RX: [09 21 00 66]
09 = Frame header/type
21 = Control byte (acknowledgment)
00 66 = Source node 102₁₀ (0x66)
Frame Evolution Pattern¶
Sequence Progression: 1. Control bytes evolve: 20 → 00 → 29 → 21 → 22 → 42 → 41 → 49 2. Length fields vary: 07, 0E (routing data) vs short frames (no length) 3. Sequence numbers increment: 01 → 02 in longer routing frames 4. Frame types: Full routing (16-18 bytes) vs status/ack (4-6 bytes)
DMA Buffer Management¶
KeyValue Classifications:¶
- 0x0200: EmptyReceiverBlock - Available receive buffer
- 0x0303: FullReceiverBlock - Buffer containing received data
- 0x0403: BlockToBeTransmitted - Buffer ready for transmission
- 0x0000: Null buffer - End of buffer list marker
Buffer Flow:¶
EmptyReceiverBlock (0x0200) → FullReceiverBlock (0x0303) → Processing
BlockToBeTransmitted (0x0403) → Transmission → Null (0x0000)
Status Register Correlations¶
Transmitter Status Values: - 007101₈ (3649₁₀): TransmitBufferEmpty, DMAModuleRequest, ReadyForSending, FrameEnd, ListEnd, TransmissionFinished - 002641₈ (1441₁₀): TransmitBufferEmpty, DMAModuleRequest, ReadyForSending, FrameEnd, TransmissionFinished
Receiver Status Values: - 001554₈ (876₁₀): ReceiverActive, SyncFlagReceived, DMAModuleRequest, SignalDetector, DataSetReady, BlockEnd, FrameEnd
Frame Type Analysis¶
Long Routing Frames (16-18 bytes):¶
- Purpose: Route advertisement and network topology exchange
- Pattern:
09 [control] 21 13 00 [len] 00 [dst] 00 [src] 00 [seq] [data] - Control evolution: 00 → 20 → 22 → 42 (command → response → acknowledge → data)
Short Status Frames (4-6 bytes):¶
- Purpose: Keepalive, acknowledgment, and status polling
- Pattern:
09 [control] 00 [node]or09 [control] 00 [node] [crc] - Control types: 21 (ack), 29 (poll), 41 (status), 49 (response)
Network Layer Protocol¶
Frame Header Structure (Byte 0: 09): - Consistent across all frames - Likely HDLC frame delimiter or protocol identifier
Control Byte Meanings (Byte 1):
- 0x00: Command frame (initiate communication)
- 0x20: Response frame (reply to command)
- 0x21: Acknowledgment frame
- 0x22: Data acknowledgment
- 0x29: Status poll request
- 0x41: Status indication
- 0x42: Data frame with acknowledgment required
- 0x49: Final response/status
Protocol Identifier (Bytes 2-3: 21 13): - Only present in long routing frames - Identifies routing protocol packets vs pure status frames
Conclusion¶
The detailed frame analysis reveals a sophisticated HDLC routing protocol with:
- Bi-directional handshake: Command/Response/Acknowledge pattern
- Frame type differentiation: Long routing frames vs short status frames
- Sequence number management: Increment for data frames, static for status
- Node addressing: Clear source/destination node identification (100₁₀ ↔ 102₁₀)
- Buffer management: Circular DMA buffer allocation with state tracking
- XMSG integration: API calls correlate with frame transmission events
- Status register correlation: Hardware status reflects frame processing states
Key Insight: The HAC status codes from the routing tables likely correlate with the control byte values in the actual HDLC frames (0x00, 0x20, 0x21, etc.), indicating frame processing states rather than simple categorization.