| 242 | |
| 243 | |
| 244 | class LEBitFieldLenField(LEBitField): |
| 245 | __slots__ = ["length_of", "count_of", "adjust"] |
| 246 | |
| 247 | def __init__(self, name, default, size, length_of=None, count_of=None, adjust=lambda pkt, x: x): # noqa: E501 |
| 248 | LEBitField.__init__(self, name, default, size) |
| 249 | self.length_of = length_of |
| 250 | self.count_of = count_of |
| 251 | self.adjust = adjust |
| 252 | |
| 253 | def i2m(self, pkt, x): |
| 254 | return FieldLenField.i2m(self, pkt, x) |
| 255 | |
| 256 | |
| 257 | class LEBitEnumField(LEBitField, _EnumField): |