(self, pkt, s, val)
| 3484 | return pfxlen |
| 3485 | |
| 3486 | def addfield(self, pkt, s, val): |
| 3487 | # type: (Packet, bytes, Optional[Tuple[str, int]]) -> bytes |
| 3488 | (rawpfx, pfxlen) = self.i2m(pkt, val) |
| 3489 | fmt = "!%is" % self._numbytes(pfxlen) |
| 3490 | return s + struct.pack(fmt, rawpfx) |
| 3491 | |
| 3492 | def getfield(self, pkt, s): |
| 3493 | # type: (Packet, bytes) -> Tuple[bytes, Tuple[str, int]] |