Kannel: Open Source WAP and SMS gateway  $Revision: 5037 $
gw_uuid.c File Reference
#include "gw-config.h"
#include <string.h>
#include <ctype.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <stdio.h>
#include "gwlib/gw_uuid_types.h"
#include "gwlib/gw_uuid.h"

Go to the source code of this file.

Data Structures

struct  uuid
 

Macros

#define _SVID_SOURCE
 
#define TIME_OFFSET_HIGH   0x01B21DD2
 
#define TIME_OFFSET_LOW   0x13814000
 
#define UUCMP(u1, u2)   if (u1 != u2) return((u1 < u2) ? -1 : 1);
 
#define MAX_ADJUSTMENT   10
 

Functions

static void uuid_pack (const struct uuid *uu, uuid_t ptr)
 
static void uuid_unpack (const uuid_t in, struct uuid *uu)
 
static int get_random_fd (void)
 
void uuid_init (void)
 
void uuid_shutdown (void)
 
void uuid_clear (uuid_t uu)
 
int uuid_compare (const uuid_t uu1, const uuid_t uu2)
 
void uuid_copy (uuid_t dst, const uuid_t src)
 
static void get_random_bytes (void *buf, int nbytes)
 
static int get_node_id (unsigned char *node_id)
 
static int get_clock (__u32 *clock_high, __u32 *clock_low, __u16 *ret_clock_seq)
 
void uuid_generate_time (uuid_t out)
 
void uuid_generate_random (uuid_t out)
 
void uuid_generate (uuid_t out)
 
int uuid_is_null (const uuid_t uu)
 
int uuid_parse (const char *in, uuid_t uu)
 
void uuid_unparse (const uuid_t uu, char *out)
 
time_t uuid_time (const uuid_t uu, struct timeval *ret_tv)
 
int uuid_type (const uuid_t uu)
 
int uuid_variant (const uuid_t uu)
 

Macro Definition Documentation

#define _SVID_SOURCE

Definition at line 17 of file gw_uuid.c.

#define MAX_ADJUSTMENT   10

Definition at line 302 of file gw_uuid.c.

Referenced by get_clock().

#define TIME_OFFSET_HIGH   0x01B21DD2

Definition at line 59 of file gw_uuid.c.

#define TIME_OFFSET_LOW   0x13814000

Definition at line 60 of file gw_uuid.c.

#define UUCMP (   u1,
  u2 
)    if (u1 != u2) return((u1 < u2) ? -1 : 1);

Definition at line 124 of file gw_uuid.c.

Referenced by uuid_compare().

Function Documentation

static int get_clock ( __u32 *  clock_high,
__u32 *  clock_low,
__u16 *  ret_clock_seq 
)
static

Definition at line 304 of file gw_uuid.c.

References get_random_bytes(), and MAX_ADJUSTMENT.

Referenced by uuid_generate_time().

305 {
306  static int adjustment = 0;
307  static struct timeval last = {0, 0};
308  static __u16 clock_seq;
309  struct timeval tv;
310  unsigned long long clock_reg;
311 
312 try_again:
313  gettimeofday(&tv, 0);
314  if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
315  get_random_bytes(&clock_seq, sizeof(clock_seq));
316  clock_seq &= 0x1FFF;
317  last = tv;
318  last.tv_sec--;
319  }
320  if ((tv.tv_sec < last.tv_sec) ||
321  ((tv.tv_sec == last.tv_sec) &&
322  (tv.tv_usec < last.tv_usec))) {
323  clock_seq = (clock_seq+1) & 0x1FFF;
324  adjustment = 0;
325  last = tv;
326  } else if ((tv.tv_sec == last.tv_sec) &&
327  (tv.tv_usec == last.tv_usec)) {
328  if (adjustment >= MAX_ADJUSTMENT)
329  goto try_again;
330  adjustment++;
331  } else {
332  adjustment = 0;
333  last = tv;
334  }
335 
336  clock_reg = tv.tv_usec*10 + adjustment;
337  clock_reg += ((unsigned long long) tv.tv_sec)*10000000;
338  clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
339 
340  *clock_high = clock_reg >> 32;
341  *clock_low = clock_reg;
342  *ret_clock_seq = clock_seq;
343  return 0;
344 }
#define MAX_ADJUSTMENT
Definition: gw_uuid.c:302
static void get_random_bytes(void *buf, int nbytes)
Definition: gw_uuid.c:197
static int get_node_id ( unsigned char *  node_id)
static

Definition at line 229 of file gw_uuid.c.

Referenced by uuid_generate_time().

230 {
231 #ifdef HAVE_NET_IF_H
232  int sd;
233  struct ifreq ifr, *ifrp;
234  struct ifconf ifc;
235  char buf[1024];
236  int n, i;
237  unsigned char *a;
238 
239 /*
240  * BSD 4.4 defines the size of an ifreq to be
241  * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len
242  * However, under earlier systems, sa_len isn't present, so the size is
243  * just sizeof(struct ifreq)
244  */
245 #ifdef HAVE_SA_LEN
246 #ifndef max
247 #define max(a,b) ((a) > (b) ? (a) : (b))
248 #endif
249 #define ifreq_size(i) max(sizeof(struct ifreq),\
250  sizeof((i).ifr_name)+(i).ifr_addr.sa_len)
251 #else
252 #define ifreq_size(i) sizeof(struct ifreq)
253 #endif /* HAVE_SA_LEN*/
254 
255  sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
256  if (sd < 0) {
257  return -1;
258  }
259  memset(buf, 0, sizeof(buf));
260  ifc.ifc_len = sizeof(buf);
261  ifc.ifc_buf = buf;
262  if (ioctl (sd, SIOCGIFCONF, (char *)&ifc) < 0) {
263  close(sd);
264  return -1;
265  }
266  n = ifc.ifc_len;
267  for (i = 0; i < n; i+= ifreq_size(*ifr) ) {
268  ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i);
269  strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ);
270 #ifdef SIOCGIFHWADDR
271  if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0)
272  continue;
273  a = (unsigned char *) &ifr.ifr_hwaddr.sa_data;
274 #else
275 #ifdef SIOCGENADDR
276  if (ioctl(sd, SIOCGENADDR, &ifr) < 0)
277  continue;
278  a = (unsigned char *) ifr.ifr_enaddr;
279 #else
280  /*
281  * XXX we don't have a way of getting the hardware
282  * address
283  */
284  close(sd);
285  return 0;
286 #endif /* SIOCGENADDR */
287 #endif /* SIOCGIFHWADDR */
288  if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5])
289  continue;
290  if (node_id) {
291  memcpy(node_id, a, 6);
292  close(sd);
293  return 1;
294  }
295  }
296  close(sd);
297 #endif
298  return 0;
299 }
static void get_random_bytes ( void *  buf,
int  nbytes 
)
static

Definition at line 197 of file gw_uuid.c.

References get_random_fd(), and rand.

Referenced by get_clock(), uuid_generate_random(), and uuid_generate_time().

198 {
199  int i, n = nbytes, fd = get_random_fd();
200  int lose_counter = 0;
201  unsigned char *cp = (unsigned char *) buf;
202 
203  if (fd >= 0) {
204  while (n > 0) {
205  i = read(fd, cp, n);
206  if (i <= 0) {
207  if (lose_counter++ > 16)
208  break;
209  continue;
210  }
211  n -= i;
212  cp += i;
213  lose_counter = 0;
214  }
215  }
216 
217  /*
218  * We do this all the time, but this is the only source of
219  * randomness if /dev/random/urandom is out to lunch.
220  */
221  for (cp = buf, i = 0; i < nbytes; i++)
222  *cp++ ^= (rand() >> 7) & 0xFF;
223  return;
224 }
static int get_random_fd(void)
Definition: gw_uuid.c:171
#define rand()
Definition: protected.h:100
static int get_random_fd ( void  )
static

Definition at line 171 of file gw_uuid.c.

References rand.

Referenced by get_random_bytes(), uuid_generate(), uuid_init(), and uuid_shutdown().

172 {
173  struct timeval tv;
174  static int fd = -2;
175  int i;
176 
177  if (fd == -2) {
178  gettimeofday(&tv, 0);
179  fd = open("/dev/urandom", O_RDONLY);
180  if (fd == -1)
181  fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
182  srand((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
183  }
184  /* Crank the random number generator a few times */
185  gettimeofday(&tv, 0);
186  for (i = (tv.tv_sec ^ tv.tv_usec) & 0x1F; i > 0; i--)
187  rand();
188 
189  return fd;
190 }
#define rand()
Definition: protected.h:100
void uuid_clear ( uuid_t  uu)

Definition at line 105 of file gw_uuid.c.

Referenced by main(), and msg_cb().

106 {
107  memset(uu, 0, 16);
108 }
int uuid_compare ( const uuid_t  uu1,
const uuid_t  uu2 
)

Definition at line 126 of file gw_uuid.c.

References uuid::clock_seq, uuid::node, uuid::time_hi_and_version, uuid::time_low, uuid::time_mid, UUCMP, and uuid_unpack().

127 {
128  struct uuid uuid1, uuid2;
129 
130  uuid_unpack(uu1, &uuid1);
131  uuid_unpack(uu2, &uuid2);
132 
133  UUCMP(uuid1.time_low, uuid2.time_low);
134  UUCMP(uuid1.time_mid, uuid2.time_mid);
135  UUCMP(uuid1.time_hi_and_version, uuid2.time_hi_and_version);
136  UUCMP(uuid1.clock_seq, uuid2.clock_seq);
137  return memcmp(uuid1.node, uuid2.node, 6);
138 }
static void uuid_unpack(const uuid_t in, struct uuid *uu)
Definition: gw_uuid.c:525
Definition: gw_uuid.c:62
#define UUCMP(u1, u2)
Definition: gw_uuid.c:124
void uuid_copy ( uuid_t  dst,
const uuid_t  src 
)

Definition at line 150 of file gw_uuid.c.

Referenced by boxc_receiver(), deliver_sms_to_queue(), obey_request_thread(), store_file_save_ack(), and store_spool_save_ack().

151 {
152  unsigned char *cp1;
153  const unsigned char *cp2;
154  int i;
155 
156  for (i=0, cp1 = dst, cp2 = src; i < 16; i++)
157  *cp1++ = *cp2++;
158 }
void uuid_generate ( uuid_t  out)

Definition at line 392 of file gw_uuid.c.

References get_random_fd(), uuid_generate_random(), and uuid_generate_time().

Referenced by concat_handling_check_and_handle(), main(), msg_cb(), sms_split(), soap_send_loop(), store_spool_save(), and store_to_dict().

393 {
394  if (get_random_fd() >= 0) {
396  }
397  else
398  uuid_generate_time(out);
399 }
void uuid_generate_time(uuid_t out)
Definition: gw_uuid.c:346
static int get_random_fd(void)
Definition: gw_uuid.c:171
void uuid_generate_random(uuid_t out)
Definition: gw_uuid.c:373
void uuid_generate_random ( uuid_t  out)

Definition at line 373 of file gw_uuid.c.

References uuid::clock_seq, get_random_bytes(), uuid::time_hi_and_version, uuid_pack(), and uuid_unpack().

Referenced by uuid_generate().

374 {
375  uuid_t buf;
376  struct uuid uu;
377 
378  get_random_bytes(buf, sizeof(buf));
379  uuid_unpack(buf, &uu);
380 
381  uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000;
382  uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x4000;
383  uuid_pack(&uu, out);
384 }
static void uuid_unpack(const uuid_t in, struct uuid *uu)
Definition: gw_uuid.c:525
Definition: gw_uuid.c:62
static void get_random_bytes(void *buf, int nbytes)
Definition: gw_uuid.c:197
static void uuid_pack(const struct uuid *uu, uuid_t ptr)
Definition: gw_uuid.c:433
unsigned char uuid_t[16]
Definition: gw_uuid.h:32
void uuid_generate_time ( uuid_t  out)

Definition at line 346 of file gw_uuid.c.

References uuid::clock_seq, get_clock(), get_node_id(), get_random_bytes(), uuid::node, uuid::time_hi_and_version, uuid::time_low, uuid::time_mid, and uuid_pack().

Referenced by uuid_generate().

347 {
348  static unsigned char node_id[6];
349  static int has_init = 0;
350  struct uuid uu;
351  __u32 clock_mid;
352 
353  if (!has_init) {
354  if (get_node_id(node_id) <= 0) {
355  get_random_bytes(node_id, 6);
356  /*
357  * Set multicast bit, to prevent conflicts
358  * with IEEE 802 addresses obtained from
359  * network cards
360  */
361  node_id[0] |= 0x80;
362  }
363  has_init = 1;
364  }
365  get_clock(&clock_mid, &uu.time_low, &uu.clock_seq);
366  uu.clock_seq |= 0x8000;
367  uu.time_mid = (__u16) clock_mid;
368  uu.time_hi_and_version = (clock_mid >> 16) | 0x1000;
369  memcpy(uu.node, node_id, 6);
370  uuid_pack(&uu, out);
371 }
static int get_clock(__u32 *clock_high, __u32 *clock_low, __u16 *ret_clock_seq)
Definition: gw_uuid.c:304
static int get_node_id(unsigned char *node_id)
Definition: gw_uuid.c:229
Definition: gw_uuid.c:62
static void get_random_bytes(void *buf, int nbytes)
Definition: gw_uuid.c:197
static void uuid_pack(const struct uuid *uu, uuid_t ptr)
Definition: gw_uuid.c:433
void uuid_init ( void  )

Definition at line 86 of file gw_uuid.c.

References get_random_fd().

Referenced by gwlib_init().

87 {
88  /*
89  * open random device if any.
90  * We should do it here because otherwise it's
91  * possible that we open device twice.
92  */
93  get_random_fd();
94 }
static int get_random_fd(void)
Definition: gw_uuid.c:171
int uuid_is_null ( const uuid_t  uu)

Definition at line 412 of file gw_uuid.c.

Referenced by get_pattern(), msg_cb(), soap_send_loop(), store_spool_save(), store_to_dict(), and urltrans_fill_escape_codes().

413 {
414  const unsigned char *cp;
415  int i;
416 
417  for (i=0, cp = uu; i < 16; i++)
418  if (*cp++)
419  return 0;
420  return 1;
421 }
void uuid_pack ( const struct uuid uu,
uuid_t  ptr 
)
static

Definition at line 433 of file gw_uuid.c.

References uuid::clock_seq, uuid::node, uuid::time_hi_and_version, uuid::time_low, and uuid::time_mid.

Referenced by uuid_generate_random(), uuid_generate_time(), and uuid_parse().

434 {
435  __u32 tmp;
436  unsigned char *out = ptr;
437 
438  tmp = uu->time_low;
439  out[3] = (unsigned char) tmp;
440  tmp >>= 8;
441  out[2] = (unsigned char) tmp;
442  tmp >>= 8;
443  out[1] = (unsigned char) tmp;
444  tmp >>= 8;
445  out[0] = (unsigned char) tmp;
446 
447  tmp = uu->time_mid;
448  out[5] = (unsigned char) tmp;
449  tmp >>= 8;
450  out[4] = (unsigned char) tmp;
451 
452  tmp = uu->time_hi_and_version;
453  out[7] = (unsigned char) tmp;
454  tmp >>= 8;
455  out[6] = (unsigned char) tmp;
456 
457  tmp = uu->clock_seq;
458  out[9] = (unsigned char) tmp;
459  tmp >>= 8;
460  out[8] = (unsigned char) tmp;
461 
462  memcpy(out+10, uu->node, 6);
463 }
__u16 clock_seq
Definition: gw_uuid.c:66
__u16 time_mid
Definition: gw_uuid.c:64
__u8 node[6]
Definition: gw_uuid.c:67
__u16 time_hi_and_version
Definition: gw_uuid.c:65
__u32 time_low
Definition: gw_uuid.c:63
int uuid_parse ( const char *  in,
uuid_t  uu 
)

Definition at line 475 of file gw_uuid.c.

References uuid::clock_seq, uuid::node, uuid::time_hi_and_version, uuid::time_low, uuid::time_mid, and uuid_pack().

Referenced by bb_remove_message(), and parse_uuid().

476 {
477  struct uuid uuid;
478  int i;
479  const char *cp;
480  char buf[3];
481 
482  if (strlen(in) != 36)
483  return -1;
484  for (i=0, cp = in; i <= 36; i++,cp++) {
485  if ((i == 8) || (i == 13) || (i == 18) ||
486  (i == 23)) {
487  if (*cp == '-')
488  continue;
489  else
490  return -1;
491  }
492  if (i== 36)
493  if (*cp == 0)
494  continue;
495  if (!isxdigit(*cp))
496  return -1;
497  }
498  uuid.time_low = strtoul(in, NULL, 16);
499  uuid.time_mid = strtoul(in+9, NULL, 16);
500  uuid.time_hi_and_version = strtoul(in+14, NULL, 16);
501  uuid.clock_seq = strtoul(in+19, NULL, 16);
502  cp = in+24;
503  buf[2] = 0;
504  for (i=0; i < 6; i++) {
505  buf[0] = *cp++;
506  buf[1] = *cp++;
507  uuid.node[i] = strtoul(buf, NULL, 16);
508  }
509 
510  uuid_pack(&uuid, uu);
511  return 0;
512 }
__u16 clock_seq
Definition: gw_uuid.c:66
__u16 time_mid
Definition: gw_uuid.c:64
__u8 node[6]
Definition: gw_uuid.c:67
__u16 time_hi_and_version
Definition: gw_uuid.c:65
__u32 time_low
Definition: gw_uuid.c:63
Definition: gw_uuid.c:62
static void uuid_pack(const struct uuid *uu, uuid_t ptr)
Definition: gw_uuid.c:433
void uuid_shutdown ( void  )

Definition at line 97 of file gw_uuid.c.

References get_random_fd().

Referenced by gwlib_shutdown().

98 {
99  int fd = get_random_fd();
100 
101  if (fd > 0)
102  close(fd);
103 }
static int get_random_fd(void)
Definition: gw_uuid.c:171
time_t uuid_time ( const uuid_t  uu,
struct timeval *  ret_tv 
)

Definition at line 586 of file gw_uuid.c.

References uuid::time_hi_and_version, uuid::time_low, uuid::time_mid, and uuid_unpack().

587 {
588  struct uuid uuid;
589  __u32 high;
590  struct timeval tv;
591  unsigned long long clock_reg;
592 
593  uuid_unpack(uu, &uuid);
594 
595  high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16);
596  clock_reg = uuid.time_low | ((unsigned long long) high << 32);
597 
598  clock_reg -= (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
599  tv.tv_sec = clock_reg / 10000000;
600  tv.tv_usec = (clock_reg % 10000000) / 10;
601 
602  if (ret_tv)
603  *ret_tv = tv;
604 
605  return tv.tv_sec;
606 }
__u16 time_mid
Definition: gw_uuid.c:64
__u16 time_hi_and_version
Definition: gw_uuid.c:65
static void uuid_unpack(const uuid_t in, struct uuid *uu)
Definition: gw_uuid.c:525
__u32 time_low
Definition: gw_uuid.c:63
Definition: gw_uuid.c:62
int uuid_type ( const uuid_t  uu)

Definition at line 608 of file gw_uuid.c.

References uuid::time_hi_and_version, and uuid_unpack().

609 {
610  struct uuid uuid;
611 
612  uuid_unpack(uu, &uuid);
613  return ((uuid.time_hi_and_version >> 12) & 0xF);
614 }
__u16 time_hi_and_version
Definition: gw_uuid.c:65
static void uuid_unpack(const uuid_t in, struct uuid *uu)
Definition: gw_uuid.c:525
Definition: gw_uuid.c:62
void uuid_unpack ( const uuid_t  in,
struct uuid uu 
)
static

Definition at line 525 of file gw_uuid.c.

References uuid::clock_seq, uuid::node, uuid::time_hi_and_version, uuid::time_low, and uuid::time_mid.

Referenced by uuid_compare(), uuid_generate_random(), uuid_time(), uuid_type(), uuid_unparse(), and uuid_variant().

526 {
527  const __u8 *ptr = in;
528  __u32 tmp;
529 
530  tmp = *ptr++;
531  tmp = (tmp << 8) | *ptr++;
532  tmp = (tmp << 8) | *ptr++;
533  tmp = (tmp << 8) | *ptr++;
534  uu->time_low = tmp;
535 
536  tmp = *ptr++;
537  tmp = (tmp << 8) | *ptr++;
538  uu->time_mid = tmp;
539 
540  tmp = *ptr++;
541  tmp = (tmp << 8) | *ptr++;
542  uu->time_hi_and_version = tmp;
543 
544  tmp = *ptr++;
545  tmp = (tmp << 8) | *ptr++;
546  uu->clock_seq = tmp;
547 
548  memcpy(uu->node, ptr, 6);
549 }
__u16 clock_seq
Definition: gw_uuid.c:66
__u16 time_mid
Definition: gw_uuid.c:64
__u8 node[6]
Definition: gw_uuid.c:67
__u16 time_hi_and_version
Definition: gw_uuid.c:65
__u32 time_low
Definition: gw_uuid.c:63
void uuid_unparse ( const uuid_t  uu,
char *  out 
)

Definition at line 561 of file gw_uuid.c.

References uuid::clock_seq, uuid::node, uuid::time_hi_and_version, uuid::time_low, uuid::time_mid, and uuid_unpack().

Referenced by add_msg_cb(), append_uuid(), boxc_sent_pop(), boxc_sent_push(), brunet_send_sms(), clickatell_send_sms(), delayed_http_reply(), dispatch_into_queue(), generic_parse_reply(), get_pattern(), kannel_parse_reply(), kannel_send_sms(), main(), main_connection_loop(), msg_cb(), status_cb(), store_spool_save(), store_to_dict(), store_uuid(), and urltrans_fill_escape_codes().

562 {
563  struct uuid uuid;
564 
565  uuid_unpack(uu, &uuid);
566  sprintf(out,
567  "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
569  uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
570  uuid.node[0], uuid.node[1], uuid.node[2],
571  uuid.node[3], uuid.node[4], uuid.node[5]);
572 }
__u16 clock_seq
Definition: gw_uuid.c:66
__u16 time_mid
Definition: gw_uuid.c:64
__u8 node[6]
Definition: gw_uuid.c:67
__u16 time_hi_and_version
Definition: gw_uuid.c:65
static void uuid_unpack(const uuid_t in, struct uuid *uu)
Definition: gw_uuid.c:525
__u32 time_low
Definition: gw_uuid.c:63
Definition: gw_uuid.c:62
int uuid_variant ( const uuid_t  uu)

Definition at line 616 of file gw_uuid.c.

References uuid::clock_seq, uuid_unpack(), UUID_VARIANT_DCE, UUID_VARIANT_MICROSOFT, UUID_VARIANT_NCS, and UUID_VARIANT_OTHER.

617 {
618  struct uuid uuid;
619  int var;
620 
621  uuid_unpack(uu, &uuid);
622  var = uuid.clock_seq;
623 
624  if ((var & 0x8000) == 0)
625  return UUID_VARIANT_NCS;
626  if ((var & 0x4000) == 0)
627  return UUID_VARIANT_DCE;
628  if ((var & 0x2000) == 0)
629  return UUID_VARIANT_MICROSOFT;
630  return UUID_VARIANT_OTHER;
631 }
__u16 clock_seq
Definition: gw_uuid.c:66
static void uuid_unpack(const uuid_t in, struct uuid *uu)
Definition: gw_uuid.c:525
Definition: gw_uuid.c:62
#define UUID_VARIANT_DCE
Definition: gw_uuid.h:38
#define UUID_VARIANT_MICROSOFT
Definition: gw_uuid.h:39
#define UUID_VARIANT_NCS
Definition: gw_uuid.h:37
#define UUID_VARIANT_OTHER
Definition: gw_uuid.h:40
See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.