Create macro to do ntoh for 3 bytes

use it in NSSAI parsing function
This commit is contained in:
Sakthivel Velumani
2023-11-01 21:13:20 -04:00
parent dc95e838eb
commit 21b269fa99
2 changed files with 8 additions and 4 deletions
+3
View File
@@ -41,6 +41,9 @@
# define hton_int16(x) (x)
#endif
#define ntoh_int24_buf(bUF) \
((*bUF << 16) | ((*(bUF + 1)) << 8) | (*(bUF + 2)))
#define IN_ADDR_TO_BUFFER(X,bUFF) INT32_TO_BUFFER((X).s_addr,(char*)bUFF)
#define IN6_ADDR_TO_BUFFER(X,bUFF) \