#pragma once /** * @brief Cartallum CBE return data system calls **/ #include #include #ifdef __cplusplus extern "C" { #endif /** * Maximum size of return data */ #define MAX_RETURN_DATA 1024 /** * Set the return data * * @param bytes byte array to set * @param bytes_len length of byte array. This may not exceed MAX_RETURN_DATA. */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE sdk/bpf/c/inc/cbe/inc/return_data.inc AND RUN `cargo run --bin gen-headers` */ #ifndef CBE_SBFV2 void cbe_set_return_data(const uint8_t *, uint64_t); #else typedef void(*cbe_set_return_data_pointer_type)(const uint8_t *, uint64_t); static void cbe_set_return_data(const uint8_t * arg1, uint64_t arg2) { cbe_set_return_data_pointer_type cbe_set_return_data_pointer = (cbe_set_return_data_pointer_type) 2720453611; cbe_set_return_data_pointer(arg1, arg2); } #endif /** * Get the return data * * @param bytes byte buffer * @param bytes_len maximum length of buffer * @param program_id the program_id which set the return data. Only set if there was some return data (the function returns non-zero). * @param result length of return data (may exceed bytes_len if the return data is longer) */ /* DO NOT MODIFY THIS GENERATED FILE. INSTEAD CHANGE sdk/bpf/c/inc/cbe/inc/return_data.inc AND RUN `cargo run --bin gen-headers` */ #ifndef CBE_SBFV2 uint64_t cbe_get_return_data(uint8_t *, uint64_t, CBEPubkey *); #else typedef uint64_t(*cbe_get_return_data_pointer_type)(uint8_t *, uint64_t, CBEPubkey *); static uint64_t cbe_get_return_data(uint8_t * arg1, uint64_t arg2, CBEPubkey * arg3) { cbe_get_return_data_pointer_type cbe_get_return_data_pointer = (cbe_get_return_data_pointer_type) 1562527204; return cbe_get_return_data_pointer(arg1, arg2, arg3); } #endif #ifdef __cplusplus } #endif /**@}*/