ingest.hpp 804 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __INGEST_HPP__
  2. #define __INGEST_HPP__
  3. struct ClientList {
  4. uint32_t num;
  5. uint32_t start;
  6. uint32_t end;
  7. sgx_aes_gcm_128bit_key_t *keys;
  8. };
  9. class Ingestion{
  10. private:
  11. ClientList clients;
  12. MsgBuffer buffer;
  13. uint32_t max_buffer_size;
  14. public:
  15. Ingestion() {
  16. }
  17. void generateClientKeys(sgx_aes_gcm_128bit_key_t &ESK);
  18. void initialize(uint32_t cnum, uint32_t cstart, sgx_aes_gcm_128bit_key_t &ESK);
  19. uint32_t getClientNum() {
  20. return (clients.num);
  21. }
  22. uint32_t getClientStart() {
  23. return (clients.start);
  24. }
  25. sgx_aes_gcm_128bit_key_t* getClientKeys() {
  26. return (clients.keys);
  27. }
  28. bool processMsgBundle(clientid_t cid, unsigned char *msgbundle,
  29. uint32_t num_msgs);
  30. };
  31. extern Ingestion g_ing;
  32. #endif