Clear the raw packet cache for the field and all its subfields
(self)
| 697 | return None |
| 698 | |
| 699 | def clear_cache(self): |
| 700 | # type: () -> None |
| 701 | """Clear the raw packet cache for the field and all its subfields""" |
| 702 | self.raw_packet_cache = None |
| 703 | for fname, fval in self.fields.items(): |
| 704 | fld = self.get_field(fname) |
| 705 | if fld.holds_packets: |
| 706 | if isinstance(fval, Packet): |
| 707 | fval.clear_cache() |
| 708 | elif isinstance(fval, list): |
| 709 | for fsubval in fval: |
| 710 | fsubval.clear_cache() |
| 711 | self.payload.clear_cache() |
| 712 | |
| 713 | def self_build(self): |
| 714 | # type: () -> bytes |
no test coverage detected