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>
13 #include "uuid_private.h"
14 #include LC_LIBDEFS_FILE
16 /* Name string is a fully-qualified domain name */
17 static uuid_t NameSpace_DNS
= { /* 6ba7b810-9dad-11d1-80b4-00c04fd430c8 */
21 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
24 /* Name string is a URL */
25 static uuid_t NameSpace_URL
= { /* 6ba7b811-9dad-11d1-80b4-00c04fd430c8 */
29 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
32 /* Name string is an ISO OID */
33 static uuid_t NameSpace_OID
= { /* 6ba7b812-9dad-11d1-80b4-00c04fd430c8 */
37 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
40 /* Name string is an X.500 DN (in DER or a text output format) */
41 static uuid_t NameSpace_X500
= { /* 6ba7b814-9dad-11d1-80b4-00c04fd430c8 */
45 0x80, 0xb4, {0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8}
48 static uuid_t _null
= {0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0}};
50 AROS_LH2(void, UUID_GetNameSpace
,
51 AROS_LHA(uint32_t, NameSpace
, D0
),
52 AROS_LHA(uuid_t
*, uuid
, A0
),
53 struct uuid_base
*, UUIDBase
, 6, UUID
)
61 case UUID_NAMESPACE_DNS
:
62 *uuid
= NameSpace_DNS
;
65 case UUID_NAMESPACE_URL
:
66 *uuid
= NameSpace_URL
;
69 case UUID_NAMESPACE_OID
:
70 *uuid
= NameSpace_OID
;
73 case UUID_NAMESPACE_X500
:
74 *uuid
= NameSpace_X500
;