Home | History | Annotate | Download | only in include

Lines Matching full:bytes

29 /* Reverse the bytes in a 16-bit value */
34 /* Reverse the bytes in a 32-bit value */
125 #define htol16_ua_store(val, bytes) ({ \
127 uint8 *_bytes = (uint8 *)(bytes); \
132 #define htol32_ua_store(val, bytes) ({ \
134 uint8 *_bytes = (uint8 *)(bytes); \
141 #define hton16_ua_store(val, bytes) ({ \
143 uint8 *_bytes = (uint8 *)(bytes); \
148 #define hton32_ua_store(val, bytes) ({ \
150 uint8 *_bytes = (uint8 *)(bytes); \
157 #define ltoh16_ua(bytes) ({ \
158 const uint8 *_bytes = (const uint8 *)(bytes); \
162 #define ltoh32_ua(bytes) ({ \
163 const uint8 *_bytes = (const uint8 *)(bytes); \
167 #define ntoh16_ua(bytes) ({ \
168 const uint8 *_bytes = (const uint8 *)(bytes); \
172 #define ntoh32_ua(bytes) ({ \
173 const uint8 *_bytes = (const uint8 *)(bytes); \
198 /* Reverse pairs of bytes in a buffer (not for high-performance use) */
216 htol16_ua_store(uint16 val, uint8 *bytes)
218 bytes[0] = val & 0xff;
219 bytes[1] = val >> 8;
226 htol32_ua_store(uint32 val, uint8 *bytes)
228 bytes[0] = val & 0xff;
229 bytes[1] = (val >> 8) & 0xff;
230 bytes[2] = (val >> 16) & 0xff;
231 bytes[3] = val >> 24;
238 hton16_ua_store(uint16 val, uint8 *bytes)
240 bytes[0] = val >> 8;
241 bytes[1] = val & 0xff;
248 hton32_ua_store(uint32 val, uint8 *bytes)
250 bytes[0] = val >> 24;
251 bytes[1] = (val >> 16) & 0xff;
252 bytes[2] = (val >> 8) & 0xff;
253 bytes[3] = val & 0xff;
260 ltoh16_ua(const void *bytes)
262 return _LTOH16_UA((const uint8 *)bytes);
269 ltoh32_ua(const void *bytes)
271 return _LTOH32_UA((const uint8 *)bytes);
278 ntoh16_ua(const void *bytes)
280 return _NTOH16_UA((const uint8 *)bytes);
287 ntoh32_ua(const void *bytes)
289 return _NTOH32_UA((const uint8 *)bytes);