mashhur
Member level 5
could somebody pls tell me how to convert double precision into network byte ordering. i tried
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);
functions and they worked well but no of them does double (float) conversion cuz these types are apart different on every architecture. And through the XDR i found double-float precision format representations(https://en.wikipedia.org/wiki/Double_precision) but no byte ordering there.
So, i would much appreciate if somebody helps me out on this (C code would be great!). NOTE: OS is Linux kernel (2.6.29), ARMv7 CPU architecture.
thanks!
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);
functions and they worked well but no of them does double (float) conversion cuz these types are apart different on every architecture. And through the XDR i found double-float precision format representations(https://en.wikipedia.org/wiki/Double_precision) but no byte ordering there.
So, i would much appreciate if somebody helps me out on this (C code would be great!). NOTE: OS is Linux kernel (2.6.29), ARMv7 CPU architecture.
thanks!