Lines Matching full:bytes

40 /* Reverse the bytes in a 16-bit value */
45 /* Reverse the bytes in a 32-bit value */
57 /* Reverse the bytes in a 64-bit value */
193 #define htol16_ua_store(val, bytes) ({ \ argument
195 uint8 *_bytes = (uint8 *)(bytes); \
200 #define htol32_ua_store(val, bytes) ({ \ argument
202 uint8 *_bytes = (uint8 *)(bytes); \
209 #define htol64_ua_store(val, bytes) ({ \ argument
211 uint8 *_bytes = (uint8 *)(bytes); \
219 #define hton16_ua_store(val, bytes) ({ \ argument
221 uint8 *_bytes = (uint8 *)(bytes); \
226 #define hton32_ua_store(val, bytes) ({ \ argument
228 uint8 *_bytes = (uint8 *)(bytes); \
235 #define ltoh16_ua(bytes) ({ \ argument
236 const uint8 *_bytes = (const uint8 *)(bytes); \
240 #define ltoh32_ua(bytes) ({ \ argument
241 const uint8 *_bytes = (const uint8 *)(bytes); \
245 #define ltoh64_ua(bytes) ({ \ argument
246 const uint8 *_bytes = (const uint8 *)(bytes); \
250 #define ntoh16_ua(bytes) ({ \ argument
251 const uint8 *_bytes = (const uint8 *)(bytes); \
255 #define ntoh32_ua(bytes) ({ \ argument
256 const uint8 *_bytes = (const uint8 *)(bytes); \
260 #define ntoh64_ua(bytes) ({ \ argument
261 const uint8 *_bytes = (const uint8 *)(bytes); \
292 /* Reverse pairs of bytes in a buffer (not for high-performance use) */
310 htol16_ua_store(uint16 val, uint8 *bytes) in htol16_ua_store() argument
312 bytes[0] = val & 0xff; in htol16_ua_store()
313 bytes[1] = val >> 8; in htol16_ua_store()
320 htol32_ua_store(uint32 val, uint8 *bytes) in htol32_ua_store() argument
322 bytes[0] = val & 0xff; in htol32_ua_store()
323 bytes[1] = (val >> 8) & 0xff; in htol32_ua_store()
324 bytes[2] = (val >> 16) & 0xff; in htol32_ua_store()
325 bytes[3] = val >> 24; in htol32_ua_store()
332 htol64_ua_store(uint64 val, uint8 *bytes) in htol64_ua_store() argument
336 *bytes++ = (uint8)(val & 0xff); in htol64_ua_store()
345 hton16_ua_store(uint16 val, uint8 *bytes) in hton16_ua_store() argument
347 bytes[0] = val >> 8; in hton16_ua_store()
348 bytes[1] = val & 0xff; in hton16_ua_store()
355 hton32_ua_store(uint32 val, uint8 *bytes) in hton32_ua_store() argument
357 bytes[0] = val >> 24; in hton32_ua_store()
358 bytes[1] = (val >> 16) & 0xff; in hton32_ua_store()
359 bytes[2] = (val >> 8) & 0xff; in hton32_ua_store()
360 bytes[3] = val & 0xff; in hton32_ua_store()
367 ltoh16_ua(const void *bytes) in ltoh16_ua() argument
369 return _LTOH16_UA((const uint8 *)bytes); in ltoh16_ua()
376 ltoh32_ua(const void *bytes) in ltoh32_ua() argument
378 return _LTOH32_UA((const uint8 *)bytes); in ltoh32_ua()
385 ltoh64_ua(const void *bytes) in ltoh64_ua() argument
387 return _LTOH64_UA((const uint8 *)bytes); in ltoh64_ua()
394 ntoh16_ua(const void *bytes) in ntoh16_ua() argument
396 return _NTOH16_UA((const uint8 *)bytes); in ntoh16_ua()
403 ntoh32_ua(const void *bytes) in ntoh32_ua() argument
405 return _NTOH32_UA((const uint8 *)bytes); in ntoh32_ua()
412 ntoh64_ua(const void *bytes) in ntoh64_ua() argument
414 return _NTOH64_UA((const uint8 *)bytes); in ntoh64_ua()