get_data_len computes the length of the data field To do this computation, the length of the padlen field and the actual padding is subtracted to the string that was provided to the pre_dissect # noqa: E501 fun of the pkt parameter :return: int; length of the data
(self)
| 1459 | ] |
| 1460 | |
| 1461 | def get_data_len(self): |
| 1462 | # type: () -> int |
| 1463 | """ get_data_len computes the length of the data field |
| 1464 | |
| 1465 | To do this computation, the length of the padlen field and the actual |
| 1466 | padding is subtracted to the string that was provided to the pre_dissect # noqa: E501 |
| 1467 | fun of the pkt parameter |
| 1468 | :return: int; length of the data part of the HTTP/2 frame packet provided as parameter # noqa: E501 |
| 1469 | :raises: AssertionError |
| 1470 | """ |
| 1471 | padding_len = self.getfieldval('padlen') |
| 1472 | fld, fval = self.getfield_and_val('padlen') |
| 1473 | padding_len_len = fld.i2len(self, fval) |
| 1474 | |
| 1475 | ret = self.s_len - padding_len_len - padding_len |
| 1476 | assert ret >= 0 |
| 1477 | return ret |
| 1478 | |
| 1479 | def pre_dissect(self, s): |
| 1480 | # type: (str) -> str |
no test coverage detected