iterator.h 768 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * ZMap Copyright 2013 Regents of the University of Michigan
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy
  6. * of the License at http://www.apache.org/licenses/LICENSE-2.0
  7. */
  8. #ifndef ZMAP_ITERATOR_H
  9. #define ZMAP_ITERATOR_H
  10. #include <stdint.h>
  11. #include "../lib/includes.h"
  12. #include "aesrand.h"
  13. #include "cyclic.h"
  14. #include "shard.h"
  15. typedef struct iterator iterator_t;
  16. iterator_t* iterator_init(uint8_t num_threads, uint8_t shard,
  17. uint8_t num_shards);
  18. uint32_t iterator_get_sent(iterator_t *it);
  19. uint32_t iterator_get_curr_send_threads(iterator_t *it);
  20. shard_t* get_shard(iterator_t *it, uint8_t thread_id);
  21. #endif /* ZMAP_ITERATOR_H */