|
XenevaOS
|
#include <mps_reader.h>
Public Attributes | ||
| unsigned char * | frag | |
| mbedtls_mps_stored_size_t | frag_len | |
| mbedtls_mps_stored_size_t | commit | |
| mbedtls_mps_stored_size_t | end | |
| mbedtls_mps_stored_size_t | pending | |
| unsigned char * | acc | |
| mbedtls_mps_stored_size_t | acc_len | |
| mbedtls_mps_stored_size_t | acc_available | |
| union { | ||
| mbedtls_mps_stored_size_t acc_remaining | ||
| mbedtls_mps_stored_size_t frag_offset | ||
| } | acc_share | |
| unsigned char* mbedtls_mps_reader::acc |
The accumulator is used to gather incoming data if a read-request via mbedtls_mps_reader_get() cannot be served from the current fragment.
| mbedtls_mps_stored_size_t mbedtls_mps_reader::acc_available |
The number of bytes currently gathered in the accumulator. This is both used in producing and in consuming mode: While producing, it is increased until it reaches the value of acc_remaining below. While consuming, it is used to judge if a get request can be served from the accumulator or not. Must not be larger than acc_len.
| mbedtls_mps_stored_size_t mbedtls_mps_reader::acc_len |
The total size of the accumulator.
| mbedtls_mps_stored_size_t mbedtls_mps_reader::acc_remaining |
This indicates the amount of data still to be gathered in the accumulator. It is only used in producing mode. Must be at most acc_len - acc_available.
| union { ... } mbedtls_mps_reader::acc_share |
| mbedtls_mps_stored_size_t mbedtls_mps_reader::commit |
The offset of the last commit, relative to the first byte in the fragment, if no accumulator is present. If an accumulator is present, it is viewed as a prefix to the current fragment, and this variable contains an offset from the beginning of the accumulator.
This is only used when the reader is in consuming mode, i.e. frag != NULL; otherwise, its value is 0.
| mbedtls_mps_stored_size_t mbedtls_mps_reader::end |
The offset of the end of the last chunk passed to the user through a call to mbedtls_mps_reader_get(), relative to the first byte in the fragment, if no accumulator is present. If an accumulator is present, it is viewed as a prefix to the current fragment, and this variable contains an offset from the beginning of the accumulator.
This is only used when the reader is in consuming mode, i.e. frag != NULL; otherwise, its value is 0.
| unsigned char* mbedtls_mps_reader::frag |
The fragment of incoming data managed by the reader; it is provided to the reader through mbedtls_mps_reader_feed(). The reader does not own the fragment and does not perform any allocation operations on it, but does have read and write access to it.
The reader is in consuming mode if and only if frag is not NULL.
| mbedtls_mps_stored_size_t mbedtls_mps_reader::frag_len |
The length of the current fragment. Must be 0 if frag == NULL.
| mbedtls_mps_stored_size_t mbedtls_mps_reader::frag_offset |
If an accumulator is present and in use, this field indicates the offset of the current fragment from the beginning of the accumulator. If no accumulator is present or the accumulator is not in use, this is 0. It is only used in consuming mode. Must not be larger than acc_available.
| mbedtls_mps_stored_size_t mbedtls_mps_reader::pending |
The amount of incoming data missing on the last call to mbedtls_mps_reader_get(). In particular, it is 0 if the last call was successful. If a reader is reclaimed after an unsuccessful call to mbedtls_mps_reader_get(), this variable is used to have the reader remember how much data should be accumulated so that the call to mbedtls_mps_reader_get() succeeds next time. This is only used when the reader is in consuming mode, i.e. frag != NULL; otherwise, its value is 0.