(self)
| 565 | return self_psrc[:len(other_pdst)] == other_pdst[:len(self_psrc)] |
| 566 | |
| 567 | def route(self): |
| 568 | # type: () -> Tuple[Optional[str], Optional[str], Optional[str]] |
| 569 | fld, dst = cast(Tuple[MultipleTypeField, str], |
| 570 | self.getfield_and_val("pdst")) |
| 571 | fld_inner, dst = fld._find_fld_pkt_val(self, dst) |
| 572 | scope = None |
| 573 | if isinstance(dst, (Net, _ScopedIP)): |
| 574 | scope = dst.scope |
| 575 | if isinstance(dst, Gen): |
| 576 | dst = next(iter(dst)) |
| 577 | if isinstance(fld_inner, IP6Field): |
| 578 | return conf.route6.route(dst, dev=scope) |
| 579 | elif isinstance(fld_inner, IPField): |
| 580 | return conf.route.route(dst, dev=scope) |
| 581 | else: |
| 582 | return None, None, None |
| 583 | |
| 584 | def extract_padding(self, s): |
| 585 | # type: (bytes) -> Tuple[bytes, bytes] |
no test coverage detected