fork download
  1. #include <iostream>
  2. #include <netinet/in.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. uint16_t uVar1;
  8. uint16_t uVar2;
  9. uint32_t local_6c;
  10. uint32_t local_68;
  11. uint local_64;
  12. uint32_t local_60;
  13. uint32_t local_5c;
  14.  
  15. uVar1 = ntohs(0xffff); //first 2 bytes
  16. uVar2 = ntohs(0xffff); //next 2 bytes
  17. local_6c = ntohl(0x44440000); //next 4 bytes
  18. local_68 = ntohl(0x4444ffff); //next 4 bytes
  19. local_64 = local_68 & 0xffff | (uint)(uVar2 ^ uVar1) << 0x10;
  20.  
  21. local_60 = ntohl(0xffffffff);
  22. local_5c = ntohl(0x12341234);
  23.  
  24. cout << local_6c << endl;
  25. cout << local_64 << endl;
  26.  
  27. cout << "------" << endl;
  28.  
  29. cout << local_68 << endl;
  30. cout << local_60 << endl;
  31.  
  32.  
  33. return 0;
  34. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
17476
17476
------
4294919236
4294967295