#ifndef CIRCE_CORE_H #define CIRCE_CORE_H #include enum circe_result { CIRCE_RESULT_SUCCESS = 0, CIRCE_RESULT_INSUFFICIENT_MEM, CIRCE_RESULT_INVALID_PACKET, }; struct circe_ctx { }; struct circe_event { }; /// Process a new raw Circe packet. enum circe_result circe_handle_packet (struct circe_ctx *ctx, const uint8_t *in, uint32_t len, uint64_t now_ms, uint8_t *out, uint32_t *out_len, struct circe_event *events, uint32_t *n_events); /// Get millisecond timestamp for next timer deadline (at which point /// `circe_tick` should be called). uint64_t circe_next_deadline (const struct circe_ctx *ctx); /// Iterate the Circe core logic. Assumes `now_ms` increases monotonically with /// time. enum circe_result circe_tick (struct circe_ctx *ctx, uint64_t now_ms, uint8_t *out, uint32_t *out_len); #endif