XenevaOS
Loading...
Searching...
No Matches
mps_error.h File Reference

Error codes used by MPS. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

SECTION: MPS general error codes
#define MBEDTLS_MPS_ERR_BASE   (0)
 
#define MBEDTLS_MPS_MAKE_ERROR(code)    (-(MBEDTLS_MPS_ERR_BASE | (code)))
 
#define MBEDTLS_ERR_MPS_OPERATION_UNEXPECTED   MBEDTLS_MPS_MAKE_ERROR(0x1)
 
#define MBEDTLS_ERR_MPS_INTERNAL_ERROR   MBEDTLS_MPS_MAKE_ERROR(0x2)
 
SECTION: MPS Reader error codes
#define MBEDTLS_MPS_READER_ERR_BASE   (1 << 8)
 
#define MBEDTLS_MPS_READER_MAKE_ERROR(code)    (-(MBEDTLS_MPS_READER_ERR_BASE | (code)))
 
#define MBEDTLS_ERR_MPS_READER_DATA_LEFT   MBEDTLS_MPS_READER_MAKE_ERROR(0x1)
 
#define MBEDTLS_ERR_MPS_READER_INVALID_ARG   MBEDTLS_MPS_READER_MAKE_ERROR(0x2)
 
#define MBEDTLS_ERR_MPS_READER_NEED_MORE   MBEDTLS_MPS_READER_MAKE_ERROR(0x3)
 
#define MBEDTLS_ERR_MPS_READER_OUT_OF_DATA   MBEDTLS_MPS_READER_MAKE_ERROR(0x4)
 
#define MBEDTLS_ERR_MPS_READER_INCONSISTENT_REQUESTS   MBEDTLS_MPS_READER_MAKE_ERROR(0x5)
 
#define MBEDTLS_ERR_MPS_READER_NEED_ACCUMULATOR   MBEDTLS_MPS_READER_MAKE_ERROR(0x6)
 
#define MBEDTLS_ERR_MPS_READER_ACCUMULATOR_TOO_SMALL   MBEDTLS_MPS_READER_MAKE_ERROR(0x7)
 

Detailed Description

Error codes used by MPS.

Macro Definition Documentation

◆ MBEDTLS_ERR_MPS_INTERNAL_ERROR

#define MBEDTLS_ERR_MPS_INTERNAL_ERROR   MBEDTLS_MPS_MAKE_ERROR(0x2)

◆ MBEDTLS_ERR_MPS_OPERATION_UNEXPECTED

#define MBEDTLS_ERR_MPS_OPERATION_UNEXPECTED   MBEDTLS_MPS_MAKE_ERROR(0x1)

◆ MBEDTLS_ERR_MPS_READER_ACCUMULATOR_TOO_SMALL

#define MBEDTLS_ERR_MPS_READER_ACCUMULATOR_TOO_SMALL   MBEDTLS_MPS_READER_MAKE_ERROR(0x7)

An attempt to reclaim the data buffer from a reader failed because the accumulator passed to the reader is not large enough to hold both the data that hasn't been processed and the excess of the last read-request.

◆ MBEDTLS_ERR_MPS_READER_DATA_LEFT

#define MBEDTLS_ERR_MPS_READER_DATA_LEFT   MBEDTLS_MPS_READER_MAKE_ERROR(0x1)

An attempt to reclaim the data buffer from a reader failed because the user hasn't yet read and committed all of it.

◆ MBEDTLS_ERR_MPS_READER_INCONSISTENT_REQUESTS

#define MBEDTLS_ERR_MPS_READER_INCONSISTENT_REQUESTS   MBEDTLS_MPS_READER_MAKE_ERROR(0x5)

◆ MBEDTLS_ERR_MPS_READER_INVALID_ARG

#define MBEDTLS_ERR_MPS_READER_INVALID_ARG   MBEDTLS_MPS_READER_MAKE_ERROR(0x2)

An invalid argument was passed to the reader.

◆ MBEDTLS_ERR_MPS_READER_NEED_ACCUMULATOR

#define MBEDTLS_ERR_MPS_READER_NEED_ACCUMULATOR   MBEDTLS_MPS_READER_MAKE_ERROR(0x6)

An attempt to reclaim the data buffer from a reader failed because the reader has no accumulator it can use to backup the data that hasn't been processed.

◆ MBEDTLS_ERR_MPS_READER_NEED_MORE

#define MBEDTLS_ERR_MPS_READER_NEED_MORE   MBEDTLS_MPS_READER_MAKE_ERROR(0x3)

An attempt to move a reader to consuming mode through mbedtls_mps_reader_feed() after pausing failed because the provided data is not sufficient to serve the read requests that led to the pausing.

◆ MBEDTLS_ERR_MPS_READER_OUT_OF_DATA

#define MBEDTLS_ERR_MPS_READER_OUT_OF_DATA   MBEDTLS_MPS_READER_MAKE_ERROR(0x4)

A get request failed because not enough data is available in the reader. A get request after pausing and reactivating the reader failed because the request is not in line with the request made prior to pausing. The user must not change it's 'strategy' after pausing and reactivating a reader.

◆ MBEDTLS_MPS_ERR_BASE

#define MBEDTLS_MPS_ERR_BASE   (0)

◆ MBEDTLS_MPS_MAKE_ERROR

#define MBEDTLS_MPS_MAKE_ERROR (   code)     (-(MBEDTLS_MPS_ERR_BASE | (code)))

◆ MBEDTLS_MPS_READER_ERR_BASE

#define MBEDTLS_MPS_READER_ERR_BASE   (1 << 8)

◆ MBEDTLS_MPS_READER_MAKE_ERROR

#define MBEDTLS_MPS_READER_MAKE_ERROR (   code)     (-(MBEDTLS_MPS_READER_ERR_BASE | (code)))