|
29 | 29 |
|
30 | 30 |
|
31 | 31 | """ |
32 | | -This module contains unit tests for the Packet Handler Ethernet 802.3 TX operations. |
| 32 | +This module contains integration tests for the Packet Handler Ethernet 802.3 TX operations. |
33 | 33 |
|
34 | | -pytcp/tests/unit/test__packet_handler__ethernet_802_3__tx.py |
| 34 | +pytcp/tests/integration/test__packet_handler__ethernet_802_3__tx.py |
35 | 35 |
|
36 | 36 | ver 3.0.4 |
37 | 37 | """ |
|
61 | 61 | "ethernet_802_3__dst": HOST_A__MAC_ADDRESS, |
62 | 62 | }, |
63 | 63 | "_expected__frames_tx": [ |
| 64 | + # Ethernet 802.3 |
| 65 | + # Destination MAC : 02:00:00:00:00:91 |
| 66 | + # Source MAC : 02:00:00:00:00:07 |
| 67 | + # Length : 0x0000 (header-only frame) |
| 68 | + # |
| 69 | + # Summary: Raw 802.3 frame transmitted with caller-specified MAC addresses. |
64 | 70 | b"\x02\x00\x00\x00\x00\x91\x02\x00\x00\x00\x00\x07\x00\x00", |
65 | 71 | ], |
66 | 72 | "_expected__tx_status": TxStatus.PASSED__ETHERNET_802_3__TO_TX_RING, |
|
77 | 83 | "ethernet_802_3__src": MAC__UNSPECIFIED, |
78 | 84 | "ethernet_802_3__dst": HOST_A__MAC_ADDRESS, |
79 | 85 | }, |
80 | | - "_expected__frames_tx": [b"\x02\x00\x00\x00\x00\x91\x02\x00\x00\x00\x00\x07\x00\x00"], |
| 86 | + "_expected__frames_tx": [ |
| 87 | + # Ethernet 802.3 |
| 88 | + # Destination MAC : 02:00:00:00:00:91 |
| 89 | + # Source MAC : 02:00:00:00:00:07 (filled by stack) |
| 90 | + # Length : 0x0000 (header-only frame) |
| 91 | + # |
| 92 | + # Summary: Source MAC unspecified; stack fills in before transmitting the 802.3 header. |
| 93 | + b"\x02\x00\x00\x00\x00\x91\x02\x00\x00\x00\x00\x07\x00\x00", |
| 94 | + ], |
81 | 95 | "_expected__tx_status": TxStatus.PASSED__ETHERNET_802_3__TO_TX_RING, |
82 | 96 | "_expected__packet_stats_tx": PacketStatsTx( |
83 | 97 | ethernet_802_3__pre_assemble=1, |
|
109 | 123 | "ethernet_802_3__payload": RawAssembler(raw__payload=bytes(range(16))), |
110 | 124 | }, |
111 | 125 | "_expected__frames_tx": [ |
| 126 | + # Ethernet 802.3 |
| 127 | + # Destination MAC : 02:00:00:00:00:91 |
| 128 | + # Source MAC : 02:00:00:00:00:07 |
| 129 | + # Length : 0x0010 (16 bytes of payload) |
| 130 | + # |
| 131 | + # Payload |
| 132 | + # Bytes : 00..0f (RawAssembler content) |
| 133 | + # |
| 134 | + # Summary: 802.3 frame with a 16-byte LLC payload assembled by RawAssembler. |
112 | 135 | b"\x02\x00\x00\x00\x00\x91\x02\x00\x00\x00\x00\x07\x00\x10\x00\x01" |
113 | 136 | b"\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", |
114 | 137 | ], |
|
0 commit comments