2 * Internal routine for packing UUID's
4 * Copyright (C) 1996, 1997 Theodore Ts'o.
7 * This file may be redistributed under the terms of the GNU Public
15 void uuid_pack(struct uuid *uu, uuid_t ptr)
18 unsigned char *out = ptr;
21 out[3] = (unsigned char) tmp;
23 out[2] = (unsigned char) tmp;
25 out[1] = (unsigned char) tmp;
27 out[0] = (unsigned char) tmp;
30 out[5] = (unsigned char) tmp;
32 out[4] = (unsigned char) tmp;
34 tmp = uu->time_hi_and_version;
35 out[7] = (unsigned char) tmp;
37 out[6] = (unsigned char) tmp;
40 out[9] = (unsigned char) tmp;
42 out[8] = (unsigned char) tmp;
44 memcpy(out+10, uu->node, 6);