Commit 7e1febce authored by matzakos's avatar matzakos

Change the order of sequence of bytes in IP conversion functions used in F1AP

-Now IP address appears correctly in wireshark
parent 7cde9f7a
......@@ -400,10 +400,10 @@ do { \
#define TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(mACRO, bITsTRING) \
do { \
(bITsTRING)->buf = calloc(4, sizeof(uint8_t)); \
(bITsTRING)->buf[0] = (mACRO) >> 24 & 0xFF; \
(bITsTRING)->buf[1] = (mACRO) >> 16 & 0xFF; \
(bITsTRING)->buf[2] = (mACRO) >> 8 & 0xFF; \
(bITsTRING)->buf[3] = (mACRO) & 0xFF; \
(bITsTRING)->buf[3] = (mACRO) >> 24 & 0xFF; \
(bITsTRING)->buf[2] = (mACRO) >> 16 & 0xFF; \
(bITsTRING)->buf[1] = (mACRO) >> 8 & 0xFF; \
(bITsTRING)->buf[0] = (mACRO) & 0xFF; \
(bITsTRING)->size = 4; \
(bITsTRING)->bits_unused = 0; \
} while(0)
......@@ -412,10 +412,10 @@ do { \
do { \
DevCheck((bITsTRING)->size == 4, (bITsTRING)->size, 4, 0); \
DevCheck((bITsTRING)->bits_unused == 0, (bITsTRING)->bits_unused, 0, 0); \
mACRO = ((bITsTRING)->buf[0] << 24) + \
((bITsTRING)->buf[1] << 16) + \
((bITsTRING)->buf[2] << 8) + \
((bITsTRING)->buf[3]); \
mACRO = ((bITsTRING)->buf[3] << 24) + \
((bITsTRING)->buf[2] << 16) + \
((bITsTRING)->buf[1] << 8) + \
((bITsTRING)->buf[0]); \
} while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment