| 318 | */ |
| 319 | |
| 320 | void |
| 321 | le_uuid_enc(void *buf, struct uuid const *uuid) |
| 322 | { |
| 323 | u_char *p; |
| 324 | int i; |
| 325 | |
| 326 | p = buf; |
| 327 | le32enc(p, uuid->time_low); |
| 328 | le16enc(p + 4, uuid->time_mid); |
| 329 | le16enc(p + 6, uuid->time_hi_and_version); |
| 330 | p[8] = uuid->clock_seq_hi_and_reserved; |
| 331 | p[9] = uuid->clock_seq_low; |
| 332 | for (i = 0; i < _UUID_NODE_LEN; i++) |
| 333 | p[10 + i] = uuid->node[i]; |
| 334 | } |
| 335 | |
| 336 | void |
| 337 | le_uuid_dec(void const *buf, struct uuid *uuid) |