Loading...
Searching...
No Matches
su_uniqueid.h File Reference
GloballyUniqueIDs

Functions to handle GloballyUniqueIDs. More...

`#include <sofia-sip/su_types.h>`
Include dependency graph for su_uniqueid.h:

Go to the source code of this file.

## Data Structures

union | GloballyUniqueIdentifier
| Globally unique identifier type. More...

## Macros

#define | SU_UNIQUEID_H
| Defined when <sofia-sip/su_uniqueid.h> has been included.

## Typedefs

typedef union GloballyUniqueIdentifier | su_guid_t
| Globally unique identifier type.

## Enumerations

enum | { su_guid_strlen }

## Functions

size_t | su_node_identifier (void *address, size_t addrlen)
| Return node identifier.
void | su_guid_generate (su_guid_t *guid)
| Generate a GUID.
isize_t | su_guid_sprintf (char *buf, size_t len, su_guid_t const *guid)
| Print guid.
int | su_randint (int lb, int ub)
| Random integer in range [lb, ub] (inclusive).
void * | su_randmem (void *mem, size_t siz)
| Fill memory with random values.
uint32_t | su_random (void)
| Generate a random 32-bit unsigned integer.
uint64_t | su_random64 (void)
| Generate a random 64-bit unsigned integer.

## Detailed Description

Functions to handle GloballyUniqueIDs.

Author
  Pekka Pessi Pekka.nosp@m..Pes.nosp@m.si@no.nosp@m.kia..nosp@m.com

Date
  Created: Tue Apr 15 06:31:41 1997 pessi

## Enumeration Type Documentation

## anonymous enum

anonymous enum

Enumerator
su_guid_strlen | Length of guid in hex format.

## Function Documentation

## su_guid_generate()

void su_guid_generate | ( | su_guid_t * | guid | ) |

Generate a GUID.

The function guid_generate() generates a new globally unique identifier for an IP telephony call. The guid follows the structure specified in the ITU-T recommendation H.225.0 v2. The guid is usable also in SIP Call-ID header.

Parameters

  guid | [out] pointer to structure for new call identifier

## su_guid_sprintf()

isize_t su_guid_sprintf | ( | char * | buf,
|  | size_t | len,
|  | su_guid_t const * | guid )

Print guid.

The function guid_sprintf() formats the IP telephony call identifier according the human-readable format specified in the ITU-T recommendation H.225.0 v2. The printed identifier can be used as a SIP Call-ID if the colons in IEEE MAC address are replaced with '-', '+' or other character allowed in SIP token.

Parameters

  buf | [out] buffer to store the formatted globally unique identifier
  len | [in] size of buffer buf (should be at least guid_strlen bytes)
  guid | [in] pointer to structure containing globally unique identifier

Return values

  The | function guid_sprintf() returns length of the formatted globally unique identifier excluding the final NUL.

## su_randint()

int su_randint | ( | int | lb,
|  | int | ub )

Random integer in range [lb, ub] (inclusive).

The function randint() generates a pseudo-random integer in the range [ln, ub] (inclusive).

Parameters

  lb | [in] lower bound
  ub | [in] upper bound

Returns
  The function randint() returns a pseudo-random integer.

Random integer in range [lb, ub] (inclusive).

## su_randmem()

void * su_randmem | ( | void * | mem,
|  | size_t | siz )

Fill memory with random values.

The function randmem() fills the given memory range with pseudo-random data.

Parameters

  mem | [out] pointer to the beginning of the memory area to be filled
  siz | [in] size fo the memory area in bytes

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.