Lines Matching full:bytes
32 /* Reverse the bytes in a 16-bit value */
37 /* Reverse the bytes in a 32-bit value */
49 /* Reverse the bytes in a 64-bit value */
226 #define htol16_ua_store(val, bytes) ({ \ argument
228 uint8 *_bytes = (uint8 *)(bytes); \
233 #define htol32_ua_store(val, bytes) ({ \ argument
235 uint8 *_bytes = (uint8 *)(bytes); \
242 #define htol64_ua_store(val, bytes) ({ \ argument
244 uint8 *_bytes = (uint8 *)(bytes); \
252 #define hton16_ua_store(val, bytes) ({ \ argument
254 uint8 *_bytes = (uint8 *)(bytes); \
259 #define hton32_ua_store(val, bytes) ({ \ argument
261 uint8 *_bytes = (uint8 *)(bytes); \
268 #define ltoh16_ua(bytes) ({ \ argument
269 const uint8 *_bytes = (const uint8 *)(bytes); \
273 #define ltoh32_ua(bytes) ({ \ argument
274 const uint8 *_bytes = (const uint8 *)(bytes); \
278 #define ltoh64_ua(bytes) ({ \ argument
279 const uint8 *_bytes = (const uint8 *)(bytes); \
283 #define ntoh16_ua(bytes) ({ \ argument
284 const uint8 *_bytes = (const uint8 *)(bytes); \
288 #define ntoh32_ua(bytes) ({ \ argument
289 const uint8 *_bytes = (const uint8 *)(bytes); \
293 #define ntoh64_ua(bytes) ({ \ argument
294 const uint8 *_bytes = (const uint8 *)(bytes); \
325 /* Reverse pairs of bytes in a buffer (not for high-performance use) */
343 htol16_ua_store(uint16 val, uint8 *bytes) in htol16_ua_store() argument
345 bytes[0] = val & 0xff; in htol16_ua_store()
346 bytes[1] = val >> 8; in htol16_ua_store()
353 htol32_ua_store(uint32 val, uint8 *bytes) in htol32_ua_store() argument
355 bytes[0] = val & 0xff; in htol32_ua_store()
356 bytes[1] = (val >> 8) & 0xff; in htol32_ua_store()
357 bytes[2] = (val >> 16) & 0xff; in htol32_ua_store()
358 bytes[3] = val >> 24; in htol32_ua_store()
365 htol64_ua_store(uint64 val, uint8 *bytes) in htol64_ua_store() argument
369 *bytes++ = (uint8)(val & 0xff); in htol64_ua_store()
378 hton16_ua_store(uint16 val, uint8 *bytes) in hton16_ua_store() argument
380 bytes[0] = val >> 8; in hton16_ua_store()
381 bytes[1] = val & 0xff; in hton16_ua_store()
388 hton32_ua_store(uint32 val, uint8 *bytes) in hton32_ua_store() argument
390 bytes[0] = val >> 24; in hton32_ua_store()
391 bytes[1] = (val >> 16) & 0xff; in hton32_ua_store()
392 bytes[2] = (val >> 8) & 0xff; in hton32_ua_store()
393 bytes[3] = val & 0xff; in hton32_ua_store()
400 ltoh16_ua(const void *bytes) in ltoh16_ua() argument
402 return _LTOH16_UA((const uint8 *)bytes); in ltoh16_ua()
409 ltoh32_ua(const void *bytes) in ltoh32_ua() argument
411 return _LTOH32_UA((const uint8 *)bytes); in ltoh32_ua()
418 ltoh64_ua(const void *bytes) in ltoh64_ua() argument
420 return _LTOH64_UA((const uint8 *)bytes); in ltoh64_ua()
427 ntoh16_ua(const void *bytes) in ntoh16_ua() argument
429 return _NTOH16_UA((const uint8 *)bytes); in ntoh16_ua()
436 ntoh32_ua(const void *bytes) in ntoh32_ua() argument
438 return _NTOH32_UA((const uint8 *)bytes); in ntoh32_ua()
445 ntoh64_ua(const void *bytes) in ntoh64_ua() argument
447 return _NTOH64_UA((const uint8 *)bytes); in ntoh64_ua()