(self, pkt, s)
| 725 | # brave enough to refactor it, it'll be easier. |
| 726 | |
| 727 | def getfield(self, pkt, s): |
| 728 | # type: (Packet, bytes) -> Tuple[bytes, int] |
| 729 | previous_post_dissect = pkt.post_dissect |
| 730 | |
| 731 | def _post_dissect(self, s): |
| 732 | # type: (Packet, bytes) -> bytes |
| 733 | # Reset packet to allow post_build |
| 734 | self.raw_packet_cache = None |
| 735 | self.post_dissect = previous_post_dissect # type: ignore |
| 736 | return previous_post_dissect(s) |
| 737 | pkt.post_dissect = MethodType(_post_dissect, pkt) # type: ignore |
| 738 | s = TrailerBytes(s) |
| 739 | s, val = self.fld.getfield(pkt, s) |
| 740 | return bytes(s), val |
| 741 | |
| 742 | def addfield(self, pkt, s, val): |
| 743 | # type: (Packet, bytes, Optional[int]) -> bytes |
nothing calls this directly
no test coverage detected