su
1.12.11devel
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerator
Macros
Groups
Pages
libsofia-sip-ua
su
sofia-sip
su_uniqueid.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Sofia-SIP package
3
*
4
* Copyright (C) 2005 Nokia Corporation.
5
*
6
* Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public License
10
* as published by the Free Software Foundation; either version 2.1 of
11
* the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21
* 02110-1301 USA
22
*
23
*/
24
25
#ifndef SU_UNIQUEID_H
26
27
#define SU_UNIQUEID_H
28
29
41
#ifndef SU_TYPES_H
42
#include <
sofia-sip/su_types.h
>
43
#endif
44
45
SOFIA_BEGIN_DECLS
46
48
typedef
union
GloballyUniqueIdentifier
{
49
unsigned
char
id
[16];
50
struct
{
51
uint32_t
time_low;
52
uint16_t
time_mid;
53
uint16_t
time_high_and_version;
54
uint8_t
clock_seq_hi_and_reserved;
55
uint8_t
clock_seq_low;
56
uint8_t
node[6];
57
} s;
58
}
su_guid_t
;
59
61
SOFIAPUBFUN
size_t
su_node_identifier
(
void
*address,
size_t
addrlen);
62
72
SOFIAPUBFUN
void
su_guid_generate
(
su_guid_t
*guid);
73
90
SOFIAPUBFUN
isize_t
su_guid_sprintf
(
char
* buf,
size_t
len,
su_guid_t
const
*guid);
91
92
enum
{
94
su_guid_strlen
= 8 + 5 + 5 + 5 + 13
95
};
96
108
SOFIAPUBFUN
int
su_randint
(
int
lb,
int
ub);
109
117
SOFIAPUBFUN
void
*
su_randmem
(
void
*mem,
size_t
siz);
118
119
SOFIAPUBFUN
uint32_t
su_random
(
void
);
120
121
SOFIAPUBFUN
uint64_t
su_random64
(
void
);
122
123
SOFIA_END_DECLS
124
125
#endif
Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.