Updated PCI IDs to latest snapshot.
[tangerine.git] / workbench / libs / uuid / uuid_namespace.c
blob40384776da420b8a4a1acdc7559b69a64b8bb557
1 /*
2 Copyright © 2007-2008, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define DEBUG 1
8 #include <aros/symbolsets.h>
9 #include <aros/debug.h>
10 #include <aros/libcall.h>
11 #include <proto/exec.h>
13 #include <assert.h>
15 #include "uuid_private.h"
16 #include LC_LIBDEFS_FILE
18 /* Name string is a fully-qualified domain name */
19 static uuid_t NameSpace_DNS = { /* 6ba7b810-9dad-11d1-80b4-00c04fd430c8 */
20 0x6ba7b810,
21 0x9dad,
22 0x11d1,
23 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
26 /* Name string is a URL */
27 static uuid_t NameSpace_URL = { /* 6ba7b811-9dad-11d1-80b4-00c04fd430c8 */
28 0x6ba7b811,
29 0x9dad,
30 0x11d1,
31 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
34 /* Name string is an ISO OID */
35 static uuid_t NameSpace_OID = { /* 6ba7b812-9dad-11d1-80b4-00c04fd430c8 */
36 0x6ba7b812,
37 0x9dad,
38 0x11d1,
39 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
42 /* Name string is an X.500 DN (in DER or a text output format) */
43 static uuid_t NameSpace_X500 = { /* 6ba7b814-9dad-11d1-80b4-00c04fd430c8 */
44 0x6ba7b814,
45 0x9dad,
46 0x11d1,
47 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
50 static uuid_t _null = {0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0}};
52 AROS_LH2(void, UUID_GetNameSpace,
53 AROS_LHA(uint32_t, NameSpace, D0),
54 AROS_LHA(uuid_t *, uuid, A0),
55 struct uuid_base *, UUIDBase, 6, UUID)
57 AROS_LIBFUNC_INIT
59 assert(uuid);
61 switch(NameSpace)
63 case UUID_NAMESPACE_DNS:
64 *uuid = NameSpace_DNS;
65 break;
67 case UUID_NAMESPACE_URL:
68 *uuid = NameSpace_URL;
69 break;
71 case UUID_NAMESPACE_OID:
72 *uuid = NameSpace_OID;
73 break;
75 case UUID_NAMESPACE_X500:
76 *uuid = NameSpace_X500;
77 break;
79 default:
80 *uuid = _null;
81 break;
84 AROS_LIBFUNC_EXIT