packets.h 466 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * packets.h
  3. *
  4. * Created on: Nov 7, 2017
  5. * Author: anay
  6. */
  7. #ifndef PACKETS_H_
  8. #define PACKETS_H_
  9. #include <arpa/inet.h>
  10. #include <stdlib.h>
  11. #include <stdint.h>
  12. typedef std::bitset<7> check;
  13. typedef std::bitset<5> check2;
  14. struct LH {
  15. bool lh;
  16. check type;
  17. int64_t CID;
  18. int32_t PN;
  19. int32_t version;
  20. };
  21. struct SH {
  22. bool lh;
  23. bool C;
  24. bool K;
  25. check2 type;
  26. int64_t CID;
  27. int32_t PN;
  28. };
  29. #endif /* PACKETS_H_ */