(self, use_l4_port: bool = False)
| 38 | ) |
| 39 | |
| 40 | def hash_data(self, use_l4_port: bool = False) -> bytes: |
| 41 | data = self.ip_src.packed + self.ip_dst.packed |
| 42 | if use_l4_port: |
| 43 | data += struct.pack(">H", self.l4_sport) |
| 44 | data += struct.pack(">H", self.l4_dport) |
| 45 | return data |
| 46 | |
| 47 | |
| 48 | class TrafficTemplate: |