Create input packet stream :param list packet_sizes: Required packet sizes.
(cls, packet_sizes, packet_count=test_packet_count)
| 1163 | |
| 1164 | @classmethod |
| 1165 | def create_stream(cls, packet_sizes, packet_count=test_packet_count): |
| 1166 | """Create input packet stream |
| 1167 | |
| 1168 | :param list packet_sizes: Required packet sizes. |
| 1169 | """ |
| 1170 | for i in range(0, packet_count): |
| 1171 | info = cls.create_packet_info(cls.src_if, cls.src_if) |
| 1172 | payload = cls.info_to_payload(info) |
| 1173 | p = ( |
| 1174 | IP(id=info.index, src=cls.src_if.remote_ip4, dst=cls.dst_if.remote_ip4) |
| 1175 | / UDP(sport=1234, dport=5678) |
| 1176 | / Raw(payload) |
| 1177 | ) |
| 1178 | size = packet_sizes[(i // 2) % len(packet_sizes)] |
| 1179 | cls.extend_packet(p, size, cls.padding) |
| 1180 | info.data = p |
| 1181 | |
| 1182 | @classmethod |
| 1183 | def create_fragments(cls): |
nothing calls this directly
no test coverage detected