aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/protocols/rtc/rtc_packet.h
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2021-04-30 12:26:57 +0200
committerAngelo Mantellini <angelo.mantellini@cisco.com>2021-04-30 14:54:00 +0200
commit07133ac060c2af721941f7b47c52c075df3168ba (patch)
treea3a618442fc9f1adb5f1cf2e3d442c70fd787d2b /libtransport/src/protocols/rtc/rtc_packet.h
parent39e15ebb3805efb6c71a1dd16f18061cd86487cf (diff)
[HICN-703] Update windows-sdk and hicn code
Signed-off-by: Angelo Mantellini <@ngelo.mantellini@cisco.com> Change-Id: I05e4c92ce7de3640f0272afae127e1377862bd3e Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com>
Diffstat (limited to 'libtransport/src/protocols/rtc/rtc_packet.h')
-rw-r--r--libtransport/src/protocols/rtc/rtc_packet.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/libtransport/src/protocols/rtc/rtc_packet.h b/libtransport/src/protocols/rtc/rtc_packet.h
index abb1323a3..2f2b19fb9 100644
--- a/libtransport/src/protocols/rtc/rtc_packet.h
+++ b/libtransport/src/protocols/rtc/rtc_packet.h
@@ -25,7 +25,11 @@
*/
#pragma once
+#ifndef _WIN32
#include <arpa/inet.h>
+#else
+#include <hicn/transport/portability/win_portability.h>
+#endif
namespace transport {
@@ -37,14 +41,14 @@ inline uint64_t _ntohll(const uint64_t *input) {
uint64_t return_val;
uint8_t *tmp = (uint8_t *)&return_val;
- tmp[0] = *input >> 56;
- tmp[1] = *input >> 48;
- tmp[2] = *input >> 40;
- tmp[3] = *input >> 32;
- tmp[4] = *input >> 24;
- tmp[5] = *input >> 16;
- tmp[6] = *input >> 8;
- tmp[7] = *input >> 0;
+ tmp[0] = (uint8_t)(*input >> 56);
+ tmp[1] = (uint8_t)(*input >> 48);
+ tmp[2] = (uint8_t)(*input >> 40);
+ tmp[3] = (uint8_t)(*input >> 32);
+ tmp[4] = (uint8_t)(*input >> 24);
+ tmp[5] = (uint8_t)(*input >> 16);
+ tmp[6] = (uint8_t)(*input >> 8);
+ tmp[7] = (uint8_t)(*input >> 0);
return return_val;
}
@@ -86,4 +90,4 @@ struct nack_packet_t {
} // end namespace protocol
-} // end namespace transport
+} // end namespace transport \ No newline at end of file