2 Copyright © 2007-2008, The AROS Development Team. All rights reserved.
8 #include <aros/symbolsets.h>
9 #include <aros/debug.h>
10 #include <aros/libcall.h>
11 #include <proto/exec.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 */
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 */
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 */
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 */
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
)
63 case UUID_NAMESPACE_DNS
:
64 *uuid
= NameSpace_DNS
;
67 case UUID_NAMESPACE_URL
:
68 *uuid
= NameSpace_URL
;
71 case UUID_NAMESPACE_OID
:
72 *uuid
= NameSpace_OID
;
75 case UUID_NAMESPACE_X500
:
76 *uuid
= NameSpace_X500
;